lmp2.gms : Linear Multiplicative Model - Type 2

Description

```Generates and solves random linear multiplicative models of
"Type 2." Problem instances are generated as proposed by
Thoai. Model developed by N. Sahinidis.
```

Large Model of Type : NLP

Category : GAMS Model library

Main file : lmp2.gms

``````\$title Linear Multiplicative Programs - Type 2 (LMP2,SEQ=252)

\$onText
Generates and solves random linear multiplicative models of
"Type 2." Problem instances are generated as proposed by
Thoai. Model developed by N. Sahinidis.

N. V. Thoai, "A global optimization approach for solving
convex multiplicative programming problems",
Journal of Global Optimization, 1(341-357), 1991.

M. Tawarmalani and N. Sahinidis, Convexification and Global
Optimization in Continuous and Mixed-Integer Nonlinear
Programming: Theory, Algorithms, Software, and Applications,

Keywords: nonlinear programming, linear multiplicative programming, global optimization
\$offText

option optCr = 0, optCa = 1.e-6, limRow = 0, limCol = 0, solPrint = off;

Set
mm / m1*m200 /
nn / n1*n200 /;

Set
m(mm) 'constraints'
n(nn) 'variables'
p     'products'  / p1*p2 /
c     'cases'     / c1*c5 /
i     'instances' / i1*i5 /;

* For each case to be solved, we use a different (m,n) pair
Table cases(c,*)
m    n
c1   10   20
c2   20   30
c3   60  100
c4  100  100
c5  200  200;

Parameter
cc(p,nn) 'cost coefficients'
f(p)     'constants'
A(mm,nn) 'constraint coefficients'
b(mm)    'left-hand-side'
rep(c,*) 'summary report'
ResMin
Resmax
NodMin
Nodmax;

Variable
y(p)
x(nn)
obj;

Equation
Objective
Constraints(mm)
Products(p);

Objective..      obj  =e= prod(p, y(p));

Products(p)..    y(p) =e= sum(n, cc(p,n)*x(n));

Constraints(m).. b(m) =l= sum(n, A(m,n)*x(n));

x.lo(nn) = 0;

Model lmp2 / all /;

lmp2.workSpace = 32;

rep(c,'AvgResUsd') = 0;
rep(c,'AvgNodUsd') = 0;

loop(c,
m(mm)   = ord(mm) <= cases(c,'m');
n(nn)   = ord(nn) <= cases(c,'n');
ResMin  = inf;
Resmax  = 0;
NodMin  = inf;
Nodmax  = 0;

loop(i,
f(p)    =  uniform(0,1);
cc(p,n) =  uniform(0,1);
A(m,n)  =  2*uniform(0,1) - 1;
b(m)    = (sum(n, A(m,n)) + 2*uniform(0,1));

*     Set initial starting point for all models to 0
x.l(n) = 0;
y.l(p) = 0;

solve lmp2 minimizing obj using nlp;

rep(c,'AvgResUsd') = rep(c,'AvgResUsd') + lmp2.resUsd;
rep(c,'AvgNodUsd') = rep(c,'AvgNodUsd') + lmp2.nodUsd;
ResMin = min(ResMin, lmp2.resUsd);
NodMin = min(NodMin, lmp2.nodUsd);
ResMax = max(ResMax, lmp2.resUsd);
NodMax = max(NodMax, lmp2.nodUsd);
);
rep(c,'MinResUsd') = ResMin;
rep(c,'MaxResUsd') = ResMax;
rep(c,'MinNodUsd') = nodMin;
rep(c,'MaxNodUsd') = nodMax;
);
rep(c,'AvgResUsd') = rep(c,'AvgResUsd')/card(i);
rep(c,'AvgNodUsd') = rep(c,'AvgNodUsd')/card(i);

display rep;
``````
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170