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 <przemek.przybysz...@wp.pl>
To: help-glpk@gnu.org
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
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk



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

Reply via email to