Version:

prodsp.gms : Stochastic Programming Example

**Description**

The problem consists of determining the product mix for a furniture shop with two workstations: carpentry and finishing. The availability of labor in man-hours at the two stations is limited. There are four product classes, each consuming a certain number of man-hours at the two stations. Each product earns a certain profit and the shop has the option to purchase labor from outside. The objective is to maximize the profit.

**Large Model of Type :** LP

**Category :** GAMS Model library

**Main file :** prodsp.gms

```
$title Stochastic Programming Example (PRODSP,SEQ=186)
$onText
The problem consists of determining the product mix for a furniture shop with two
workstations: carpentry and finishing. The availability of labor in man-hours at
the two stations is limited. There are four product classes, each consuming a
certain number of man-hours at the two stations. Each product earns a certain
profit and the shop has the option to purchase labor from outside. The objective
is to maximize the profit.
King, A J, Stochastic Programming Problems: Examples from the
Literature. In Ermoliev, Y, and Wets, R J, Eds, Numerical
Techniques for Stochastic Optimization Problems. Springer Verlag,
1988, pp. 543-567.
Keywords: linear programming, production planning, stochastic programming
$offText
Set
i 'product class' / class-1*class-4 /
j 'workstation' / work-1*work-2 /
s 'nodes' / s1*s300 /;
Parameter
c(i) 'profit' / class-1 12, class-2 20, class-3 18, class-4 40 /
q(j) 'cost' / work-1 5, work-2 10 /
h(j,s) 'available labor'
t(j,i,s) 'labor required';
Table trand(j,*,i) 'min and max values'
class-1 class-2 class-3 class-4
work-1.min 3.5 8 6 9
work-1.max 4.5 10 8 11
work-2.min .8 .8 2.5 36
work-2.max 1.2 1.2 3.5 44;
t(j,i,s) = uniform(trand(j,'min',i),trand(j,'max',i));
h('work-1',s) = normal(6000,100);
h('work-2',s) = normal(4000, 50);
Variable
EProfit 'expected profit'
x(i) 'products sold'
v(j,s) 'labor purchased';
Positive Variable x, v;
Equation
obj 'expected cost definition'
lbal(j,s) 'labor balance';
obj.. EProfit =e= sum(i, c(i)*x(i)) - 1/card(s)*sum((j,s), q(j)*v(j,s));
Equation foo(i) 'dummy stage 0 constraint for OSLSE';
foo(i).. x(i) =g= 0;
lbal(j,s).. sum(i, t(j,i,s)*x(i)) =l= h(j,s) + v(j,s);
Model mix / all /;
mix.solPrint$(card(s) > 10) = %solPrint.quiet%;
solve mix using lp maximizing eprofit;
display eprofit.l, x.l;
```