Help Needed with Adding Line Constraint in Unit Commitment and Economic Dispatch

125 views
Skip to first unread message

Oktoviano Gandhi

unread,
Jan 31, 2017, 5:40:41 AM1/31/17
to AIMMS - The Modeling System
Hi, I am still new to AIMMS and am building a unit commitment model (for power system operations)

I have managed to add generation and startup, shutdown constraints but couldn't seem to add the transmission line constraint. In the end, I would like to add the power loss expression to the transmission line, but I am still stuck with representing the power flow on the lines.
These are some of the constraints that I have tried (one at a time, and the parameters are adjusted accordingly for each), which cause:  "Warning: After zero iterations CPLEX 12.7 concluded that an integer solution to UCED(myMP) does not exist."

1. PGenBus(i,t)-D(i,t)=sum(l,PowerFlow(l,t)*MapLine(l,i))

2. PGenBus(i,t)-D(i,t)-DNotServed(i,t)=sum(l,PowerFlow(l,t)*MapLine(l,i))

3. PGenBus(i,t)-D(i,t)=sum(j,LineAdmittance(i,j)*Ang(i,t)*Ang(j,t));

4. PGenBus(i,t)-D(i,t)=sum(j,PowerFlow(i,j,t))-sum(j,PowerFlow(j,i,t));

where PGenBus(i,t) and D(i,t) are the generation and demand of bus i and time t. Eq 1,2,4 was meant to find the PowerFlow while Eq 3 was meant to find the angle of the nodes.

I have attached my project files and any help/advice/guidance in representing transmission line and loss constraint in AIMMS is very much appreciated.

Thanks!

Okto
PVProject.zip

Marcel Hunting

unread,
Feb 1, 2017, 10:57:34 AM2/1/17
to AIMMS - The Modeling System
Hi,

Many PGenBus(i,t) are fixed to 0. If you print the constraint listing and check it then you will see that many constraints like

  PGenBus_definition(03,Period - 01) ..

      + 1 * PGenBus(03,Period - 01) = 0 ; (lhs=0)

are generated. This means that the definition of PGen(03,Period - 01), which is

  sum(g,P(g,Period - 01)*MapGentoBus(g,03)),

is equal to 0, which is caused by all MapGentoBus(g,03) being equal to 0. I am not sure whether that many MapGentoBus(g,i) are supposed to be 0.

Best regards,

Marcel Hunting
AIMMS Optimization Specialist

Oktoviano Gandhi

unread,
Feb 7, 2017, 4:01:16 AM2/7/17
to AIMMS - The Modeling System
Dear Marcel, thank you very much for your reply!

The purpose of having MapGentoBus is to convert the index of generators to index of buses (as there are some buses which have more than 1 generators). And most of the elements are empty because it is only non-zero when there are generator g is located on bus i. PGenBus(03, t) are all empty because there is no generator on bus 3 (in total there are only 12 generators).

However, since the demand D(3,t) is not zero, I want to express the power flow to bus 3 (and all the other buses) through the transmission lines. I have tried the above methods (1-4) and some other additional methods but have not managed to make it work.

I know of a code to implement this contraint and get the power flow through a line in GAMS:
PGenBus(t,i) - sum(l$(MapLine(l,i) <> 0),PowerFlow(t,l)*MapLine(l,i)) =e= D(t,i)

where PGenBus, D, PowerFlow, and MapLine have the same definitions as in my project. I've tried transposing the indices and it doesn't work either. Any help or hint will be greatly appreciated!

Best regards,

Okto

Marcel Hunting

unread,
Feb 10, 2017, 9:43:49 AM2/10/17
to ai...@googlegroups.com
Hi,

That GAMS constraint can be formulated in AIMMS as:

  PGenBus(t,i) - sum(l | MapLine(l,i) <> 0,PowerFlow(t,l)*MapLine(l,i)) = D(t,i)

Note that PowerFlow is two-dimensional in this constraint while in your AIMMS project it is three-dimensional.

Transposing the indices should not have any influence.

(You can remove the "| MapLine(l,i) <> 0" part in the above constraint because AIMMS will not generate PowerFlow(l,t)*0 if MapLine(l,i) equals 0.)

Best regards,

Marcel
Reply all
Reply to author
Forward
0 new messages