'Can anyone help someone brand new to AMPL?
Brand new to AMPL and don't understand the error at all. I've tried removing the variable definitions and get the error (no variables identified) so anyway here is the error message:
syntax error
context: subject to >>> 90 <<< * x1 + 120 * x2 + 106 * x3 + 97 * x4 + 130 * x5 + 180 * x6 >= 300;
here is my code
reset;
var x1 >=0;
var x2 >=1;
var x3 >=0;
var x4 >=0;
var x5 >=.5;
var x6 >=0;
minimize cost: 2 * x1 + 3.5 * x2 + 8 * x3 + 1.5 * x4 + 11 * x5 + x6;
subject to 90 * x1 + 120 * x2 + 106 * x3 + 97 * x4 + 130 * x5 + 180 * x6 >= 300;
subject to 4 * x1 + 8 * x2 + 7 * x3 + 1.3 * x4 + 8 * x5 + 9.2 * x6 >= 10;
subject to 15 * x1 + 11.7 * x2 + .4 * x3 + 22.6 * x4 + 17 * x6 >= 10;
subject to x1 + 5 * x2 + 9 * x3 + 0.1 * x4 + 7 * x5 + 7 * x6 >= 8;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
