for statements

4 views
Skip to first unread message

kys...@gmail.com

unread,
May 15, 2016, 6:21:53 PM5/15/16
to AMPL Modeling Language
 What is the problem I cant understand




For (a=0.1 to 0.9 by 0.1,

 (1500+a)*x1+(6000+a)* x2+(1500+a)*x3+(3000+a)*x4 +(3000+a)*x5+
(1500+a)*x6+(4500+a)*x7+(4500+a)*x8+(300+a)*x9 +(1500+a)*x10=l=(10000-a);

(0.4*a)*x1+(1.2+0.4*a)*x2+(0.4*a)*x3+(0.6+0.4*a)*x4 +(0.6+0.4*a)*x5+(0.4*a)*x6 +
(0.6+0.4*a)*x7+(0.6+0.4*a)*x8+ (0.6+0.4*a)*x9+(0.6+0.4*a)*x10=l=(4-a);


Z.l=(16.14-10.16*a)*X1.l + (4.2-1.85 *a)*X2.l +(4.5-2.11*a)* X3.l+(2.04-1.52*a)*X4.l+
(12.8-8.32*a)*X5.l+(21.5-17.02 *a)*x6.l +(2.45-1.31 *a)*x7.l +(2.82-1.64*a)*x8.l +(3.89-2.67*a)*x9.l+(5.2-2.79*a)*x10.l;

   Display X1.L,X2.L,X3.L,X4.L,X5.L,X6.L, X7.L,X8.L,X9.L,X10.L,Z.l,A;

);


My problem about ")" but I write correctly ? What is the problem  ?

Robert Fourer

unread,
May 16, 2016, 11:19:03 AM5/16/16
to am...@googlegroups.com
Your statements are not in the syntax of the AMPL modeling language. If you want to use these statements, you'll need to use different software (they look sort of like GAMS); if you want to convert them to AMPL, the algebraic statements will be much the same, but other details of the syntax will be different.

Bob Fourer
4...@ampl.com

=======
Reply all
Reply to author
Forward
0 new messages