Reputation: 3
I have a binary parameter with one subscript WxTy[x];
And a binary variable with the same subscript WxTyOffset[x];
Additionally I have another variable called Offset and it is a single value (Offset);
An example of what I have is:
WxTy = 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1
The decision variable, Offset, will change how WxTyOffset
will be at the end.
An example is (considering the example given for WxTy):
Offset = 1; WxTyOffset = 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0
Another example:
Offset = 2 WxTyOffset = 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0
Basically what I need is a way to code this in GLPK
but I have no idea on how!
What I'm currently trying is something like:
WxTyOffset[x+Offset[y], y] >= WxTy[x, y];
But since Offset is a variable it cannot be a subscript
Upvotes: 0
Views: 19