Skip to content

AC Power Flow Implementation #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
452 changes: 452 additions & 0 deletions 5 Bus JSON Data/logfile12AC5BusExtremeVariation.txt

Large diffs are not rendered by default.

143 changes: 143 additions & 0 deletions 5 Bus JSON Data/logfile12AC5BusHighR_S2C50D5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@

Gurobi 12.0.0 (win64) logging started Mon Feb 10 21:22:59 2025

Set parameter LogFile to value "logfile12AC5BusHighR_S2C50D5.txt"
Gurobi Optimizer version 12.0.0 build v12.0.0rc1 (win64 - Windows 10.0 (19045.2))

CPU model: AMD Ryzen 7 3700X 8-Core Processor, instruction set [SSE2|AVX|AVX2]
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads

Optimize a model with 183463 rows, 83386 columns and 509994 nonzeros
Model fingerprint: 0x5f59f042
Model has 14000 quadratic constraints
Variable types: 46038 continuous, 37348 integer (37348 binary)
Coefficient statistics:
Matrix range [1e-02, 2e+02]
QMatrix range [6e-03, 1e+00]
QLMatrix range [1e+00, 1e+03]
Objective range [3e-01, 2e+03]
Bounds range [4e-03, 1e+03]
RHS range [2e-03, 2e+02]
QRHS range [1e+03, 1e+03]
Presolve removed 162579 rows and 68770 columns
Presolve time: 4.36s

Q matrix is non-PSD after presolve substitutions
Trying again without substitutions in Q matrices...

Presolve removed 160879 rows and 67090 columns
Presolve time: 5.27s
Presolved: 68084 rows, 26797 columns, 231528 nonzeros
Presolved model has 10500 bilinear constraint(s)

Solving non-convex MIQCP

Variable types: 24014 continuous, 2783 integer (2783 binary)
Found heuristic solution: objective 2211227.3526

Deterministic concurrent LP optimizer: primal and dual simplex (primal and dual model)
Showing primal log only...

Root relaxation presolved: 18465 rows, 3811 columns, 78916 nonzeros


Root simplex log...

Iteration Objective Primal Inf. Dual Inf. Time
0 2.4264311e+06 1.186440e+02 4.970339e+08 10s
Concurrent spin time: 0.04s

Solved with dual simplex

Root relaxation: objective 1.737002e+06, 10437 iterations, 1.96 seconds (2.18 work units)

Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time

0 0 1737002.48 0 637 2211227.35 1737002.48 21.4% - 13s
0 0 1758357.76 0 667 2211227.35 1758357.76 20.5% - 17s
H 0 0 2044312.8040 1758360.02 14.0% - 17s
0 0 1758555.58 0 662 2044312.80 1758555.58 14.0% - 18s
0 0 1766039.15 0 658 2044312.80 1766039.15 13.6% - 21s
0 0 1766263.49 0 678 2044312.80 1766263.49 13.6% - 21s
0 0 1770897.42 0 622 2044312.80 1770897.42 13.4% - 23s
H 0 0 2037542.1327 1770912.72 13.1% - 23s
0 0 1773868.73 0 621 2037542.13 1773868.73 12.9% - 24s
0 0 1777757.42 0 619 2037542.13 1777757.42 12.7% - 25s
H 0 0 1989646.8060 1777758.83 10.6% - 25s
H 0 0 1945700.7205 1777758.83 8.63% - 25s
H 0 0 1935268.7439 1777758.83 8.14% - 25s
H 0 0 1933193.2194 1777758.83 8.04% - 25s
0 0 1781593.44 0 535 1933193.22 1781593.44 7.84% - 26s
0 0 1781802.54 0 562 1933193.22 1781802.54 7.83% - 26s
0 0 1783542.06 0 591 1933193.22 1783542.06 7.74% - 27s
0 0 1784035.17 0 584 1933193.22 1784035.17 7.72% - 27s
0 0 1784872.17 0 577 1933193.22 1784872.17 7.67% - 28s
0 0 1784927.95 0 600 1933193.22 1784927.95 7.67% - 28s
0 0 1785065.47 0 597 1933193.22 1785065.47 7.66% - 29s
0 0 1785086.58 0 610 1933193.22 1785086.58 7.66% - 29s
0 0 1785174.13 0 590 1933193.22 1785174.13 7.66% - 30s
0 0 1785183.01 0 606 1933193.22 1785183.01 7.66% - 30s
0 0 1787589.71 0 612 1933193.22 1787589.71 7.53% - 31s
0 0 1787610.27 0 614 1933193.22 1787610.27 7.53% - 31s
0 0 1787957.25 0 609 1933193.22 1787957.25 7.51% - 31s
0 0 1788859.71 0 606 1933193.22 1788859.71 7.47% - 32s
0 0 1788896.20 0 619 1933193.22 1788896.20 7.46% - 32s
0 0 1789205.36 0 623 1933193.22 1789205.36 7.45% - 32s
0 0 1789224.59 0 621 1933193.22 1789224.59 7.45% - 32s
0 0 1790338.96 0 629 1933193.22 1790338.96 7.39% - 33s
H 0 0 1930055.7198 1790338.96 7.24% - 33s
H 0 0 1930055.1454 1790338.96 7.24% - 34s
0 0 1791167.91 0 631 1930055.15 1791167.91 7.20% - 34s
0 0 1791167.91 0 636 1930055.15 1791167.91 7.20% - 34s
0 0 1791482.39 0 649 1930055.15 1791482.39 7.18% - 35s
0 0 1798997.06 0 649 1930055.15 1798997.06 6.79% - 35s
H 0 0 1900207.8085 1798997.06 5.33% - 36s
H 0 0 1885978.2347 1798997.06 4.61% - 36s
0 0 1803785.37 0 646 1885978.23 1803785.37 4.36% - 37s
0 0 1806442.49 0 660 1885978.23 1806442.49 4.22% - 38s
0 0 1806684.44 0 646 1885978.23 1806684.44 4.20% - 38s
0 0 1810212.41 0 631 1885978.23 1810212.41 4.02% - 39s
0 0 1811408.26 0 648 1885978.23 1811408.26 3.95% - 39s
0 0 1811595.38 0 647 1885978.23 1811595.38 3.94% - 39s
0 0 1811602.54 0 647 1885978.23 1811602.54 3.94% - 40s
0 0 1811622.60 0 658 1885978.23 1811622.60 3.94% - 40s
0 0 1811622.60 0 655 1885978.23 1811622.60 3.94% - 40s
0 0 1811771.01 0 655 1885978.23 1811771.01 3.93% - 41s
0 0 1811771.01 0 649 1885978.23 1811771.01 3.93% - 41s
H 0 0 1876119.5739 1811771.01 3.43% - 42s
H 0 0 1876119.4766 1811771.01 3.43% - 49s
0 2 1811771.01 0 649 1876119.48 1811771.01 3.43% - 49s
3 7 1811771.01 2 543 1876119.48 1811771.01 3.43% 871 50s
H 31 12 1876118.7457 1829905.59 2.46% 439 52s
165 105 1854400.15 26 122 1876118.75 1831335.80 2.39% 246 55s
* 236 148 38 1862613.5551 1843081.15 1.05% 197 55s
* 237 148 38 1862067.0980 1843081.15 1.02% 196 55s
* 264 133 37 1860609.7845 1843657.39 0.91% 182 56s
* 401 150 36 1858871.3407 1849856.62 0.48% 138 56s
H 482 121 1858507.4346 1853625.11 0.26% 122 57s
H 596 42 1856838.3178 1853985.02 0.15% 103 58s
H 611 42 1856474.4117 1854805.19 0.09% 101 58s
H 654 6 1856311.5131 1856027.79 0.02% 94.9 58s
H 658 6 1856311.4455 1856027.79 0.02% 94.4 58s

Cutting planes:
Gomory: 7
Cover: 1
Implied bound: 234
Clique: 44
MIR: 652
Flow cover: 85
Inf proof: 11
Zero half: 39
Mod-K: 6
RLT: 27
Relax-and-lift: 44

Explored 668 nodes (89976 simplex iterations) in 58.70 seconds (67.97 work units)
Thread count was 16 (of 16 available processors)

Solution count 10: 1.85631e+06 1.85631e+06 1.85647e+06 ... 1.87612e+06

Optimal solution found (tolerance 1.00e-04)
Best objective 1.856311445545e+06, best bound 1.856262105614e+06, gap 0.0027%
41 changes: 41 additions & 0 deletions 5 Bus JSON Data/logfile12AC5BusJSC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

Gurobi 12.0.0 (win64) logging started Mon Feb 10 21:06:59 2025

Set parameter LogFile to value "logfile12AC5BusJSC.txt"
Gurobi Optimizer version 12.0.0 build v12.0.0rc1 (win64 - Windows 10.0 (19045.2))

CPU model: AMD Ryzen 7 3700X 8-Core Processor, instruction set [SSE2|AVX|AVX2]
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads

Optimize a model with 36534 rows, 16734 columns and 100263 nonzeros
Model fingerprint: 0x67d2ac2b
Model has 2688 quadratic constraints
Variable types: 8847 continuous, 7887 integer (7887 binary)
Coefficient statistics:
Matrix range [1e-02, 2e+02]
QMatrix range [3e+00, 2e+02]
QLMatrix range [1e+00, 4e+03]
Objective range [4e-01, 2e+03]
Bounds range [4e-03, 1e+03]
RHS range [4e-03, 2e+02]
QRHS range [1e+03, 4e+03]
Presolve removed 33315 rows and 16130 columns
Presolve time: 0.49s
Presolved: 3219 rows, 604 columns, 12968 nonzeros
Variable types: 321 continuous, 283 integer (283 binary)
Found heuristic solution: objective 531213.20964

Root relaxation: objective 4.909160e+05, 843 iterations, 0.04 seconds (0.06 work units)

Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time

* 0 0 0 490915.95321 490915.953 0.00% - 0s

Explored 1 nodes (843 simplex iterations) in 0.56 seconds (0.53 work units)
Thread count was 16 (of 16 available processors)

Solution count 2: 490916 531213

Optimal solution found (tolerance 1.00e-04)
Best objective 4.909159532116e+05, best bound 4.909159532116e+05, gap 0.0000%
116 changes: 116 additions & 0 deletions 5 Bus JSON Data/logfile12AC5BusJSC_Branch1-10_PriSec_-c.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

Gurobi 12.0.0 (win64) logging started Mon Mar 10 22:59:43 2025

Set parameter LogFile to value "logfile12AC5BusJSC_Branch1-10_PriSec_-c.txt"
Gurobi Optimizer version 12.0.0 build v12.0.0rc1 (win64 - Windows 10.0 (19045.2))

CPU model: AMD Ryzen 7 3700X 8-Core Processor, instruction set [SSE2|AVX|AVX2]
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads

Optimize a model with 133792 rows, 67854 columns and 362065 nonzeros
Model fingerprint: 0x89d09b60
Model has 12672 quadratic constraints
Variable types: 36921 continuous, 30933 integer (30933 binary)
Coefficient statistics:
Matrix range [1e-02, 4e+04]
QMatrix range [2e-07, 2e+02]
QLMatrix range [1e+00, 4e+03]
Objective range [3e-01, 2e+03]
Bounds range [4e-03, 1e+03]
RHS range [3e-03, 4e+04]
QRHS range [1e+03, 4e+03]
Presolve removed 116474 rows and 50825 columns
Presolve time: 1.34s

Q matrix is non-PSD after presolve substitutions
Trying again without substitutions in Q matrices...

Presolve removed 116342 rows and 48911 columns
Presolve time: 2.51s
Presolved: 72362 rows, 31616 columns, 234443 nonzeros
Presolved model has 12672 bilinear constraint(s)

Solving non-convex MIQCP

Variable types: 28788 continuous, 2828 integer (2828 binary)
Found heuristic solution: objective 1555870.2416

Deterministic concurrent LP optimizer: primal and dual simplex (primal and dual model)
Showing primal log only...

Root relaxation presolved: 21432 rows, 7850 columns, 77485 nonzeros

Concurrent spin time: 0.04s

Solved with dual simplex

Root relaxation: objective 1.111476e+06, 7951 iterations, 0.81 seconds (0.61 work units)
Total elapsed time = 5.03s (DegenMoves)

Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time

0 0 1111476.01 0 496 1555870.24 1111476.01 28.6% - 6s
0 0 1134170.16 0 513 1555870.24 1134170.16 27.1% - 7s
0 0 1137561.58 0 541 1555870.24 1137561.58 26.9% - 7s
0 0 1137564.57 0 550 1555870.24 1137564.57 26.9% - 7s
0 0 1143347.74 0 495 1555870.24 1143347.74 26.5% - 8s
0 0 1143416.10 0 492 1555870.24 1143416.10 26.5% - 9s
0 0 1144237.76 0 481 1555870.24 1144237.76 26.5% - 10s
H 0 0 1216768.6907 1144239.92 5.96% - 10s
0 0 1144261.12 0 474 1216768.69 1144261.12 5.96% - 10s
0 0 1144435.28 0 473 1216768.69 1144435.28 5.94% - 11s
H 0 0 1212323.5744 1144438.78 5.60% - 11s
H 0 0 1192665.7138 1144438.78 4.04% - 11s
0 0 1146738.41 0 455 1192665.71 1146738.41 3.85% - 11s
0 0 1147418.29 0 427 1192665.71 1147418.29 3.79% - 12s
0 0 1147505.00 0 457 1192665.71 1147505.00 3.79% - 12s
0 0 1147716.92 0 478 1192665.71 1147716.92 3.77% - 12s
0 0 1147735.51 0 467 1192665.71 1147735.51 3.77% - 12s
0 0 1147786.68 0 465 1192665.71 1147786.68 3.76% - 13s
H 0 0 1188997.3480 1147789.08 3.47% - 13s
0 0 1147800.32 0 474 1188997.35 1147800.32 3.46% - 13s
0 0 1147837.69 0 461 1188997.35 1147837.69 3.46% - 13s
0 0 1147881.29 0 448 1188997.35 1147881.29 3.46% - 13s
0 0 1147881.29 0 460 1188997.35 1147881.29 3.46% - 14s
0 0 1147881.29 0 460 1188997.35 1147881.29 3.46% - 14s
0 0 1147906.70 0 469 1188997.35 1147906.70 3.46% - 14s
0 0 1147912.23 0 476 1188997.35 1147912.23 3.46% - 14s
0 0 1147945.73 0 449 1188997.35 1147945.73 3.45% - 15s
0 0 1147966.39 0 448 1188997.35 1147966.39 3.45% - 15s
0 0 1147978.18 0 457 1188997.35 1147978.18 3.45% - 15s
0 0 1148014.18 0 458 1188997.35 1148014.18 3.45% - 15s
0 0 1148014.18 0 458 1188997.35 1148014.18 3.45% - 16s
0 0 1148024.18 0 458 1188997.35 1148024.18 3.45% - 16s
H 0 0 1173085.8616 1148024.18 2.14% - 17s
H 0 0 1173085.6158 1148024.18 2.14% - 18s
H 0 0 1173029.6999 1148024.18 2.13% - 20s
0 2 1148024.18 0 458 1173029.70 1148024.18 2.13% - 20s
H 143 108 1161438.6382 1155595.30 0.50% 96.4 23s
H 210 57 1160919.7226 1156602.91 0.37% 79.8 24s
286 15 1159779.82 11 68 1160919.72 1159779.82 0.10% 61.7 25s
H 296 15 1160895.0316 1159803.38 0.09% 59.9 25s
* 321 7 18 1160843.8251 1159823.58 0.09% 56.0 25s
* 322 7 18 1160843.8032 1159823.58 0.09% 55.9 25s
* 328 1 16 1160212.0896 1160212.09 0.00% 55.1 25s

Cutting planes:
Gomory: 3
Cover: 2
Implied bound: 144
Clique: 27
MIR: 308
Flow cover: 17
Inf proof: 3
Zero half: 14
Mod-K: 8
RLT: 46
Relax-and-lift: 16

Explored 338 nodes (29889 simplex iterations) in 25.41 seconds (22.57 work units)
Thread count was 16 (of 16 available processors)

Solution count 10: 1.16021e+06 1.16084e+06 1.16084e+06 ... 1.21232e+06

Optimal solution found (tolerance 1.00e-04)
Best objective 1.160212089562e+06, best bound 1.160212089562e+06, gap 0.0000%
Loading