Model Calibration

Use this forum to post Vensim related questions.
Post Reply
Gip_DOCP
Junior Member
Posts: 9
Joined: Wed Feb 28, 2018 12:35 pm
Vensim version: DSS

Model Calibration

Post by Gip_DOCP »

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
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Model Calibration

Post by tomfid »

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.
Gip_DOCP
Junior Member
Posts: 9
Joined: Wed Feb 28, 2018 12:35 pm
Vensim version: DSS

Re: Model Calibration

Post by Gip_DOCP »

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
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Model Calibration

Post by tomfid »

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.
Gip_DOCP
Junior Member
Posts: 9
Joined: Wed Feb 28, 2018 12:35 pm
Vensim version: DSS

Re: Model Calibration

Post by Gip_DOCP »

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
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Model Calibration

Post by tomfid »

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
Gip_DOCP
Junior Member
Posts: 9
Joined: Wed Feb 28, 2018 12:35 pm
Vensim version: DSS

Re: Model Calibration

Post by Gip_DOCP »

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
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Model Calibration

Post by tomfid »

Try it!
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Model Calibration

Post by tomfid »

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.
Gip_DOCP
Junior Member
Posts: 9
Joined: Wed Feb 28, 2018 12:35 pm
Vensim version: DSS

Re: Model Calibration

Post by Gip_DOCP »

I already tried it but the sum of the calibrated utilities was not equal to 0...
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Model Calibration

Post by tomfid »

sumUtility.mdl
(1.75 KiB) Downloaded 223 times
Sum is 0 within numerical precision tolerances.
Post Reply