Page 1 of 1

Automatizing optimization

Posted: Wed Oct 23, 2019 1:50 pm
by portak
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

Re: Automatizing optimization

Posted: Wed Oct 23, 2019 1:54 pm
by Administrator
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.

Re: Automatizing optimization

Posted: Wed Oct 23, 2019 2:07 pm
by tomfid
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.

Re: Automatizing optimization

Posted: Wed Oct 23, 2019 2:51 pm
by tomfid
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.

Re: Automatizing optimization

Posted: Wed Oct 23, 2019 5:19 pm
by LAUJJL
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

Re: Automatizing optimization

Posted: Thu Oct 24, 2019 10:18 am
by portak
Thank you all for the answers!