Hi,
I need to include a conic constraint in my optimization model. It's a second order code and is the form of
x(i,j) + y(i,j) >= sqrt( sqr(a(i,j)) + sqr(b(i,j)) + sqr(x(i,j) - y(i,j)) )
This is actually converted as a quadratic cone from the original form of a rotated quadratic cone as follows
x(i,j)*y(i,j) >= sqr(a(i,j)) + sqr(b(i,j))
How can I write it in the format for GAMS?
I tried the user manual document, it wasn't much help. Any help would be highly appreciated.
Thank you.
Writing conic constraints.
Re: Writing conic constraints.
Hi
It seems obvious, but perhaps I am missing the point:
Cheers
Renger
It seems obvious, but perhaps I am missing the point:
Code: Select all
equation conic(i,j)..
x(i,j) + y(i,j) =G= sqrt( sqr(a(i,j)) + sqr(b(i,j)) + sqr(x(i,j) - y(i,j)));
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Re: Writing conic constraints.
Thank you for your response sir. But using sqrt on squared of variables introduce non-linearity. My objective is to transform the whole non-linear problem into a convex problem, that's why I need that conic constraint.Renger wrote: ↑4 years ago Hi
It seems obvious, but perhaps I am missing the point:
CheersCode: Select all
equation conic(i,j).. x(i,j) + y(i,j) =G= sqrt( sqr(a(i,j)) + sqr(b(i,j)) + sqr(x(i,j) - y(i,j)));
Renger
Thank you again.