Hi,
I am calibrating my model through the optimization tool of Vensim. My question is related with the optimization parameters choice. I selected 5 constant variables to be calibatred which range of values is indifferent as long as the sum of these variables equals to zero. How can I define these restrictions in the optmization tool?
Thanks!
G
Model Calibration
Re: Model Calibration
Three options:
- Define the 5th parameter to be 1-SUM(other 4) - this will only work in some cases; you could wind up with a negative value.
- Optimize a set of weights that get normalized to determine the shares:
x : (x1-x5) ~ dimension for your parameter vector
weight[x] = 1 ~ optimization parameters, with range 0 to 1
fraction[x] = weight[x]/SUM(weight[x!]) ~ the fraction that gets used in the model
- Add a penalty function to enforce the constraint.
- Define the 5th parameter to be 1-SUM(other 4) - this will only work in some cases; you could wind up with a negative value.
- Optimize a set of weights that get normalized to determine the shares:
x : (x1-x5) ~ dimension for your parameter vector
weight[x] = 1 ~ optimization parameters, with range 0 to 1
fraction[x] = weight[x]/SUM(weight[x!]) ~ the fraction that gets used in the model
- Add a penalty function to enforce the constraint.
/*
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: Model Calibration
Hi,
I defined a model variable that computes the sum of the 5 constant variables:
Total utilities=sum(utilities(i!)
where,
Utilities(i) represent the constant variables that I want to calibrate (one for each vehicle type: BEV, PHEV, HEV, Gas and Diesel)
How the penalty function works? I never heard about it before
G
I defined a model variable that computes the sum of the 5 constant variables:
Total utilities=sum(utilities(i!)
where,
Utilities(i) represent the constant variables that I want to calibrate (one for each vehicle type: BEV, PHEV, HEV, Gas and Diesel)
How the penalty function works? I never heard about it before
G
Re: Model Calibration
The basic idea is to add a term to the payoff that penalizes the difference between 1 and SUM(utilities[i!]).
I'd try the normalization approach first.
I'd try the normalization approach first.
/*
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: Model Calibration
I am following your suggestion and trying the normalization approach.
If I understood correctly, in the equations you presented above, you are saying to multiply the fraction[x] with the utility[x]. If I do that I am defining that, in the base run, the utility computed is 1/5 if its initial value?
G
If I understood correctly, in the equations you presented above, you are saying to multiply the fraction[x] with the utility[x]. If I do that I am defining that, in the base run, the utility computed is 1/5 if its initial value?
G
Re: Model Calibration
I just realized that I misread your original - I thought you wanted to enforce sum=1, not sum=0.
So:
utility[x] = 0 ~ opt parameter, with some reasonable bounds like -10 to 10
norm utility[x] = utility[x] - SUM(utility[x!])/ELMCOUNT(x) ~ this enforces the constraint
So:
utility[x] = 0 ~ opt parameter, with some reasonable bounds like -10 to 10
norm utility[x] = utility[x] - SUM(utility[x!])/ELMCOUNT(x) ~ this enforces the constraint
/*
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: Model Calibration
I am not understanding how the norm utility[x] equation enforces the sum of utilities to be zero. Can you explain the reasoning behind it?
Thanks
Thanks
Re: Model Calibration
Try it!
/*
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: Model Calibration
This is just the same trick as subtracting the sample mean from a set of data points. The mean of the resulting adjusted data is 0.
/*
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: Model Calibration
I already tried it but the sum of the calibrated utilities was not equal to 0...
Re: Model Calibration
Sum is 0 within numerical precision tolerances.
/*
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
*/