Part I: Develop a GAMS model for the following extended case of the hot-tubs example.
Extended Hot-Tubs Example: In addition to Aqua-Spa and Hydro-Lux, Blue Ridge can produce a third type of
hot-tub XYZ that generates unit profit of $340. To produce a unit of XYZ, the following resources are required:
I pump, 8 hours of labor, and 14 feet of tubing. Develop a GAMS model to find the optimal production
quantities for Aqua-Spa, Hydro-Lux, and XYZ.
Part III: Develop a GAMS model for the following extended case of the investment planning problem (note the
GAMS code for the investment planning problem is available on Canvas, under “Class Files – Session 1
Solutions”).
Extended Investment Planning Problem: Assume that Barney-Jones decides to use different limits for different
investment options (instead of the previous $75,000 limit that used to be enforced for all options). Specifically,
they want to limit the amount put into investments A, B, C, D, and E to $70,000, $72,000, $72,000, $78,000,
and $73,000, respectively. Develop a GAMS model to fund an optimal investment strategy for Barney-Jones.
Sets
i /Aqua_Spa, Hydro_Lux/
j /Pumps, Labor, Tubing/;
Parameters
Unit_Profit(i)
/ Aqua_Spa 350
Hydro_Lux 300 /
Resource_Limit(j)
/ Pumps 200
Labor 1566
Tubing 2880/
;
Table Resource_Consumption(j,i)
Aqua_Spa Hydro_Lux
Pumps 1 1
Labor 9 6
Tubing 12 16
;
Positive Variables X(i);
Variable Z;
Equations
Objective_fn
Constraints
;
Objective_fn.. z =e= sum(i, Unit_Profit(i)*X(i));
Constraints(j).. sum(i, Resource_Consumption(j,i)*X(i)) =l= Resource_Limit(j) ;
Model Product_Mix_Hot_Tubs /all/;
Solve Product_Mix_Hot_Tubs using lp maximizing z;
Display X.L, Z.L;
Sets
t shows beginning of year /1,2,3,4,5/
i investment options / A,B,C,D,E/
;
Scalars
Initial_amount_to_invest /100000/
Maximum_per_investment /75000 /
Interest_rate_on_cash /0.03 /
;
Table
cash_outlays(t,i)
A B C D E
1 1.00 0.00 1.00 0.00 0.00
2 0.00 1.00 0.00 0.00 0.00
3 0.00 0.00 0.00 0.00 1.00
4 0.00 0.00 0.00 1.00 0.00
;
Table
cash_returns(t,i)
A B C D E
1 0.00 0.00 0.00 0.00 0.00
2 0.50 0.00 1.20 0.00 0.00
3 1.00 0.50 0.00 0.00 0.00
4 0.00 1.00 0.00 0.00 1.50
5 0.00 0.00 0.00 1.90 0.00
;
Positive variable
X(i)
CB(t) cash at the beginning of t BEFORE transactions
CA(t) cash at the beginning of t AFTER transactions;
variable Z;
Equations
obj_fn
money_dynamics1
money_dynamics2
money_dynamics3
diversity
;
obj_fn.. Z =E= CA(“5”) ;
money_dynamics1(t).. CA(t) =E= CB(t) + sum(i, cash_returns(t,i)*X(i))
– sum(i, cash_outlays(t,i)*X(i));
money_dynamics2(t)$(ORD(t) GE 2).. CB(t) =E= CA(t-1)*(1+Interest_rate_on_cash);
money_dynamics3.. CB(“1”) =E= Initial_amount_to_invest ;
diversity(i).. X(i) =L= Maximum_per_investment ;
Model investment_planning / all / ;
Solve investment_planning using LP maximizing Z;
Display
X.L
CB.L
CA.L
Z.L;