reference tracker modeling Topic is solved

Problems with modeling
Post Reply
strepr

reference tracker modeling

Post by strepr »

Dear GAMS users,

I am trying to design constraints that can be used for reference tracking.
I want to put a penalty on a divergence of the line K with respect to the old_K.
I tried to formulate them as an absolute value.

I have formulated them as follow:

Keepitclose1(t).. K_down(t) =g= (- K(t) + old_K(t));
Keepitclose2(t).. K_up(t) =g= ( K(t) - old_K(t));
Keepitclose3(t).. K_down(t) =g= 0;
Keepitclose4(t).. K_up(t) =g= 0;

where K can be changed and old_K is the value that should be tracked.

which is for example when K = 5 and old_K = 6 would result in

Keepitclose1(t).. K_down(t) =g= (- 5+ 6); -> -1
Keepitclose2(t).. K_up(t) =g= ( 5 - 6); -> 1
Keepitclose3(t).. K_down(t) =g= 0;
Keepitclose4(t).. K_up(t) =g= 0;

thereby forcing the K(t) to go 6 to minimize cost

The costs are modeled as follow:

Cost_K_up.. K_Cost_up =e= sum((t),K_up(t) *weight_K_up(t));
Cost_K_down.. K_Cost_down =e= sum((t),K_down(t) *weight_K_down(t));
Cost_weighted.. weighted =e= K_Cost_up + K_Cost_down;

weight_K_up(t) =1 and weight_K_down(t) = 1 are the weight of the penalty and weighted is added to the cost function.

Unfortunately, my results show very poor tracking or it becomes infeasible. The values of K_down/K_up in this example become 5 instead of the expected 0/1.

Do any of you see the problem in my formulation and/or does anybody know how to formulate it to penalize divergence of K_old?
Thanks for taking the time!
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: reference tracker modeling

Post by abhosekar »

It depends on the structure of your problem.

Your constraints are right but they essentially say that K_down > max(0, -k + K_old) and so on.
You expect K_down = max(0, -k + K_old). This will be true if no other constraints affect the values of K and if the problem is solved to optimality.

You say K_down and K_up take values of 5 and 6. What are the value of K?

An easy way to check it is to fix values for K and check the objective function value.

- Atharv
Post Reply