Wire library syntax and variables TWAR, TWCR, TWDR, twi_slarw

Ok I'll explain,
I want to connect a Raspberry Pi (master) to Arduino (slave) using I2C.
Each period of time (let's say 1 second), the RPi sends data to an address. The arduino which is connected to the bus listens to the data flow. According to the I2C protocol , the RPi sends first the slave address and waits for an acknowledgement.
At this step, I want that the arduino reads the address and assign that address to itself. I should be using some Twi functions to that.
I need to do that for simulation purpose. I want to simulate many sensors with my arduino so it has to change its address each time according to the RPi demand.
It is obvious that the master should know the address of the slave before transmitting. What I'd like to do is that, when the arduino checks if the address transmitted by the RPi is the same as his or not, it affects that address to him instead and become able to communicate to the RPi.
I hope I made myself clear.