> Hi I am doing a project for uni and have written out everything but
>  when I run the program in GLPK it comes up with syntax error in data
>  section highlighting the data in the last table param d. This is what
>  I have:

Generating constraint1...
foo.mod:39: d[Mon,Mainshort] out of domain
MathProg model processing error

In your model d is declared as 

> param d{i in I, k in K};
> /* duration of room type i on day k */

and in the data section you specify:

> set I:= Mainshort Mainlong EOPSshort EOPSlong; # room type
>  
> set K:= Mon Tue Wed Thu Fri; # days of the week
>  
> param d: Mainshort Mainlong EOPSshort EOPSlong := 
> Mon 7.5 9 7.5 8
> Tue 7.5 9 7.5 8
> Wed 7.5 9 7.5 8
> Thu 7.5 9 7.5 8
> Fri 7.5 9 7.5 8;
>  

Thus, element d[Mainshort,Mon] exists while d[Mon,Mainshort], which
you refer in constraint1, doesn't.

Check indices!


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

Reply via email to