Reputation: 29
For this ampl code, I keep getting syntax errors when I try to run this mod file. I'm not quite sure where I'm going wrong, as I have the correct equations written down.
How do I go about fixing this?
var P >= 0;
var Q >= 0;
var R >= 0;
var S >= 0;
var T >= 0;
var U >= 0;
var V >= 0;
maximize Cost: 4*P + 5*Q + 1*R + 3*S - 5*T + 8*U;
subject to Sup1: P - 4*R + 3*S + T + U + 2*V = 1 ;
subject to Sup2: 5*P + 3*Q + R − 5*T + 3*U <= 4 ;
subject to Sup3: 4*P + 5*Q − 3*R + 3*S − 4*T + U <= 4 ;
subject to Sup4: − Q + 2*S + T − 5*U <= 5 ;
subject to Sup5: −2*P + Q + R + S + 2*T + 2*U <= 7 ;
subject to Sup6: 2*P − 3*Q + 2*R - S + 4*T + 5*U <= 5 ;
Upvotes: 1
Views: 95
Reputation: 55524
The syntax error is caused by the Unicode minus sign −
. To fix it replace all occurrences of −
with the standard ASCII minus sign -
.
Upvotes: 2