I attached a few lines of a example model in MathProg where it
produce a "Parse error". The same work fine in AMPL.  It seems that in AMPL it is possible to define a var based on another one but not in MathProg.
¿Could someone help me please?
 
Thanks in advance.
 
set A ;
set B ;
param p {A} >= 0 ;
var V1 {B} integer >=0 ;
# The following is ok
var V2 {b in B} = sum {a in A} p[a] * 3 ;
# The following line produce "Parse error": _expression_ following = has invalid type.
# Context:  3 ; var V3 { b in B } = sum { a in A } p [ a ] * V1 [ b ] ;
var V3 {b in B} = sum {a in A} p[a] * V1[b] ;
 
 
 
   Jorge M. Paván
[EMAIL PROTECTED]
     15-5327-9247
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to