Hello Robin,

you cannot have "and" in a constraint.

Use two constraints.

Best regards

Heinrich Schuchardt

http://www.xypron.de

Am 28.06.13 um 03:24 schrieb robin hankin

> hello, v4.51, macosx 10.8.3
> 
> 
> 
> 
> 
> 
> 
> Please help me,  I have a problem and have boiled it down to the following
> 
> .mod file which exibits the error I am struggling with:
> 
> 
> 
> wt118:~/Dropbox/glpk/alice_puzzle%
> 
> wt118:~/Dropbox/glpk/alice_puzzle% cat doesnotwork.mod
> 
> var x1, integer;
> 
> var x2, integer;
> 
> var x3, integer;
> 
> 
> 
> s.t. ss:   (x1 >= x2) and (x2 >= x3);
> 
> 
> 
> 
> 
> solve;
> 
> end;
> 
> wt118:~/Dropbox/glpk/alice_puzzle% glpsol -m doesnotwork.mod
> 
> GLPSOL: GLPK LP/MIP Solver, v4.51
> 
> Parameter(s) specified in the command line:
> 
>  -m doesnotwork.mod
> 
> Reading model section from doesnotwork.mod...
> 
> doesnotwork.mod:5: operand preceding >= has invalid type
> 
> Context: ...er ; var x2 , integer ; var x3 , integer ; s.t. ss : ( x1 >=
> 
> MathProg model processing error
> 
> wt118:~/Dropbox/glpk/alice_puzzle%
> 
> 
> 
> 
> 
> 
> 
> what is wrong with my doesnotwork.mod file?  What is wrong with my 'ss'
> 
> constraint?
> 
> 
> 
> thanks in advance
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Robin Hankin
> 
> Uncertainty Analyst
> 
> [email protected]

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

Reply via email to