Built-in entry option for optimised constant values

Use this forum to post Vensim related questions.
Post Reply
Simplifier
Senior Member
Posts: 54
Joined: Tue Sep 11, 2018 2:04 am
Vensim version: PRO

Built-in entry option for optimised constant values

Post by Simplifier »

I have over five hundreds of constants in my model, and I have gained the optimised values for all of them using the optimisation option.

Since I always enter the optimised values manually and individually, which takes heaps of time, I was wondering if there's an option in Vensim that could instruct entering all or some of them at once?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Built-in entry option for optimised constant values

Post by Administrator »

The .out file created by the optimizer can be treated as a CIN file.
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
Simplifier
Senior Member
Posts: 54
Joined: Tue Sep 11, 2018 2:04 am
Vensim version: PRO

Re: Built-in entry option for optimised constant values

Post by Simplifier »

Administrator wrote: Thu Feb 20, 2020 7:23 am The .out file created by the optimizer can be treated as a CIN file.
But I keep getting the following two errors:
" ERROR: The file ... .vdf comes from a different model. "
"ERROR: "Failed to start from the file ... .vdf".

I'm using the same model and ... . I dont get what it is that i'm doing wrong.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Built-in entry option for optimised constant values

Post by Administrator »

I'm not sure what you are doing there. The VDF should not be used.

Search the Vensim help for "Changes", this will give you some background info.

Then run your optimization. One of the files generated by the optimization is a ".out" file. Click Model->Simulate and then select the "Changes" tab, click the "Load changes from" button and select the ".out" file generated by the optimizer. Now run the model and it will use the values from the optimization.

http://www.vensim.com/documentation/23320.htm
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
Simplifier
Senior Member
Posts: 54
Joined: Tue Sep 11, 2018 2:04 am
Vensim version: PRO

Re: Built-in entry option for optimised constant values

Post by Simplifier »

Administrator wrote: Fri Feb 21, 2020 9:58 am I'm not sure what you are doing there. The VDF should not be used.

Search the Vensim help for "Changes", this will give you some background info.

Then run your optimization. One of the files generated by the optimization is a ".out" file. Click Model->Simulate and then select the "Changes" tab, click the "Load changes from" button and select the ".out" file generated by the optimizer. Now run the model and it will use the values from the optimization.

http://www.vensim.com/documentation/23320.htm
Yes I was mistakenly entering VDF files into Based on option. I just did as you instructed but the problem is that even though i'm choosing the right .out file but the constant values that are being picked up from the file are not the same as the values (the .log file) that were estimated by my optimisation run. I dont know why the values in the .log file should be different from the values in the .out file.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Built-in entry option for optimised constant values

Post by tomfid »

Can you post or mail the setup?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Built-in entry option for optimised constant values

Post by tomfid »

The log and out should be identical. Check the creation dates on the files.

Code: Select all

Initial point of search.
  Wind Scale = 1.
  Solar Scale = 1.
  Storage Capacity = 1.
  Gas Capacity = 0.
Simulations = 1.
Pass = 0.
Payoff = -2.01088e+10.
---------------------------------.
Maximum payoff found at:.
  Wind Scale = 9.43832.
  Solar Scale = 9.94613.
  Storage Capacity = 29071.9.
 *Gas Capacity = 0.
Simulations = 210.
Pass = 3.
Payoff = -3.43561e+09.
---------------------------------.

Code: Select all

:COMSYS After 210 simulations
:COMSYS Best payoff is -3.43561e+09
:COMSYS Normally terminated optimization
:OPTIMIZER=Powell
:SENSITIVITY=Off
:MULTIPLE_START=Off
:RANDOM_NUMBER=Default
:OUTPUT_LEVEL=On
:TRACE=Off
:MAX_ITERATIONS=1000
:RESTART_MAX=0
:PASS_LIMIT=2
:FRACTIONAL_TOLERANCE=0.0003
:TOLERANCE_MULTIPLIER=21
:ABSOLUTE_TOLERANCE=1
:SCALE_ABSOLUTE=1
:VECTOR_POINTS=25
:MCINITMETHOD=0
:MCPAYOFFTYPE=0
:MCRECORD=0
:MCSCHEDULE=0
:MCLIMIT=0
:MCBURNIN=0
:MCNCHAINS=2
:MCOUTLIER=0.05
:MCGAMMA=1
:MCEPSILON=0.01
:MCDELTA=0.0001
:MCJUMP=0.05
:MCUPDATEPAIRS=2
:MCXOVER=0.2
:MCTEMP=1
:MCFTEMP=1
:MCCOOLING=1000
0 <= Wind Scale = 9.43832  <= 100
0 <= Solar Scale = 9.94613  <= 100
0 <= Storage Capacity = 29071.9  <= 100000
0 <= Gas Capacity = 0  <= 10000
Simplifier
Senior Member
Posts: 54
Joined: Tue Sep 11, 2018 2:04 am
Vensim version: PRO

Re: Built-in entry option for optimised constant values

Post by Simplifier »

tomfid wrote: Fri Feb 21, 2020 2:42 pm Can you post or mail the setup?
Yes, the ones hat i'm using are identical and with the same saving time. What do you mean by setup? You mean the .out and .log files?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Built-in entry option for optimised constant values

Post by tomfid »

We'd need enough to replicate the whole experiment - model, data, vpd, voc, etc. The out and log would be useful as a check.

Here's another useful check:
- run the optimization
- run a regular simulation, with a new name, using the .out as a Change file (it has to be last in the loading order if it overlaps with any others)
- use the runs compare tool to check for differences between the two runs

Are you seeing large or small differences? One possibility is that there's some small difference from single vs. double precision values.
Simplifier
Senior Member
Posts: 54
Joined: Tue Sep 11, 2018 2:04 am
Vensim version: PRO

Re: Built-in entry option for optimised constant values

Post by Simplifier »

tomfid wrote: Fri Feb 21, 2020 8:15 pm We'd need enough to replicate the whole experiment - model, data, vpd, voc, etc. The out and log would be useful as a check.

Here's another useful check:
- run the optimization
- run a regular simulation, with a new name, using the .out as a Change file (it has to be last in the loading order if it overlaps with any others)
- use the runs compare tool to check for differences between the two runs

Are you seeing large or small differences? One possibility is that there's some small difference from single vs. double precision values.
May I email you the files? I dont want to make the files available to public. How may I do it here?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Built-in entry option for optimised constant values

Post by tomfid »

You can mail us - vensim at vensim dot com.
Simplifier
Senior Member
Posts: 54
Joined: Tue Sep 11, 2018 2:04 am
Vensim version: PRO

Re: Built-in entry option for optimised constant values

Post by Simplifier »

tomfid wrote: Fri Feb 21, 2020 9:31 pm You can mail us - vensim at vensim dot com.
Thanks. I emailed the files with the subject "Regard to my discussion on VensimForum about .out and .log files". Hope the email will be targeted to you.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Built-in entry option for optimised constant values

Post by tomfid »

For those observing: the problem was that the Changes file field in the simulation setup dialog expects a comma-separated list of cin and out files, and there were commas in the name of the cin file.
Post Reply