Hi,
I'd like to run a Command file with a package (vpm) containing a Compiled model.
As I usually have the Compilation option set to Interpret (https://vensim.com/documentation/index. ... ptions.htm), I wanted to save the "Compile" option within the package, so that the Command File alway runs with the compiled model.
I saw in the vensim.ini file the parameter "compile_options=0,0,0,,". When I set Compilation to "Compile", the parameter becomes "compile_options=2,2,2,,"
Can I include the ini file with "compile_options=2,2,2,," in the package, so that it temporarly overwrites my usual "compile_options=0,0,0,," ?
Many thanks
Command script and Compiled simulation
Re: Command script and Compiled simulation
That won't work, because it would require the user to compile, which is unpredictable. What you need to do is run the model compiled on your machine, and include the resulting sim.dll files in the package. There are two versions - one for synthesim, and one for ordinary simulations. They have to match the saved version of the model.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Command script and Compiled simulation
So, whatever is the setting in the user's Computaion tab, I just need to include the mymodel_sim.dll with the mymodel.vmf in the mymodel.vpm package?
I do it already but it doesn't seem to work. I thought it was a matter of settings.
I do it already but it doesn't seem to work. I thought it was a matter of settings.
Re: Command script and Compiled simulation
Right. The versions have to match exactly, so you should run a fresh compiled sim immediately after saving the vmf; if the model is newer than the .dll, it won't be used.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/