-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP support for DualNumbers SCC calculations #31
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
=========================================
- Coverage 78.58% 76.48% -2.1%
=========================================
Files 39 39
Lines 892 923 +31
=========================================
+ Hits 701 706 +5
- Misses 191 217 +26
Continue to review full report at Codecov.
|
The negative numbers are correct (higher consumption still increases welfare). The trick is to normalize the marginal SCC estimate you get from the
I believe we want to make this
Maybe just set the parameter to a vector of |
So would it be:
I have to admit I don't understand why, but we can discuss later!
The problem is that the emissions vector is calculated endogenously in the emissions component, and that gets passed to the co2 cycle component, so the pulse has to be added in between. |
I think yes.
Can't we use the |
I think DualNumbers magically works, just like you anticipated! (pending on the one small change in Mimi here: mimiframework/Mimi.jl#544)
I started trying to do this with the welfare component for FUND that you started here #21, but I wasn't sure about the units or why the welfare values were negative, so instead I branched off master and added a
Discounting
component. This component calculates discountedloss
in each year, and sums the discounted values in the final timestep for total discounted damages (to use for SCC calcualtion).Using DualNumbers, the "pulse" component (currently defined in "new_marginaldamages.jl") now just adds a
Dual(0, pulse_size)
in the desired year to emissions.Not yet implemented:
eta
values (should be added to the Discounting component)Design questions:
number_type
keyword toget_model
where the user has to specify the actual DataType, such asDual{Float64}
. Alternatively, we could haveget_model
support various symboltype
keywords for returning different types of MimiFUND models, such astype = :default
ortype = :dual
compute_scco2_dual
andadd_marginal_emissions_dual!
functions, but these could be incorporated into the existing functions where we could do more sophisticated type checking