Page 1 of 1

how to limit the number of simulation when optimizing

Posted: Sun Nov 02, 2014 11:30 am
by LAUJJL
Hi

I would like to limit the number of simulation say to 10 when optimizing. How to do it?

I join the .voc file that I use. it generally stops the simulation after appoximately 20 simulations. Generally it congerges enough already at 1O. Making multiple optimizations controlled by VBA
I need tio reduce the optimization time.

Best regards.

JJ

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 9:38 am
by Administrator
Can you upload the VOC file?

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 11:29 am
by LAUJJL
Sorry I forgot to upload the file.

I upload the file with a mdl extension because the voc is not allowed.

Regards.

JJ

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 11:56 am
by gwr
I upload the file with a mdl extension because the voc is not allowed.
That is a bit unfortunate admittedly but I found you can always upload a zip-archive which might also be a good idea in itself?

Regards,
Guido

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 12:07 pm
by gwr
Hi JJ,

I see that you are using the optimization control option

Code: Select all

:SIMS_MAX = 10
I fail to locate this in the reference manual - would you have a link here?

Regards,
Guido

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 2:38 pm
by LAUJJL
Hi Guido

I found easier to change the extension to mdl than zipping the file.

About the max_sims, I did not find either a reference in the Vensim manuals.

Regards.

JJ

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 3:20 pm
by tomfid
I'll have to take a look at the code - I suspect that the limit only gets checked between passes, not at every single iteration, in order to avoid a lot of if-then testing when normally not needed.

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 4:43 pm
by Administrator
LAUJJL wrote:I found easier to change the extension to mdl than zipping the file.
I've changed the forum to allow this now.
About the max_sims, I did not find either a reference in the Vensim manuals.
Does it stop ok if you make MAX SIMS 20?

Re: how to limit the number of simulation when optimizing

Posted: Mon Nov 03, 2014 6:45 pm
by tomfid
There's a funny (weird, not ha ha) quirk in the code, in that max sim values <= 10 are ignored. So, if you set it to 11, it should work. You could also try lowering the PASS LIMIT to 1.

Re: how to limit the number of simulation when optimizing

Posted: Tue Nov 04, 2014 9:57 am
by LAUJJL
Hi Tom

Thank you for the information about the max_sims. I will experiment if that works.

Regards.

JJ

Re: how to limit the number of simulation when optimizing

Posted: Wed Nov 05, 2014 2:52 pm
by tomfid
I changed the lower limit, so that any nonzero value of SIMS_MAX is recognized. Version 6.3a (soon) will incorporate that.