Dear Johan,
I met a problem below: (binary +big M)
objective:
Objective_COST=Objective_COST+plus_term
constraint G, A is an auxiliary decision variable, W is a value, M is a big value, Y is a binary
G=[A<=W+M(1-Y)];
G=[G,(-200)*(W-A)-M(1-Y)<=plus_term<=(-200)*(W-A)+M(1-Y)];
G=[G,200*(A-W)-M*Y<=plus_term<=200*(A-W)+M*Y];
in other words, it needs to get:
(1)when A<=W, Objective_COST=Objective_COST+(-200)*(W-A)
(2)when A>=W, Objective_COST=Objective_COST+(200)*(A-W)
However, I coded and ran, with error in yalmip shown that below:
"??? Undefined function or variable 'plus_term'."
I don't know how to debug now.
Would you mind helping me to solve this problem? many thanks in advance, Johan:)
regards,
Yimiao