Hi everyone,
I want to write Weymouth equation in GAMS and solve it using MINLP solvers. here is the equation :
The problem is : I cant solve my model in GAMS due to "sign" operator. I received infeasible error when using "DICOPT" or "BARON" solver due to "sign" operator. Only the "SBB" solver starts to solving the model but it never ends.
I also try to define "sign" operator by myself but we cant use variables in "$" operator in GAMS to define it.
So, please help me to define Weymouth equation and solve my model in GAMS.
How to solve the nonlinear Weymouth equation in GAMS?
Re: How to solve the nonlinear Weymouth equation in GAMS?
You can model sgn like this:
where bigM is a an upper bound on the variable p.
-Michael
Code: Select all
binary variable b(m,n);
equation defb(m,n),deff(m,n);
defb(m,n).. p(m) =g= p(n) - (1-b(m,n))*bigM;
deff(m,n).. f(m,n) =e= (2*b(m,n)-1)*C(m,n)*sqrt(abs(sqr(p(m) - sqr(p(n))));
-Michael