非常感谢亲!!请各位一定帮帮忙!!学期作业啊!!!( [. U* [) H& v8 ~4 N2 |7 Q9 L7 b
我把程序贴在这,/ {0 r2 D! n, h* E6 U S s
$Title A Investment Problem6 X$ U+ p$ c: E) u0 N7 o
$ontext1 O1 j+ w- F/ E# C& }$ H$ H( r
this problem finds a optimized investment that meets; M! H4 i" Q, i
requirements in the city3 a& g6 e4 @! |) c+ w$ u
$offtext3 k' k+ S6 ~' i5 X! g9 Z7 N6 P
Sets; M$ y/ r4 f8 T# g! b
i power plants /plant-1, plant-2, plant-3, plant-4/ 0 J/ q: i4 S& j c4 n j operating mode /mode-1, mode-2, mode-3/; ' h0 t: L6 q. W2 ?3 XParameters - p$ W5 A4 V) ^ {' \5 B c(i) the unit installed capacity of power plant i in cases ! }6 _# A% }- `2 u /plant-1 10 2 I/ P2 k- ^6 q- J1 l& P plant-2 7 , _, Q. v7 W! f6 O7 }: d plant-3 16 8 |4 q5 N1 h4 L }6 c/ h/ k: e plant-4 6/9 _* B% b3 c+ }# ]7 s$ G+ @
d(j) the electricity demand for power plant i in cases ( ^% A0 @0 z3 I* x' t, w /mode-1 3# B4 D6 I6 n3 b& ?9 k
mode-2 3 5 f Z% p3 V I2 X& c mode-3 2/;5 l$ g [$ m/ N9 o: {
Table f(i,j) the unit operating cost of each power plant 8 ^& N" ^) c1 i, W! l( d& d8 l mode-1 mode-2 mode-3 # j+ W" u [) i% o n# n7 l4 ^ plant-1 0.4 0.24 0.04% s; K5 a/ B, M" j3 r5 I3 N
plant-2 0.45 0.27 0.045 ' d5 W( |3 P& K plant-3 0.32 0.192 0.032 - k( G2 ?6 T. ~- h4 j5 S' T8 ^: ` plant-4 0.55 0.33 0.055; 2 v. N- B- |- r" tScalar m the minimum total installed capacity of the four power plant /12/ + N* u: a2 H: ~4 k b the minimum tatal investment budget of the four power plant /120/; ( j) ?2 u" q9 x6 ~7 dVariables $ W) b2 i" f1 h" |" C7 M x(i) the installed capacity of the i power plant in cases , Y4 I* i0 l/ |' m' W$ U9 Y3 K! W y(i,j) the operating lever of the i power plant under the j operating mode: Q6 ^- ?' H4 @! {
z the total cost of the four power plant;! w1 r0 h1 O2 }) [, y
Positive Variable x; . v3 C' l" E. W# {* [( M7 f& D+ kEquations& c. f9 a" A3 c( m4 N
cost define objective function 4 S* D+ {) [. b1 @. I+ | capacity1(i) observe total capacity linmit at plant i & k J5 t9 e9 ^( E) k budget(i) observe total investment budget limit at plant i ; m. A0 C r& C% n: K9 v capacity2(i) observe installed capacity for each power plant- u$ Z! M/ V9 t- H8 z( C U
demand(i) satisfy the electricity demand under each operating mode; 4 J4 J9 b3 n* C* Y: z0 L% Tcost.. z =e= sum(i,c(i)*x(i))+sum((i,j),f(i,j)*y(i,j)); 5 R j8 r: h$ d/ _) ~capacity1(i).. sum(i,x(i)) =g= m;! Q! j0 ^2 Q: G" A
budget(i).. sum(i,c(i)*x(i)) =l= b;3 N/ Q; ~% a( o( j( S
capacity2(j).. sum(j,y(i,j)) =l= x(i); ; K8 J: i: k+ x3 zdemand(i).. sum(i,y(i,j)) =g= d(j); % c3 L$ g7 J0 ]' d; RModel investment /all/;" ^ v+ d+ t' R$ u, n
Solve investment using lp minimizing z;1 @* e/ j2 B* F
Display y.l, y.m;: k0 j9 @; Q$ c" h1 A