Hi All,
I am running a DNLP model using the global solver BARON. The error message said the BARON cannot handle the "sign" function for one of my equations as attached.
Could anyone help rewrite the equation by posing the following conditions:
(1) if vpi(i)-vpi(j) >0,
eweymouthp(aij(ap,i,j)).. vf(aij) * vf(aij) =e= (pipe_data_gg(aij,'Mk')) * (vpi(i) - vpi(j));
(1) if vpi(i)-vpi(j) <0,
negative_condition(aij(ap,i,j)).. -vf(aij) * vf(aij) =e= (pipe_data_gg(aij,'Mk')) * (vpi(i) - vpi(j));
I understand we cannot pose conditional operations on variables, and one way seems to introduce binary variables (or big M). But I do not know how that would work. Thank you for the help if you have any ideas.
Doris
BARON solver cannot handle the "Sign" function Topic is solved
BARON solver cannot handle the "Sign" function
- Attachments
-
- DNLP.gms
- (384 Bytes) Downloaded 268 times
Re: BARON solver cannot handle the "Sign" function
BARON only "understands" a subset of functions offered by GAMS. BARON, unlike local solvers like Conopt, need the algebra of the non-linear expression to build (linear) underestimators. It can do that for all operators (*,/,**,+,-) but not for all functions. The trig functions sin, cos, tan are another examples of functions not supported by BARON. Your are lucky in in your example, because you can just replace sign(vf(aij))*vf(aij)*vf(aij) by abs(vf(aij)*vf(aij)). Abs is something BARON understands.
-Michael
-Michael
Re: BARON solver cannot handle the "Sign" function
Thank you, Michael! This is very helpful.
Doris
Doris