Constraint values in Calibration/Optimization

Use this forum to post Vensim related questions.
Post Reply
ado97
Newbie
Posts: 1
Joined: Mon Sep 09, 2024 3:08 pm
Vensim version: PRO

Constraint values in Calibration/Optimization

Post by ado97 »

Hello all,

I'd like to know if it's possible to add constraint values to the calibration process. For instance, I expect "a" to be smaller than "b" (a<b), but the Powell optimization find optimum values for "a" and "b", where a>b. If it is possible, how do I add these constraints?

Thanks in advance.
Regards,
Alaize.
tomfid
Administrator
Posts: 3875
Joined: Wed May 24, 2006 4:54 am

Re: Constraint values in Calibration/Optimization

Post by tomfid »

This is similar to creating a prior on a parameter value.

1. Create a variable something like:

ab constraint = INITIAL( excess a penalty*MAX(0,a-b)^2 )

whether this should be positive or negative, and the scale, depends on whether you are maximizing or minimizing the rest of your payoff.

2. Add this term to your payoff as a Policy item, and set the timing to Initial or Final (not Always).
Post Reply