help-glpk
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
[Help-glpk] How to use less operator in gmpl?
From
:
Andy . Zhu
Subject
:
[Help-glpk] How to use less operator in gmpl?
Date
:
Wed, 8 Aug 2007 11:27:05 -0400
Hi, I am new to GNU MathProg language. I have following model but glpk always complains:
"test2.mod:10: operand preceding less has invalid type"
The GMPL document says it has this less operator. How could I use it in modeling?
Thanks very much for any help.
Andy
# model
set I;
set J;
var a {i in I}, binary;
var b {i in I}, integer, >=0;
maximize Z: sum {i in I diff J} b[i];
s.t. R1 {i in J}: a[i] =0;
s.t. R2 {i in I diff J}: b[i] = a[i] less a[i-1];
s.t. R4 {i in I diff J}: a[i]-a[i-1] !=0;
data;
set I : 0, 1, 2, 3, 4, 5;
set J : 0;
end;
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
[Help-glpk] How to use less operator in gmpl?
,
Andy . Zhu
<=
Re: [Help-glpk] How to use less operator in gmpl?
,
Andrew Makhorin
,
2007/08/09
Prev by Date:
Re: [Help-glpk] Compare two matrices
Next by Date:
[Help-glpk] Piecewise linear objective functions
Previous by thread:
[Help-glpk] Compare two matrices
Next by thread:
Re: [Help-glpk] How to use less operator in gmpl?
Index(es):
Date
Thread