As you know, we have a mature and sophisticated Vensim model, the Energy Policy Simulator. Most of the variables in the model are subscripted in various ways. For example, some existing variables use the following three subscripts:
Code: Select all
[Industry Category, Industry Process Emissions Policy, Marginal Abatement Cost]
I am worried that perhaps we are running into some limit in Vensim on how many variables or fields can be addressed in memory. But my computer's RAM isn't the issue. When I load the Energy Policy Simulator in Vensim and check Vensim's memory use in Task Manager, it is using only 5.5 MB:
When Vensim has crashed, the memory use jumps to 38.6 MB, which is a lot more than before, but is still a tiny fraction of my system's available memory:
I've tested this in Vensim DSS v7.1 (32-bit) and Vensim DSS v7.3.5 (32-bit), and the crash happens in both cases. I don't have a 64-bit version of Vensim to test with.
If you want to test this bug yourself, simply download a copy of the Energy Policy Simulator (eps-1.4.2-us-v2) from https://us.energypolicy.solutions/eps-a ... -us-v2.zip
First, open it in Vensim DSS and click "Simulate." It should run without an error (though you may see initial value warnings).
Then, add a variable to the model like the following:
Code: Select all
Test Variable[Industry Category,Industry Process Emissions Policy,Marginal Abatement Cost]=
0
~ Dmnl
~ |
Note that the model runs if the new "Test Variable" uses any two of the three subscripts above. It only causes a crash if the Test Variable uses all three subscripts.
If you want to see an example of an existing variable that uses these three subscripts, you can look at any of these:
Code: Select all
PERAC Mass CO2e Avoidable by Marginal Cost
Reduction in Process CO2e Left to Assign after this Marginal Cost
Reduction Achieved by Marginal Cost
Do you know why we can't add another variable to the model using these subscripts without causing it to crash? What options do we have, if we want to continue adding variables to this model without causing it to crash?