# ICE Project: "An Optimal Rule of Thumb for Pollution Permits Allocation" # by Mar Reguant and Eva Dardati # August, 2008 # # Questions or comments to mreguant@mit.edu # # References: Please, have a look at Sven Leyffer, Todd Munson and Karl Schmedders tutorials # Model based on "Cournot Game with Learning and Investment" in K. Schmedders slides and # "Incorporating oligopoly, CO2 emissions trading and green certificates into a # power generation expansion model" by Pedro Linares et al, Automatica. reset; #option log_file "planner_knitro.log"; # KNITRO model planner_knitro.mod; option solver knitroampl; fix rho := 1.5; solve; unfix rho; solve; display rho; display W[10,10]; # PRINTING # printf "" > q.out; # printf "" > x.out; # printf "" > Pi.out; # for{i in firms, (v,w) in states} { # printf "%d , %d , %d , %f \n", i, v, w, q[i,v,w] >> q.out; # printf "%d , %d , %d , %f \n", i, v, w, x[i,v,w] >> x.out; # printf "%d , %d , %d , %f \n", i, v, w, Pi[i,v,w] >> Pi.out; # } # GRID EVALUATION OF WELFARE FUNCTION # set eval := 1 .. 60; # param Wrule{eval}; # for {m in eval} { # fix rho := m*0.05; # solve; # let Wrule[m] := W[10,10]; # } # display Wrule; # printf "" > Wrule.out; # for{m in eval} { # printf "%f , %f \n", m*0.05, Wrule[m] >> Wrule.out; # } # CHECKING SOC CONDITIONS # We already know they hold for q # For x: # var d2Pr{i in firms, (v,w) in states, t in transitions} = # (if t = -1 then 2*(theta[i,v,w]-2)*(theta[i,v,w]^2)/(theta[i,v,w]*x[i,v,w]-theta[i,v,w]+2)^3) + # (if t = 0 then 2*(theta[i,v,w]^2)/(theta[i,v,w]*x[i,v,w]-theta[i,v,w]+2)^3) + # (if t = 1 then 2*(1-theta[i,v,w])*(theta[i,v,w]^2)/(theta[i,v,w]*x[i,v,w]-theta[i,v,w]+2)^3) ; # var soc{i in firms, (v,w) in states} = # -2*d + delta*sum{t in transitions, k in transitions} d2Pr[i,v,w,t]*Pr[nextw(i),w,v,k]*V[i,v + t,w + k]; # display soc;