Output difference between model and dll
Posted: Fri Nov 12, 2021 12:32 pm
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
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,
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'
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
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
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,
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'
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