Debugging why model not simulated correctly #557
-
|
Hi, Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
|
Hi @hazhirr, I'm happy to see that you're trying out SDEverywhere! Can you attach a zip file with some more files from your project? It doesn't need to be the whole thing, just the We have an internal tool for diagnosing these sorts of discrepancies, which helps one pinpoint where differences begin to occur between two runs (Vensim and SDE, or any combination). I'm in the middle of porting it over to the SDEverywhere repo (as part of the model-check tool) so that it can be used more easily by anyone. It's not quite ready yet, but your model/project will be a good test, and it will be good motivation to help me finish that up. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks so much Chris! Here is the file with config folder and js file
(attachment was not allowed, so dropbox link here):
https://www.dropbox.com/scl/fi/t7606rdrighn0a4wtg1dv/ModelAndConfig.zip?rlkey=1wbqgclcu1c4lvk8vus832ztq&dl=0
Great to hear that you have a tool to help identify these and hopefully
that can be shared with the community soon (though I am certainly not an
advanced user or an informed coder).
best,
hazhir
…On Thu, Oct 24, 2024 at 2:34 PM Chris Campbell ***@***.***> wrote:
Hi @hazhirr <https://github.com/hazhirr>, I'm happy to see that you're
trying out SDEverywhere! Can you attach a zip file with some more files
from your project? It doesn't need to be the whole thing, just the config
folder and the sde.config.js file would be enough to help me investigate.
We have an internal tool for diagnosing these sorts of discrepancies,
which helps one pinpoint where differences begin to occur between two runs
(Vensim and SDE, or any combination). I'm in the middle of porting it over
to the SDEverywhere repo (as part of the model-check tool) so that it can
be used more easily by anyone. It's not quite ready yet, but your
model/project will be a good test, and it will be good motivation to help
me finish that up.
—
Reply to this email directly, view it on GitHub
<#557 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AORHR5RPNBK7YBAYV4BP3E3Z5E4R3AVCNFSM6AAAAABQRLLENSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMBUGQZTIMA>
.
You are receiving this because you were mentioned.Message ID:
<climateinteractive/SDEverywhere/repo-discussions/557/comments/11044340@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @hazhirr, I'm sorry that it took so long to work through these issues , but I'm happy to report that I have identified all the issues affecting your v05 model, and I have fixes in place on branches. I haven't merged the fixes to the In the course of fixing the issues, I greatly increased our test coverage around cases involving different combinations and amounts of subscripts/dimensions and also around cases involving For the record, here are the relevant issues in the
The first four have been fully fixed and require no changes or workarounds in your v05 model. The last one is a case of ambiguous behavior, so for that one I suggest the following edits to your mdl: diff --git a/SimpleCity-V05.mdl b/SimpleCity-V05.mdl
index b894606..d7a2e91 100644
--- a/SimpleCity-V05.mdl
+++ b/SimpleCity-V05.mdl
@@ -637,7 +637,7 @@ Max Feasible consumption[Edu]=
~ |
Medu[Edu,Edu2]= INITIAL(
- exp(-Dedu[Edu,Edu2]^2/2/Education Mixing^2))
+ exp(-(Dedu[Edu,Edu2]^2)/2/Education Mixing^2))
~ dmnl
~ |
@@ -2005,8 +2005,7 @@ INITIAL TIME = 0
~ The initial time for the simulation.
|
-SAVEPER =
- TIME STEP
+SAVEPER = 1
~ Year [0,?]
~ The frequency with which output is stored.
|There are two changes here:
To update your project to use the pre-release build, change one line in your diff --git a/package.json b/package.json
index b87e16a..d2a2d64 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"dependencies": {
"@sdeverywhere/build": "^0.3.4",
"@sdeverywhere/check-core": "^0.1.2",
- "@sdeverywhere/cli": "^0.7.23",
+ "@sdeverywhere/cli": "climateinteractive/gitpkg-registry-public#sde-cli-069f3e8",
"@sdeverywhere/plugin-check": "^0.3.5",
"@sdeverywhere/plugin-config": "^0.2.4",
"@sdeverywhere/plugin-vite": "^0.1.8",Then run The graph from your example configuration now looks correct: There are still some very slight (around 0.0001) differences in output as compared to Vensim. Most of the time SDEverywhere produces even closer results to Vensim, except in the case of Please let me know if you run into any issues with the above information, or have any questions. My next steps are:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks so much Chris! Really appreciate the updates and looking forward to trying them on my model. |
Beta Was this translation helpful? Give feedback.




Hi @hazhirr, I'm sorry that it took so long to work through these issues , but I'm happy to report that I have identified all the issues affecting your v05 model, and I have fixes in place on branches. I haven't merged the fixes to the
mainbranch or published new packages yet because I want to run them by Todd for a review and I have a few more tests to add. But I do have a pre-release package that contains all the fixes rolled into one for you to try in the meantime (more on that below).In the course of fixing the issues, I greatly increased our test coverage around cases involving different combinations and amounts of subscripts/dimensions and also around cases involving
ALLOCATE AVAI…