help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] MathProg model processing error


From: xypron . glpk
Subject: Re: [Help-glpk] MathProg model processing error
Date: Fri, 28 Jun 2013 03:32:07 +0200 (CEST)

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
> 
> address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]