Command script and Compiled simulation

Use this forum to post Vensim related questions.
Post Reply
apix
Senior Member
Posts: 64
Joined: Wed Mar 16, 2011 3:31 pm

Command script and Compiled simulation

Post by apix »

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

Re: Command script and Compiled simulation

Post by tomfid »

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.
apix
Senior Member
Posts: 64
Joined: Wed Mar 16, 2011 3:31 pm

Re: Command script and Compiled simulation

Post by apix »

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

Re: Command script and Compiled simulation

Post by tomfid »

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.
Post Reply