Writing conic constraints.

Problems with syntax of GAMS
Post Reply
bbiswas
User
User
Posts: 16
Joined: 5 years ago

Writing conic constraints.

Post by bbiswas »

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.
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Writing conic constraints.

Post by Renger »

Hi
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)));
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
bbiswas
User
User
Posts: 16
Joined: 5 years ago

Re: Writing conic constraints.

Post by bbiswas »

Renger wrote: 4 years ago Hi
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)));
Cheers
Renger
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.
Thank you again.
Post Reply