Built-in entry option for optimised constant values
-
- Senior Member
- Posts: 54
- Joined: Tue Sep 11, 2018 2:04 am
- Vensim version: PRO
Built-in entry option for optimised constant values
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?
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?
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Built-in entry option for optimised constant values
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Senior Member
- Posts: 54
- Joined: Tue Sep 11, 2018 2:04 am
- Vensim version: PRO
Re: Built-in entry option for optimised constant values
But I keep getting the following two errors:Administrator wrote: ↑Thu Feb 20, 2020 7:23 am The .out file created by the optimizer can be treated as a CIN file.
" 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.
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Built-in entry option for optimised constant values
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
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Senior Member
- Posts: 54
- Joined: Tue Sep 11, 2018 2:04 am
- Vensim version: PRO
Re: Built-in entry option for optimised constant values
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.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
Re: Built-in entry option for optimised constant values
Can you post or mail the setup?
/*
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: Built-in entry option for optimised constant values
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
/*
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
*/
-
- Senior Member
- Posts: 54
- Joined: Tue Sep 11, 2018 2:04 am
- Vensim version: PRO
Re: Built-in entry option for optimised constant values
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.
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.
/*
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
*/
-
- Senior Member
- Posts: 54
- Joined: Tue Sep 11, 2018 2:04 am
- Vensim version: PRO
Re: Built-in entry option for optimised constant values
May I email you the files? I dont want to make the files available to public. How may I do it here?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.
Re: Built-in entry option for optimised constant values
You can mail us - vensim at vensim dot com.
/*
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
*/
-
- Senior Member
- Posts: 54
- Joined: Tue Sep 11, 2018 2:04 am
- Vensim version: PRO
Re: Built-in entry option for optimised constant values
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.
/*
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
*/