Page 1 of 1

Output difference between model and dll

Posted: Fri Nov 12, 2021 12:32 pm
by Phill
Hello,
This is one of those scratch-the-head problems and it has been keeping me up for a few nights!

I have a model which outputs revenue figures for sales on a per week and a cumulative basis. When I run the MDL or VPMX files locally in Vensim, the outputs are fine. Here is an example, where the variable 'Total premium direct revenue' holds the weekly sales result and 'Cum premium site revenue' holds the cumulative results. There is only one sale, in t=4, and both variables hold the correct result
Model output 1.png
Model output 1.png (8.18 KiB) Viewed 3187 times
When I run exactly the same model online, on a web server running the Vensim DLL, and make exactly the same decisions, the cumulative figure has been doubled,
DLL output 1.png
DLL output 1.png (6.46 KiB) Viewed 3187 times
There are no other variables involved in the calculations, the online model should just be displaying the values held in those variables.

But if I run the online copy on one more week, the cumulative variable now displays the correct result; in this example, it has dropped from the incorrect figure of '$13000' to the correct value of $6500'
DLL output 2.png
DLL output 2.png (6.31 KiB) Viewed 3187 times
All that the DLL should be doing is to display the variable values from the model. In the local model, those values are all correct at each time step, so what can cause the DLL to display a different result?

Phill

Re: Output difference between model and dll

Posted: Fri Nov 12, 2021 1:42 pm
by tomfid
Strange.

Just to narrow things down a bit, is this a normal run, or gaming mode? Are they on the same platform (i.e. Windows) or mixed (Win/Linux)?

Re: Output difference between model and dll

Posted: Fri Nov 12, 2021 1:58 pm
by Phill
This is in gaming mode and it is mixed, the local copy of Vensim runs under Windows, the DLL is on a Unix server. But the local copy (under Windows) outputs correct results in any mode, it's only on the server that the problem appears.

Re: Output difference between model and dll

Posted: Sat Nov 13, 2021 8:24 am
by Administrator
Can you email us about this? I'll need to run the model through the debugger to figure out what is wrong.