非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!! ( f1 h# [+ f5 ^ m7 f我把程序贴在这, 0 ]: F+ V; `( b! @% \; b$Title A Investment Problem 6 `0 p, g0 d. W% s$ P8 ?$ontext ; q. b# p* y2 T7 z& U6 Y3 |' x/ Rthis problem finds a optimized investment that meets( P/ ]; u) z h* ?$ G! m3 O; S. A
requirements in the city 1 [" j- W+ p8 ]; |$offtext , p0 o$ R: Y# |) M. W% l) aSets + l# X: z+ b0 q i power plants /plant-1, plant-2, plant-3, plant-4/4 n0 y1 z$ E! T) x5 S8 W
j operating mode /mode-1, mode-2, mode-3/; 6 n* H, h5 `8 B# ]* D& d* YParameters; P) {/ k7 c( f r# W# z
c(i) the unit installed capacity of power plant i in cases 1 s6 X' P0 a2 h: Z /plant-1 10$ t4 h; ^ b3 l# n
plant-2 7 # P/ o; p7 y+ D4 p; A1 ~$ q% a plant-3 16 x5 G8 u- h* f- p
plant-4 6/ 2 X2 N5 N5 G2 K- P d(j) the electricity demand for power plant i in cases( g3 F, T0 w/ |8 s/ e5 [
/mode-1 3 " z' ?0 N$ o4 L& p8 Q mode-2 3 & s8 d# V. D4 z) p4 N mode-3 2/;+ t. h, J( L; d/ r4 R# k- T
Table f(i,j) the unit operating cost of each power plant5 f D5 A: e5 \- l0 y, @
mode-1 mode-2 mode-3 ; z: J; _4 a* L) P9 Z: F5 u plant-1 0.4 0.24 0.04" C% w, `5 R$ t
plant-2 0.45 0.27 0.045; ?; F- t0 R: C+ U# x* P* |
plant-3 0.32 0.192 0.032 ! Z, d H/ p) N2 V ^ plant-4 0.55 0.33 0.055;0 C1 z6 A/ x& c' c2 i
Scalar m the minimum total installed capacity of the four power plant /12/ 4 ?, Q$ d3 i, A8 H/ w, E. ]+ g b the minimum tatal investment budget of the four power plant /120/; 4 r: r0 q3 l% Q- BVariables # j! h1 M ^! n& X( a2 [1 m, T x(i) the installed capacity of the i power plant in cases: i) r7 X' E4 S
y(i,j) the operating lever of the i power plant under the j operating mode 8 X3 r4 d( k x% B2 Z' H5 Q; g1 t$ l$ k z the total cost of the four power plant; % D# Y8 [' f! Y1 k4 ?Positive Variable x; 5 ^$ D8 A% w2 L. a3 A5 c3 wEquations& T0 d" t$ m. \) V3 O; i
cost define objective function 6 B% _% C, \* H% ] capacity1(i) observe total capacity linmit at plant i - P$ x2 @6 x. @' W, m budget(i) observe total investment budget limit at plant i . b+ \& h9 O9 `: L. N capacity2(i) observe installed capacity for each power plant/ y4 n! u- h: y: K3 G+ b- l& u
demand(i) satisfy the electricity demand under each operating mode;3 f+ s) K5 _& t C- R
cost.. z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j));7 [" M+ H7 z9 e3 l, U: |
capacity1(i).. sum(i,x(i)) =g= m; 8 e; |. P& b+ f& p Jbudget(i).. sum(i,c(i)*x(i)) =l= b;; z6 L- r3 L- y$ }
capacity2(j).. sum(j,y(i,j)) =l= x(i); 3 B- V- U; m0 @4 L+ c# g8 Pdemand(i).. sum(i,y(i,j)) =g= d(j); ' W( T2 K! M7 w8 FModel investment /all/;" S. l/ D5 @4 W! Z% N, ~$ P/ B- b
Solve investment using lp minimizing z;* @- a; ]6 n; D0 @) Z, r
Display y.l, y.m;. X2 [9 R3 `8 ? X% V. G% i1 X' j" c