Page 1 of 1

Model Calibration

Posted: Fri Jul 06, 2018 2:22 pm
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

Re: Model Calibration

Posted: Fri Jul 06, 2018 2:30 pm
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.

Re: Model Calibration

Posted: Fri Jul 06, 2018 3:09 pm
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

Re: Model Calibration

Posted: Fri Jul 06, 2018 3:16 pm
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.

Re: Model Calibration

Posted: Fri Jul 06, 2018 3:41 pm
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

Re: Model Calibration

Posted: Fri Jul 06, 2018 4:12 pm
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

Re: Model Calibration

Posted: Mon Jul 09, 2018 2:46 pm
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

Re: Model Calibration

Posted: Mon Jul 09, 2018 3:32 pm
by tomfid
Try it!

Re: Model Calibration

Posted: Mon Jul 09, 2018 5:54 pm
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.

Re: Model Calibration

Posted: Tue Jul 10, 2018 2:03 pm
by Gip_DOCP
I already tried it but the sum of the calibrated utilities was not equal to 0...

Re: Model Calibration

Posted: Tue Jul 10, 2018 2:41 pm
by tomfid
sumUtility.mdl
(1.75 KiB) Downloaded 234 times
Sum is 0 within numerical precision tolerances.