> I added two arrays of equal dimensions to the set, FT and FS, and
> initialized them in the data section
> They hold the paired values for the initial assignments.
> set FT := D1 B2 D2 B3 B1;
> set FS := 1 2 4 5 7;
>
> I added the following statement to the model
>
> s.t. init{f in FT,}: x[f,FS[f]] = 1;
>
> the error is that FS cannot be subscripted.
>
> Basic question remains on how to specify the initial assignment constraint
> in the model section
> and how to specify the pairs of initial assigments in the data section.
In the model section:
set F, dimen 2;
s.t. init{(i,j) in F}: x[i,j] = 1;
In the data section:
set F := D1 1, B2 2, D2 4, B3 5, B1 7;
Please see also examples included in glpk distribution.
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk