Automatizing optimization

Use this forum to post Vensim related questions.
Post Reply
portak
Junior Member
Posts: 15
Joined: Fri Dec 07, 2018 2:43 pm
Vensim version: DSS

Automatizing optimization

Post by portak » Wed Oct 23, 2019 1:50 pm

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

Administrator
Super Administrator
Posts: 3384
Joined: Wed Mar 05, 2003 3:10 am

Re: Automatizing optimization

Post by Administrator » Wed Oct 23, 2019 1:54 pm

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/magazine-27509559

tomfid
Administrator
Posts: 2772
Joined: Wed May 24, 2006 4:54 am

Re: Automatizing optimization

Post by tomfid » Wed Oct 23, 2019 2:07 pm

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.

tomfid
Administrator
Posts: 2772
Joined: Wed May 24, 2006 4:54 am

Re: Automatizing optimization

Post by tomfid » Wed Oct 23, 2019 2:51 pm

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.

LAUJJL
Senior Member
Posts: 1249
Joined: Fri May 23, 2003 10:09 am

Re: Automatizing optimization

Post by LAUJJL » Wed Oct 23, 2019 5:19 pm

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

portak
Junior Member
Posts: 15
Joined: Fri Dec 07, 2018 2:43 pm
Vensim version: DSS

Re: Automatizing optimization

Post by portak » Thu Oct 24, 2019 10:18 am

Thank you all for the answers!

Post Reply