SimpleLP : Simple linear programming model

Reference

  • Alireza Soroudi, Power System Optimization Modelling in GAMS, Model SimpleLP (Gcode2.1) in chapter Simple Examples in GAMS, 2017

Category : GAMS PSOPT library


Mainfile : SimpleLP.gms

$title Simple linear programming model

$onText
For more details please refer to Chapter 2 (Gcode2.1), of the following book:
Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017.
--------------------------------------------------------------------------------
Model type: LP
--------------------------------------------------------------------------------
Contributed by
Dr. Alireza Soroudi
IEEE Senior Member
email: 
We do request that publications derived from the use of the developed GAMS code
explicitly acknowledge that fact by citing
Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017.
DOI: doi.org/10.1007/978-3-319-62350-4
$offText

Variable x1, x2, x3, of;
Equation eq1, eq2, eq3, eq4;

eq1.. x1 + 2*x2       =g= 3;
eq2.. x3 + x2         =g= 5;
eq3.. x1 + x3         =e= 4;
eq4.. x1 + 3*x2 +3*x3 =e= of;

Model LP1 / all /;

solve LP1 using lp minimizing of;
display x1.l, x2.l, x3.l, of.l;