Suppose I have these elements in the linear program:

param n := 10;

var idx, integer >= 1  <= n;

var arr{1..n};


What would be the simplest way to express arr[idx] (for example to use arr]idx] in some other statements)?


I know that this is possible. I first had "var memb{1..n}, binary;" instead of "idx", so that it expressed the array index as a boolean array instead of a single integer index, but this way it led to an unsolvable MIP instance.

Not even sure if this is a feasible way to simplify the MIP instance.



Thank you,

Yuri



_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to