[Top][All Lists]

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

[Help-glpk] [Fwd: GLPK Mathprog model]

From: Andrew Makhorin
Subject: [Help-glpk] [Fwd: GLPK Mathprog model]
Date: Thu, 27 Jan 2011 15:25:41 +0300

-------- Forwarded Message --------
From: Alan Zinober <address@hidden>
To: address@hidden
Subject: GLPK Mathprog model
Date: Thu, 27 Jan 2011 09:27:21 +0000

The model below (only relevant parts included) is taken from a working 
AMPL model program
that is solved running in AMPL.

I am trying to run the same problem using GLPK (Mathprog) but there is 
an error reported on the last line below.

According to the guidance manual the text below seems fine. Any advice
will be most welcome.

GLPK "report":

Reading model section from G-case7-a26Suli.txt...
G-case7-a26Suli.txt:47: expression following = has invalid type
Context: { i in 1 .. I , j in 1 .. J } x [ i , j , k ] * w [ i ] ;
MathProg model processing error


param I;
param J;
param K;

param w{1..I};             # wt per type i pack


var x{1..I, 1..J, 1..K}, binary;

var f{k in 1..K} = sum{i in 1..I, j in 1..J}  x[i,j,k]*w[i] ;

reply via email to

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