Recommended
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
PDF
PDF
Specialized Application.pdf
PPTX
Communications and Networks.pptx
PDF
How to Write an Effective Technical Paper (1).pdf
PDF
5 Public speaking tips from TED - Visualized summary
PDF
Product Design Trends in 2024 | Teenage Engineerings
PDF
How to have difficult conversations
PDF
2024 State of Marketing Report – by Hubspot
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
PDF
Everything You Need To Know About ChatGPT
PDF
Time Management & Productivity - Best Practices
PDF
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
PDF
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
PDF
Getting into the tech field. what next
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
PDF
Content Methodology: A Best Practices Report (Webinar)
PPTX
How to Prepare For a Successful Job Search for 2024
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
PDF
The six step guide to practical project management
PDF
Introduction to Data Science
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
PDF
ChatGPT and the Future of Work - Clark Boyd
More Related Content
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
PDF
PDF
Specialized Application.pdf
PPTX
Communications and Networks.pptx
PDF
How to Write an Effective Technical Paper (1).pdf
Featured
PDF
5 Public speaking tips from TED - Visualized summary
PDF
Product Design Trends in 2024 | Teenage Engineerings
PDF
How to have difficult conversations
PDF
2024 State of Marketing Report – by Hubspot
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
PDF
Everything You Need To Know About ChatGPT
PDF
Time Management & Productivity - Best Practices
PDF
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
PDF
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
PDF
Getting into the tech field. what next
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
PDF
Content Methodology: A Best Practices Report (Webinar)
PPTX
How to Prepare For a Successful Job Search for 2024
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
PDF
The six step guide to practical project management
PDF
Introduction to Data Science
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
PDF
ChatGPT and the Future of Work - Clark Boyd
GAMS Code 1. 2. 2
GAMS code:simple
parameters
y l / 9.95037190209989/
a l / -1.47112767430373/;
variables
z , p1,p2, q1, q2, v1, v2, v3, d1, d2;
p1.lo = 0; p2.lo = 0;
p1.up = 3; p2.up = 0.8;
q1.lo = - 2 ; q2.lo = - 2 ;
q1.up = 2; q2.up = 2;
v1.lo = .9 5; v2.lo = . 95; v3.l o = .95;
v1.up = 1 .1; v2.up = 1. 1 ; v3.up = 1.1;
d 1 . lo = - pi ; d2. l o = - p i ;
d1.up = pi ; d2.up = p i ;
v1.l=1; v2.l=1; v3.l=1;
d1.l=0; d2.l=0;
3. 3
GAMS code:simple
bp1.. p1 =e=
bp2.. p2 =e=
bp3.. -0.8 =e=
bq1.. q1 =e=
bq2.. q2 =e=
bq3.. -0.6 =e=
equations
o f , bp1, bp2, bp3, bq1, bq2, bq3, l12, l 21, l13, l3 1, l 23, l32;
o f . . z =e= 2*p1 + p2;
yl*cos(al)*(v1)**2-yl*v1*v2*cos(d1-d2-al)+
yl*cos(al)*(v1)**2-yl*v1*v3*cos(d1- 0 - a l ) ;
yl*cos(al)*(v2)**2-yl*v2*v1*cos(d2-d1-al)+
yl*cos(al)*(v2)**2-yl*v2*v3*cos(d2- 0 - a l ) ;
yl*cos(al)*(v3)**2-yl*v3*v1*cos( 0-d1-al)+
yl*cos(al)*(v3)**2-yl*v3*v2*cos( 0-d2-al);
-yl*sin(al)*(v1)**2-yl*v1*v2*sin(d1-d2-al)-
y l*si n(al ) * ( v 1 ) * * 2- y l*v1*v3* sin(d1- 0- al ) ;
-yl*sin(al)*(v2)**2-yl*v2*v1*sin(d2-d1-al)-
yl*sin(al)*(v2)**2-yl*v2*v3*sin(d2- 0 - a l ) ;
- y l*si n(al ) * ( v 3 ) * * 2- y l*v3*v1* s in( 0- d1- al ) -
y l*si n(al ) * ( v 3 ) * * 2- y l*v3*v2* s in( 0- d2- al ) ;
4. 4
GAMS code:simple
l 1 2 . . sqrt(sqr(yl*cos(al)*(v1)**2-yl*v1*v2*cos(d1-d2-al))+
sqr(-yl*sin(al)*(v1)**2-yl*v1*v2*sin(d1-d2-al))) =l= 0.25;
l 2 1 . . sqrt(sqr(yl*cos(al)*(v2)**2-yl*v2*v1*cos(d2-d1-al))+
sqr(-yl*sin(al)*(v2)**2-yl*v2*v1*sin(d2-d1-al))) =l= 0.25;
l 1 3 . . sqrt(sqr(yl*cos(al)*(v1)**2-yl*v1*v3*cos(d1- 0-al))+
sqr(-yl*sin(al)*(v1)**2-yl*v1*v3*sin(d1- 0-al))) =l= 2;
l 3 1 . . sqrt(sqr(yl*cos(al)*(v3)**2-yl*v3*v1*cos( 0-d1-al))+
sqr(-yl*sin(al)*(v3)**2-yl*v3*v1*sin( 0-d1-al))) =l= 2;
l 2 3 . . sqrt(sqr(yl*cos(al)*(v2)**2-yl*v2*v3*cos(d2- 0-al))+
sqr(-yl*sin(al)*(v2)**2-yl*v2*v3*sin(d2- 0-al))) =l= 2;
l 3 2 . . sqrt(sqr(yl*cos(al)*(v3)**2-yl*v3*v2*cos( 0-d2-al))+
sqr(-yl*sin(al)*(v3)**2-yl*v3*v2*sin( 0-d2-al))) =l= 2;
5. 5
GAMS code:simple
model simpleopf / a l l / ;
solve simpl eopf using nlp mini m izing z ;
option decimals = 8;
display p 1 . l , p 2 . l , q 1 . l , q 2 . l , v 1 . l ,
v 2 . l , v 3 . l , d 1 . l , d 2 . l ;
6. 7. 7
GAMS code
$ t it l e opf
set
g index of units /g1*g2/
n index of nodes /n1*n3/
g2n(g,n) units to nodes /g1.n1,g2.n2/;
a l ias( n ,np) ;
8. 8
GAMS code
table Gdat (g, * ) uni t data
Pmin Pmax Qmin Qmax Cost
g1 0.0 3.0 -2.0 2.0 2
g2 0.0 0.8 -2.0 2.0 1;
table Ndat (n, * ) node data
Vmin Vmax Pd Qd
n1 0.95 1.10 0.0 0.0
n2 0.95 1.10 0.0 0.0
n3 0.95 1.10 0.8 0.6;
9. 9
GAMS code
table Ldat(n,np,*) line
y l
data
t hel yshalf thes cap
n1.n2 9.95037190209989 -1.47112767430373 0 0 0.25
n1.n3 9.95037190209989 -1.47112767430373 0 0 2
n2.n3 9.95037190209989 -1.47112767430373 0 0 2;
L d a t ( n , n p , ' y l ' ) $(ord(n) gt ord(np))=Ldat(np,n,'yl');
Ldat(n,np,'thel')$(ord(n) gt ord(np))=Ldat(np,n,'thel');
Ldat(n,np, 'yshalf') $(ord(n) gt ord(np))=Ldat(np,n,'yshalf');
Ldat(n,np,'thes')$(ord(n) gt ord(np))=Ldat(np,n,'thes');
Ldat(n,np,'cap') $(ord(n) gt ord(np))=Ldat(np,n,'cap');
10. 10
GAMS code
variables
z objective function
p(g) un it g P gener a tion
q(g) un it g Q gener a tion
v(n) node n volta ge m
agni t ude
d(n) node n angle
pf(n,np) P flow per l i n e
qf( n,np) Q f low per l ine;
11. 12. 13. 13
GAMS code
Pfcal(n,np)..pf(n,np)=e=
v(n)**2*Ldat(n,np, 'yl')*cos(-Ldat(n,np, 'thel'))-
v(n)*v(np)*Ldat(n,np, 'yl')*cos(d(n)-d(np)-Ldat(n,np,'thel'))+
(1/2)*v(n)**2*Ldat(n,np, 'yshalf')*cos(-Ldat(n,np,'thes'));
Qfcal(n,np)..qf(n,np)=e=
v( n) **2*Ldat ( n, np, 'yl' ) *sin( - Ldat ( n, np, 't hel' ) ) -
v(n)*v(np)*Ldat(n,np, 'yl')*sin(d(n)-d(np)-Ldat(n,np,'thel'))+
(1/2)*v(n)**2*Ldat(n,np, 'yshalf')*sin(-Ldat(n,np, 'thes'));
14. 14
GAMS code
c o s t . . z =e= sum(g,Gdat(g,'cost')*p(g));
Pbal(n).. sum(g$g2n(g,n),p(g))-Ndat(n,'Pd')=e=sum(np,pf(n,np));
Qbal(n).. sum(g$g2n(g,n),q(g))-Ndat(n,'Qd')=e=sum(np,qf(n,np));
Slim(n,np).. sqrt(power(pf(n,np),2)+power(qf(n,np),2))=l=Ldat(n,np, 'cap');
15. 15
GAMS code
model opf /all/;
solve opf using nlp minimizing z ;
option decimals = 8
display p . l, q. l , v.l , d .l , pf . l , qf . l ;
16. 17.