Am 15.02.18, 21:10, Giovanni Di Stasi <[email protected]> schrieb:
I am trying to use such functions but I get a syntax error._______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpkIn particular, this is my program, taken by the following book chapter:set ORIG; # originsset DEST; # destinationsparam supply {ORIG} >= 0; # amounts available at originsparam demand {DEST} >= 0; # amounts required at destinationscheck: sum {i in ORIG} supply[i] = sum {j in DEST} demand[j];param rate1 {i in ORIG, j in DEST} >= 0;param rate2 {i in ORIG, j in DEST} >= rate1[i,j];param rate3 {i in ORIG, j in DEST} >= rate2[i,j];param limit1 {i in ORIG, j in DEST} > 0;param limit2 {i in ORIG, j in DEST} > limit1[i,j];var Trans {ORIG,DEST} >= 0; # units to be shippedminimize Total_Cost: sum {i in ORIG, j in DEST}<<limit1[i,j], limit2[i,j];rate1[i,j], rate2[i,j], rate3[i,j]>> Trans[i,j];subject to Supply {i in ORIG}:sum {j in DEST} Trans[i,j] = supply[i];subject to Demand {j in DEST}:sum {i in ORIG} Trans[i,j] = demand[j];When I try to make glpk parse it, I get the following error:glpsol --model glpk/Test --data /tmp/DATAg5ZQ0L -w /tmp/OUTXlm0STGLPSOL: GLPK LP/MIP Solver, v4.61Parameter(s) specified in the command line:--model glpk/Test --data /tmp/DATAg5ZQ0L -w /tmp/OUTXlm0STReading model section from glpk/Test...glpk/Test:14: syntax error in _expression_Context: ...>= 0 ; minimize Total_Cost : sum { i in ORIG , j in DEST } <MathProg model processing errorI really have no clue as of now.Thanks
_______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
