help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: Syntax error]


From: Heinrich Schuchardt
Subject: Re: [Help-glpk] [Fwd: Syntax error]
Date: Thu, 11 Sep 2014 18:38:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

Hello Przemek,

your mail had to be forwarded manually because you are not subscribed to the GLPK help list, see
https://lists.gnu.org/mailman/listinfo/help-glpk

>> var po := sum{i in I} c[i]*x[i];
In AMPL you could write
var po == sum{i in I} c[i]*x[i];
to define a term that is not a column in the LP problem.

This is not possible in GMPL. You could use a constraint instead.

var po;
s.t. constr : po = sum{i in I} c[i]*x[i];

Your example lacks the following statements:

solve;
data;
end;

Glpsol will point you to your other syntax errors.

Please, refer to file doc/gmpl.pdf of the source distribution for more details.

Best regards

Heinrich Schuchardt


On 11.09.2014 18:17, Andrew Makhorin wrote:
-------- Forwarded Message --------
From: Przemek Przybyszewski <address@hidden>
To: address@hidden
Subject: Syntax error
Date: Thu, 11 Sep 2014 17:19:53 +0200



Hi,



do you know what does such a message mean? "character l' not allowed". I
have found your e-mail address
in 
http://stackoverflow.com/questions/15488041/syntax-error-in-linear-programming-modelling-with-glpk.
 Could you please help? Thanks in advance



Kind regards



Przemek







_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

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