Search found 16 matches

by bbiswas
4 years ago
Forum: Syntax
Topic: Writing conic constraints.
Replies: 2
Views: 2019

Re: Writing conic constraints.

Hi It seems obvious, but perhaps I am missing the point: 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...
by bbiswas
4 years ago
Forum: Syntax
Topic: Writing conic constraints.
Replies: 2
Views: 2019

Writing conic constraints.

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,...
by bbiswas
4 years ago
Forum: Modeling
Topic: Coding second order cone constraint in GAMS
Replies: 3
Views: 2588

Re: Coding second order cone constraint in GAMS

Thank you for your response sir. In fact I need to know how to write conic constraints in GAMS language. Like I mention in my case, let's assume V is a vector of variables which stands for the voltage magnitude squared of nodes. P and Q are also variable matrices stands for the active and reactive p...
by bbiswas
4 years ago
Forum: Modeling
Topic: Coding second order cone constraint in GAMS
Replies: 3
Views: 2588

Coding second order cone constraint in GAMS

Hi, I'm working on second order cone programming for power distribution system problems. Suppose my system includes 5 buses and 4 lines. So, set bi /bus1*bus5/ set li /line1*line4/ alias(bi,bj) Now the vector V(bi) stands for voltage magnitude squared of a node, P(bi,bj) and Q(bi,bj) stand for the a...
by bbiswas
4 years ago
Forum: Modeling
Topic: Non linear constraint in a convex optimization.
Replies: 5
Views: 3417

Re: Non linear constraint in a convex optimization.

c(bi,bj) is also a parameter which denotes the connection between nodes. To re-write the equations as you said, variables as capital and parameters as small,

c(bi,bj)*(V(bi)-V(bj)) =e= c(bi,bj)*(2*(PL(bi,bj)*r(bi,bj) + QL(bi,bj)*x(bi,bj)) - (sqr(r(bi,bj))+sqr(x(bi,bj)))*IL(bi,bj));

Thank you.
by bbiswas
4 years ago
Forum: Modeling
Topic: Non linear constraint in a convex optimization.
Replies: 5
Views: 3417

Re: Non linear constraint in a convex optimization.

Thank you sir for your reply. But I defined the squared of voltage magnitude V_i^2 with a new variable v(bi) and current squared with il(bi,bj). So, in the equation c(bi,bj)*(v(bi)-v(bj)) =e= c(bi,bj)*(2*(pl(bi,bj)*R(bi,bj) + ql(bi,bj)*X(bi,bj)) - (sqr(R(bi,bj))+sqr(X(bi,bj)))*il(bi,bj)); there isn'...
by bbiswas
4 years ago
Forum: Modeling
Topic: Non linear constraint in a convex optimization.
Replies: 5
Views: 3417

Non linear constraint in a convex optimization.

Hello, I am intending to formulate a convex optimization for a distribution system containing size of 13 bus of example. The variables are as such, set: bi=bj=/bus1*bus13/; voltage squared: v(bi) line current: il(bi,bj) line active power: pl(bi,bj) line reactive power: ql(bi,bj) line resistance: R(b...
by bbiswas
4 years ago
Forum: Modeling
Topic: Help regarding coding for a vector of interrelated elements.
Replies: 2
Views: 2104

Help regarding coding for a vector of interrelated elements.

Hello, Let's say I want to to write the following code in GAMS, V, %vector of size 10 diff, %vector of size 10 for i=2:10 V(i)=V(i-1) + diff(i); end How do I write similar code in GAMS? Let's assume I have a variable V of size b, where b=/x1,x2,x3,x4/, similarly the diff variable has same index b. T...
by bbiswas
5 years ago
Forum: Modeling
Topic: How to write a conic constraint in GAMS?
Replies: 1
Views: 2060

How to write a conic constraint in GAMS?

Hello,
I need to add a conic constraint in my model. For example, the constraint is ||2A, 2B, C-D||<= C+D. The order of the conic is 2. How to write that in the GAMS language?
Thank you.