* GAMS formulation for 1.731 Problem Set #4: Groundwater Management * 12 Oct 2006 $offlisting $offsymxref $offsymlist option limrow=0 limcol=0 ; set i well index / 1*4 / alias(i,j) ; table response(i,j) "Response matrix" 1 2 3 4 1 2000 600 300 200 2 600 3000 500 400 3 300 500 1500 500 4 200 400 500 2000 ; scalars a revenue coef1 /4e8/ b revenue coef2 /0.01/ e efficiency /5650.56/ ; variables f Net benefit ; positive variables y(i) Well pumping lift in m q(i) Well pumping rate in m^3sec^-1 r revenue c cost ; *initialize decision variables q.l(i) = 0.001 ; y.l(i) = 10 ; equations qbound(i) 'upper bound on q' ybound(i) 'upper bound on y' lifteq(i) 'response matrix eq. for lift' revenue 'revenue' cost 'cost' obj 'net benefit' ; qbound(i).. q(i) =L= b/2 ; ybound(i).. y(i) =L= 30 ; lifteq(i).. y(i) =E= sum(j, response(i,j)*q(j)) ; revenue.. r =E= sum(i, a*q(i)*(b-q(i))) ; cost.. c =E= sum(i, e*q(i)*y(i)) ; obj.. f =E= r - c ; model gwmanage /all/ ; solve gwmanage maximizing F using nlp ; ;