Output difference between model and dll

Use this forum to post Vensim related questions.
Post Reply
Phill
Senior Member
Posts: 156
Joined: Wed Jun 04, 2014 2:18 pm
Vensim version: DSS

Output difference between model and dll

Post 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 1724 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 1724 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 1724 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
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Output difference between model and dll

Post 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)?
Phill
Senior Member
Posts: 156
Joined: Wed Jun 04, 2014 2:18 pm
Vensim version: DSS

Re: Output difference between model and dll

Post 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.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Output difference between model and dll

Post by Administrator »

Can you email us about this? I'll need to run the model through the debugger to figure out what is wrong.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply