You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code below, I create a model with the default parameters and optimize for the 3C goal, but the result is a 0.8C policy, according to T_adapt, and a 1.6C policy according to T:
julia>import ClimateMARGO
julia>using ClimateMARGO.Models
julia>using ClimateMARGO.Optimization
julia>using ClimateMARGO.Diagnostics
julia> model_parameters =deepcopy(ClimateMARGO.IO.included_configurations["default"])
julia> model =ClimateModel(model_parameters)
julia> opt =optimize_controls!(model; temp_goal=3, temp_final=3)
Solve_Succeeded
A JuMP Model
Minimization problem with:
Variables:365
Objective function type: Nonlinear
`JuMP.GenericAffExpr{Float64,JuMP.VariableRef}`-in-`MathOptInterface.EqualTo{Float64}`: 180 constraints
`JuMP.VariableRef`-in-`MathOptInterface.EqualTo{Float64}`: 3 constraints
`JuMP.VariableRef`-in-`MathOptInterface.GreaterThan{Float64}`: 288 constraints
`JuMP.VariableRef`-in-`MathOptInterface.LessThan{Float64}`: 288 constraints
Nonlinear:74 constraints
Model mode: AUTOMATIC
CachingOptimizer state: ATTACHED_OPTIMIZER
Solver name: Ipopt
Names registered in the model: A, G, M, R, cumsum_KFdt, cumsum_qMR, dAdt, dGdt, dMdt, dRdt
julia>T_adapt(model; M=true, R=true, G=true, A=true)
37-element Array{Float64,1}:1.1843374409423640.7875379068219340.74774341853986010.78714789450912670.81924167701501880.85080194295564180.88127622381414690.91012927842789450.93684159929533210.960907266988229⋮0.86499054942616930.85662180412825460.84859502612462180.8411053365957430.83438429745432560.82870487266678890.82438680084496230.82180232890156060.8213822139183088
julia>T(model; M=true, R=true, G=true)
37-element Array{Float64,1}:1.20835518421227681.01667933660043990.99885271413287151.0615580955832361.11810301783874191.17509490194125221.2318259548512271.2876205841369421.34183380457684451.3938485321754022⋮1.65525591155939991.65149339598885651.64797748833953241.64490528394659271.642510278007971.6410673277519321.64089802585735581.6423764349206211.64593509011836
Changing temp_goal and temp_final to 1.5C gives a 0.7C policy according to T_adapt, and a 1.4999C policy according to T. But it should actually be >1.5 without adaptation, not ==1.5.
julia> opt2 =optimize_controls!(model; temp_goal=1.5, temp_final=1.5)
Solve_Succeeded
A JuMP Model
Minimization problem with:
Variables:365
Objective function type: Nonlinear
`JuMP.GenericAffExpr{Float64,JuMP.VariableRef}`-in-`MathOptInterface.EqualTo{Float64}`: 180 constraints
`JuMP.VariableRef`-in-`MathOptInterface.EqualTo{Float64}`: 3 constraints
`JuMP.VariableRef`-in-`MathOptInterface.GreaterThan{Float64}`: 288 constraints
`JuMP.VariableRef`-in-`MathOptInterface.LessThan{Float64}`: 288 constraints
Nonlinear:74 constraints
Model mode: AUTOMATIC
CachingOptimizer state: ATTACHED_OPTIMIZER
Solver name: Ipopt
Names registered in the model: A, G, M, R, cumsum_KFdt, cumsum_qMR, dAdt, dGdt, dMdt, dRdt
julia>T_adapt(model; M=true, R=true, G=true, A=true)
37-element Array{Float64,1}:1.1843374409423640.8056309397853050.76028228982778610.80076311780632540.83190180117591270.86183196423373960.89032254013996250.91677959737500410.94061504926847330.9612422531339633⋮0.77313643594452960.76889975381314820.7647507786245860.76068769300427050.75670871559994120.75281210082154140.74899615268708180.74525924490225450.7415997212435734
julia>T(model2; M=true, R=true, G=true)
37-element Array{Float64,1}:1.20835518421227681.01638869881442550.99124546598375681.05315780299709851.10678594811228861.16010738902617461.21274819582802951.26398534589948321.31311534173806191.359449294655356⋮1.50000000192005881.49999999866360831.4999999935153571.49999998487197631.4999999695618781.4999999433633161.499999915612351.49999993002877981.4999999658301584
Tested on the master branch
The text was updated successfully, but these errors were encountered:
In the code below, I create a model with the default parameters and optimize for the 3C goal, but the result is a 0.8C policy, according to
T_adapt
, and a 1.6C policy according toT
:Changing
temp_goal
andtemp_final
to1.5C
gives a 0.7C policy according toT_adapt
, and a 1.4999C policy according toT
. But it should actually be >1.5 without adaptation, not ==1.5.Tested on the master branch
The text was updated successfully, but these errors were encountered: