> i have this situation:
> ....
> set SLA;
> 
> set K{t in SLA};
> 
> param Deadline{t in SLA} ;
> 
> subject to DLINE{i in SLA}: sum{t in K} x[i,t]=1 ;
> ....
> 
> data;
> 
> set SLA := A17  A18  A25 ;
> 
> set K:= 0..Deadline ;
> 
> param Deadline :=
> 
> A17  32
> A18  40
> A25  44 ;
> ...
> 
> end;
> 
> but i get this error: K must be subscripted
> 
> how can i solve this error??
> 

No operators are allowed in the data section. Thus,

   set K:= 0..Deadline ;

means specifying a plain set K that consists of the only element, which
is a string literal "0..Deadline". However, the error occurs because K
is declared as a set (array) of sets rather a plain set.

Please look at examples in the language reference and those included in
the glpk distribution.



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

Reply via email to