Hello,
I'm doing a policy optimization with VENSIM. My problem has many optima (as discussed here: viewtopic.php?f=2&t=7218), so I use RRandom multiple start.
When I track the "best payoff so far" on the screen, I see that it generally converges around 600000 simulations.
1. Is there a way to automatically stop the optimization, if the best payoff does not converge after, let's say, x simulations? If yes, how?
2. My aim is to compare the optimization results, by changing the weights that I use in the payoff function. Is it possible to automatize this process? I want it to stop when the best payoff does not change, change the weight in the model and then rerun the optimization automatically. Is it possible?
Thank you
Automatizing optimization

 Super Administrator
 Posts: 3553
 Joined: Wed Mar 05, 2003 3:10 am
Re: Automatizing optimization
I cannot think of a way of doing either of these. You could change the weights using some custom code, but that would require programming. For example, create the VPD file using something like VBA. Run the optimization using this VPD, manually stop it, and then write a new VPD before running again. You would still need the manual step of stopping the optimization though, so not sure this really helps much.
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/magazine27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
Re: Automatizing optimization
The weights can be model variables, so you wouldn't have to mess around with editing the vpd  you could just change the weights via SETVAL.
/*
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: Automatizing optimization
Convergence is a difficult notion for random multistart  it's more like "failure to improve." You could simply limit the number of restarts  there's a parameter for that in the voc.
/*
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: Automatizing optimization
Hi
One solution could be to run multiple optimizations, using as starting value of the parameters to optimize the results of the preceding optimizations and to limit the number of simulations of the optimizations, all this in VBA for instance using the DLL. You could stop when the results do not progress anymore. Another solution that is worth thinking about is to create one’s own optimization to have full control on the process, the computer does not think!
JJ
One solution could be to run multiple optimizations, using as starting value of the parameters to optimize the results of the preceding optimizations and to limit the number of simulations of the optimizations, all this in VBA for instance using the DLL. You could stop when the results do not progress anymore. Another solution that is worth thinking about is to create one’s own optimization to have full control on the process, the computer does not think!
JJ
Re: Automatizing optimization
Thank you all for the answers!