Circuit : Optimal Design of an Electrical Circuit

Reference

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

Category : GAMS NOA library

Mainfile : circuit.gms

``````\$Ontext
Optimal design of an electrical circuit.

Ratschek, H., Rokne, J., A circuit design problem. J. Global Opt., 3,
1993, pp.501.

Neculai Andrei, "Models, Test Problems and Applications for
Mathematical Programming". Technical Press, Bucharest, 2003.
Application A34, pp.397.
\$Offtext

Sets n /c1*c4/
m /r1*r5/;

Table g(m,n)

c1        c2        c3        c4
r1   0.4850    0.7520    0.8690    0.9820
r2   0.3690    1.2540    0.7030    1.4550
r3   5.2095   10.0677   22.9274   20.2153
r4  23.3037  101.7790  111.4610  191.2670
r5  28.5132  111.8467  134.3884  211.4823 ;

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

Equations e1(n), e2(n), e3(n), e4(n), e, eobj;

e1(n)..  g('r4',n)*x2 - x10 +
(1-x1*x2)*x3*(exp(x5*(g('r1',n) -
g('r3',n)*x7/1000-
g('r5',n)*x8/1000)) - 1) =l= g('r5',n);

e2(n).. -g('r4',n)*x2 - x10 -
(1-x1*x2)*x3*(exp(x5*(g('r1',n) -
g('r3',n)*x7/1000 -
g('r5',n)*x8/1000)) - 1) =l= -g('r5',n);

e3(n).. -g('r5',n)*x1 - x10 +
(1-x1*x2)*x4*(exp(x6*(g('r1',n) - g('r2',n) -
g('r3',n)*x7/1000 +
g('r4',n)*x9/1000)) - 1) =l= -g('r4',n);

e4(n)..  g('r5',n)*x1 - x10 -
(1-x1*x2)*x4*(exp(x6*(g('r1',n) - g('r2',n) -
g('r3',n)*x7/1000 +
g('r4',n)*x9/1000)) - 1) =l= g('r4',n);

e..      x1*x3 - x2*x4 =e= 0;

eobj..   obj =e= x10;

* Bounds on variables
x1.lo=0;   x1.up=10;
x2.lo=0;   x2.up=10;
x3.lo=0;   x3.up=10;
x4.lo=0;   x4.up=10;
x5.lo=0;   x5.up=10;
x6.lo=0;   x6.up=10;
x7.lo=0;   x7.up=10;
x8.lo=0;   x8.up=10;
x9.lo=0;   x9.up=10;
x10.lo=0;  x10.up=10;

* Initial point
x1.l=0.7;
x2.l=0.38;
x3.l=0.8;
x4.l=1.5;
x5.l=6;
x6.l=6;
x7.l=4;
x8.l=1;
x9.l=1.6;
x10.l=1;

Model circuit /all/;

Solve circuit minimizing obj using nlp;
* End circuit

``````
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170