Inverting sets
Posted: Fri Mar 23, 2018 4:40 pm
Hi everyone,
I have a question according to sets.
Imagine the set n, the set i and the subset x(n,i). Is there an easy way to for the equation x(n,i+1) = x(n^-1,i)?
Here is what I mean in a more detailed way:
set n /1*3/
i /1*20/
x(n,i);
So x got 3 values. Let's say they get some values in the time step 8:
x(1,8) = 2
x(2,8) = 5
x(3,8) = 16
No I want to attach the values in the next timestep to:
x(1,9) = 16
x(2,9) = 5
x(3,9) = 2
The change should be dependent on some conditions, but i think it is easy to do this with binary variables.
I hope you understand, what I want to do. Thanks in advance!
Cheers
I have a question according to sets.
Imagine the set n, the set i and the subset x(n,i). Is there an easy way to for the equation x(n,i+1) = x(n^-1,i)?
Here is what I mean in a more detailed way:
set n /1*3/
i /1*20/
x(n,i);
So x got 3 values. Let's say they get some values in the time step 8:
x(1,8) = 2
x(2,8) = 5
x(3,8) = 16
No I want to attach the values in the next timestep to:
x(1,9) = 16
x(2,9) = 5
x(3,9) = 2
The change should be dependent on some conditions, but i think it is easy to do this with binary variables.
I hope you understand, what I want to do. Thanks in advance!
Cheers