Stopping random multiple start optimization using excel vbs

Use this forum to post Vensim related questions.
Post Reply
sgary
Junior Member
Posts: 4
Joined: Wed Oct 27, 2010 11:52 am

Stopping random multiple start optimization using excel vbs

Post by sgary »

Hi All,
I am using calibration optimization to estimate the best fitting parameters for a large number of different data sets (e.g., over 200 different products/brands). I have automated the process of optimizing for each data set by using the Vensim.dll called from VBS via Excel to loop over the data sets.

Everything is working perfectly apart from one thing. I cannot figure out how to stop each optimization when using Multiple Start: Random.

Is there a way to set a maximum number of starts/runs from vensim.dll? Or a max time limit? Alternatively, does anyone know if it is possible to include a count or timer in Excel VBS that would stop the optimization and continue cleanly to the next data set in the loop?

Any other suggestions? Thanks for your help!

Best, Shayne

[Edited on 10-27-2010 by sgary]
tomfid
Administrator
Posts: 4016
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

I don't recall a way to force a stop, but you can set the #restart option in the .voc file, so Vensim will at least terminate the optimization after a few restarts.
sgary
Junior Member
Posts: 4
Joined: Wed Oct 27, 2010 11:52 am

Post by sgary »

Thanks Tom! This does exactly what I need. I was not aware of this setting option in the vensim optimization control file. Not sure how I missed it.

Best,
Shayne
Post Reply