Static : Static Power Scheduling

Reference

  • Neculai Andrei, Nonlinear Optimization Applications Using the GAMS Technology,Springer Optimization and Its Applications, Model Static (6.4) in chapter Applications in Electrical Engineering , 2013

Category : GAMS NOA library


Mainfile : static.gms

$Ontext
Static power scheduling.

Neculai Andrei, Models, Test Problems and Applications of Mathematical
Programming. Technical Press, Bucharest, 2003.
(Application A4. pp.347)

Hock, W., Schittkowski, K., Test examples for nonlinear programming codes.
Lecture Notes in Economics and Mathematical Systems. vol 187, Springer-Verlag,
Berlin, 1981. (Problem 107, pp. 116)
$Offtext

Parameters C, D;

C = sin(0.25)*48.4/50.176;
D = cos(0.25)*48.4/50.176;

* Variables x1 and x2 are the real power outputs from two generators, x3 and
* x4 are the reactive power outputs, x5, x6 and x7 are the voltage magnitudes
* at three nodes of an electrical network, and x8 and x9 are the voltage
* phase angles at two of these nodes.

Variables x1, x2, x3, x4, x5, x6, x7, x8, x9, obj;

Equations e1, e2, e3, e4, e5, e6, eobj;

* Objective function:

eobj.. obj =e= 3000*x1 + 1000*x1**3 + 2000*x2 + 666.667*x2**3;

* Constraints:
* The constraints are the real and the reactive power balance equations
* at each node of the electrical network.

e1.. 0.4 - x1 + 2*C*x5**2 + x5*x6*(D*sin(-x8)-C*cos(-x8)) +
                            x5*x7*(D*sin(-x9)-C*cos(-x9)) =e= 0;

e2.. 0.4 - x2 + 2*C*x6**2 + x5*x6*(D*sin(x8)-C*cos(x8)) +
                            x6*x7*(D*sin(x8-x9)-C*cos(x8-x9)) =e= 0;

e3.. 0.8 + 2*C*x7**2 + x5*x7*(D*sin(x9)-C*cos(x9)) +
                       x6*x7*(D*sin(x9-x8)-C*cos(x9-x8)) =e= 0;

e4.. 0.2 - x3 + 2*D*x5**2 - x5*x6*(C*sin(-x8)+D*cos(-x8)) -
                            x5*x7*(C*sin(-x9)+D*cos(-x9)) =e= 0;

e5.. 0.2 - x4 + 2*D*x6**2 - x5*x6*(C*sin(x8)+D*cos(x8)) -
                            x6*x7*(C*sin(x8-x9)+D*cos(x8-x9)) =e= 0;

e6.. -0.337 + 2*D*x7**2 - x5*x7*(C*sin(x9)+D*cos(x9)) -
                          x6*x7*(C*sin(x9-x8)+D*cos(x9-x8)) =e= 0;

* Bounds on variables:
x1.lo = 0;
x2.lo = 0;
x5.lo = 0.90909;  x5.up = 1.0909;
x6.lo = 0.90909;  x6.up = 1.0909;
x7.lo = 0.90909;  x7.up = 1.0909;

Model static /all/;

$iftheni x%mode%==xbook
$onecho >bench.opt
  solvers conopt knitro minos snopt
$offecho
static.optfile=1;
option nlp=bench;
$endif

Solve static minimizing obj using nlp;

$iftheni x%mode%==xbook
file out /static1.dat/
put out;
put x1.l:15:7,  x2.l:15:7,  x3.l:15:7,  x4.l:15:7, x5.l:15:7, x6.l:15:7,
    x7.l:15:7,  x8.l:15:7,  x9.l:15:7  /;
put obj.l:15:7 /;
$endif
* End static