# DICE2016 Julia implementation

**URL:** <https://forum.mimiframework.org/t/dice2016-julia-implementation/75>\
**Category:** Uncategorized\
**Created:** [July 5, 2019, 1:48am UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75 "2019-07-05T01:48:34Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![davidanthoff](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/davidanthoff/32/5_2.png) [@davidanthoff](https://forum.mimiframework.org/u/davidanthoff)\
**Post date:** [October 6, 2020, 10:24pm UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75/21 "2020-10-06T22:24:21Z")

</div>

> [@daler6](#):
>
> I have access to a GAMS license, so I could run GAMS versions of DICE2016R and DICE2016R2 and provide the variables you need. Just let me know what you need.

That would be awesome! I’m so swamped this semester with other stuff that I won’t be able to engage on this, though. Either we wait until Jan, when I will have a lot more time and would love to try to sort this out together, or maybe someone else from our Mimi team could help coordinate this? @ckingdon95 or @lrennels?

> [@daler6](#):
>
> I found @AlexandrePavlov’s GitHub Respository for MimiDICE2016, but it does not appear in the Mimi registry, so I have been unable to install it in my system. Perhaps there is another way, or perhaps it is not considered quite ready yet.

You should be able to install it via `pkg> add https://github.com/AlexandrePavlov/MimiDICE2016.jl`, and that should generally work for packages that are not registered in any registry. Having said that, we should also add it to our registry, really…

> [@daler6](#):
>
> In going back through the Mimi tutorials and MimiDICE2010 and MimiDICE2013, it does not appear that Mimi is actually doing any optimization. Am I missing something?

We have used both [GitHub - JuliaOpt/NLopt.jl: Package to call the NLopt nonlinear-optimization library from the Julia language](https://github.com/JuliaOpt/NLopt.jl) and [GitHub - robertfeldt/BlackBoxOptim.jl: Black-box optimization for Julia](https://github.com/robertfeldt/BlackBoxOptim.jl) with Mimi models, but one has to link things up manually in that case. There is also [GitHub - jrising/OptiMimi.jl: Optimization for the Mimi.jl modeling framework](https://github.com/jrising/OptiMimi.jl) that @jrising wrote. I’m not entirely sure whether that works with Mimi v1 at the moment, but that should make for a much easier optimization story for Mimi models.

---

<div class="post-metadata">

**Author:** ![MalinW](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@MalinW](https://forum.mimiframework.org/u/MalinW)\
**Post date:** [March 23, 2021, 9:55am UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75/22 "2021-03-23T09:55:27Z")

</div>

Hey there, I am really glad that there is a MimiDICE implementation. I just wanted to ask if there is progress on confirming the results with GAMS?  
Thanks a lot in advance!

---

<div class="post-metadata">

**Author:** ![lrennels](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/lrennels/32/6_2.png) [@lrennels](https://forum.mimiframework.org/u/lrennels)\
**Post date:** [March 24, 2021, 11:17pm UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75/23 "2021-03-24T23:17:04Z")

</div>

Hi @MalinW,

DICE2016R is fully validated against the Excel version. The differences between DICE2016R and 2016R2, and DICE2016R2 fully, is described in

_Nordhaus, William. 2018. “Projections and Uncertainties about Climate Change in an Era of Minimal Climate Policies.” American Economic Journal: Economic Policy, 10 (3): 333-60._

and (I believe) states that the only difference between versions is in the damage function parameter alpha:

_D\_t = alpha ∙ T\_t^2 where D\_t is damage costs, fraction of GWP lost._

_In DICE2016-R1, alpha = 0.00236_  
_In DICE2016-R2, alpha = 0.00227_

To that end, we validated our version of DICE2016R2 against the DICE2016 Excel model with an updated parameter and the results match … **however we are still working on validation against GAMS which as of now is not passing.**

Let me know if you have any questions, I will put this is on my priority list to work on soon.

---

<div class="post-metadata">

**Author:** ![MalinW](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@MalinW](https://forum.mimiframework.org/u/MalinW)\
**Post date:** [March 25, 2021, 10:41am UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75/24 "2021-03-25T10:41:39Z")

</div>

@lrennels, Thanks a lot for the quick reply!  
Yes, I also found that in the paper and already updated the coefficient (called a2 in the model implentation).

I have another question that was raised here before by @daler6: there is no optimization done in the Mimi Framework? Do the Mimi DICE/RICE models (that are built on intertemporal optimization) just try to replicate the time path of the optimized time path in GAMS? But if I update a parameter then, the result would not be an intertemporally optimized time path? I am a bit confused about that and did not see anything on optimization in the tutorials.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/davidanthoff/32/5_2.png) [@davidanthoff](https://forum.mimiframework.org/u/davidanthoff)\
**Post date:** [March 26, 2021, 1:47am UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75/25 "2021-03-26T01:47:24Z")

</div>

Correct, there is no optimization out-of-the box in Mimi or our implementation of these models. The variables that are normally considered choice variables in DICE (savings rate and emission control rate) are just another set of input parameters in the Mimi version, and you can run the model with time series for these that are exogenous, and then they might be optimal or not.

You _can_ use any of the many optimization packages in the Julia ecosystem that does optimization to find an optimal combination of savings and mitigation rates with DICE, and in fact that is something we’ve done many times for papers. I’m not sure right now whether any of those is published, at which point we can point you to the replication code on how we did that, but I know of at least one that should be out very soon that should have an example of how we did that.

There is also the OptiMimi.jl package that might make it easier to do what I’ve just described in the previous paragraph. In our papers we just coded the optimization manually, but that might actually be more work than necessary if we had just used OptiMimi.jl 🙂

---

<div class="post-metadata">

**Author:** ![MalinW](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@MalinW](https://forum.mimiframework.org/u/MalinW)\
**Post date:** [March 26, 2021, 4:23pm UTC](https://forum.mimiframework.org/t/dice2016-julia-implementation/75/26 "2021-03-26T16:23:23Z")

</div>

Hi @davidanthoff, thanks a lot for the fast answer! Then I will try that ;).

[Previous page](https://forum.mimiframework.org/t/dice2016-julia-implementation/75.md?page=1)
