Skip to content

Commit f5acc1e

Browse files
committed
Merge branch 'release/v0.8.0'
2 parents f938f22 + 8eef6f9 commit f5acc1e

20 files changed

+2915
-89
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
version:
20-
- '1.5' # Replace this with the minimum Julia version that your package supports.
20+
- '1.10' # Replace this with the minimum Julia version that your package supports.
2121
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
2222
- 'nightly'
2323
os:
@@ -27,12 +27,12 @@ jobs:
2727
arch:
2828
- x64
2929
steps:
30-
- uses: actions/checkout@v2
31-
- uses: julia-actions/setup-julia@v1
30+
- uses: actions/checkout@v5
31+
- uses: julia-actions/setup-julia@v2
3232
with:
3333
version: ${{ matrix.version }}
3434
arch: ${{ matrix.arch }}
35-
- uses: actions/cache@v1
35+
- uses: actions/cache@v4
3636
env:
3737
cache-name: cache-artifacts
3838
with:
@@ -42,11 +42,11 @@ jobs:
4242
${{ runner.os }}-test-${{ env.cache-name }}-
4343
${{ runner.os }}-test-
4444
${{ runner.os }}-
45-
- uses: julia-actions/julia-buildpkg@latest
45+
- uses: julia-actions/julia-buildpkg@v1
4646
continue-on-error: ${{ matrix.version == 'nightly' }}
47-
- uses: julia-actions/julia-runtest@latest
47+
- uses: julia-actions/julia-runtest@v1
4848
continue-on-error: ${{ matrix.version == 'nightly' }}
4949
- uses: julia-actions/julia-processcoverage@v1
50-
- uses: codecov/codecov-action@v1
50+
- uses: codecov/codecov-action@v5
5151
with:
5252
file: lcov.info

.github/workflows/documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: julia-actions/setup-julia@latest
12+
- uses: actions/checkout@v5
13+
- uses: julia-actions/setup-julia@v2
1414
with:
15-
version: '1.5'
15+
version: '1.10'
1616
- name: Install Dependencies
1717
run: julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
1818
- name: Build and Deploy

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ docs/site/
88
/docs/Manifest.toml
99
/test/__pycache__/
1010
/test/pycodes/
11+
.idea/

Project.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PandaModels"
22
uuid = "2dbab86a-7cbf-476f-9afe-75ffd3079e7c"
33
authors = ["e2nIEE"]
4-
version = "0.7.2"
4+
version = "0.8.0"
55

66
[deps]
77
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
@@ -13,17 +13,19 @@ Juniper = "2ddba703-00a4-53a7-87a5-e8b9971dde84"
1313
Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
1414
PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655"
1515
#Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b"
16+
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
1617

1718
[compat]
18-
Cbc = "0.8, 0.9"
19+
Cbc = "0.8, 0.9, 1"
1920
InfrastructureModels = "0.6, 0.7"
20-
Ipopt = "0.6, 0.7, 0.8, 0.9"
21+
Ipopt = "0.6, 0.7, 0.8, 0.9, 1"
2122
JSON = "0.21"
22-
JuMP = "0.21, 0.22"
23-
Juniper = "0.7, 0.8"
23+
JuMP = "0.21, 0.22, 1"
24+
Juniper = "0.7, 0.8, 0.9"
2425
Memento = "1"
25-
PowerModels = "0.19.2"
26+
PowerModels = "0.19.2, 0.20, 0.21"
2627
julia = "1.1"
28+
HiGHS = "1"
2729

2830
[extras]
2931
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ solvers:
3030
* [Juniper.jl](https://github.com/lanl-ansi/Juniper.jl)
3131
* [Cbc.jl](https://github.com/jump-dev/Cbc.jl)
3232
* [Gurobi.jl](https://github.com/jump-dev/Gurobi.jl)
33+
* [HiGHS.jl](https://github.com/jump-dev/HiGHS.jl)
3334
3435
#### Gurobi Installation
3536

docs/Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
PandaModels = "2dbab86a-7cbf-476f-9afe-75ffd3079e7c"
34

45
[compat]
5-
Documenter = "0.27"
6+
Documenter = "1.14"

docs/src/pptutorial.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ The tutorial for the application of each optimization model is available in [pan
77

88
Functions from PowerModels:
99

10-
* [Power Flow](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/pf_powermodels%20.ipynb)
11-
* [Optimal Power Flow](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/opf_powermodels.ipynb)
12-
* [Optimal Transmission Switching](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/ost_powermodels.ipynb)
13-
* [Transmission Network Expansion Planning](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/tnep_powermodels.ipynb)
10+
* [Power Flow](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/pandamodels_pf%20.ipynb)
11+
* [Optimal Power Flow](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/pandamodels_opf.ipynb)
12+
* [Optimal Transmission Switching](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/pandamodels_ost.ipynb)
13+
* [Transmission Network Expansion Planning](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/pandamodels_tnep.ipynb)
1414
* [Storage Optimization](https://github.com/e2nIEE/pandapower/blob/develop/tutorials/pandamodels_storage.ipynb)
1515

1616
Functions from PandaModels:

docs/src/quickguide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ net = nw.example_simple()
5454
pp.runpm_ac_opf(net)
5555
```
5656

57-
for more details about the settings please see [here](https://pandapower.readthedocs.io/en/latest/opf/powermodels.html#usage), also the detailed tutorial is available in [Tutorials](@ref).
57+
for more details about the settings please see [here](https://pandapower.readthedocs.io/en/latest/opf/pandamodels.html#usage), also the detailed tutorial is available in [Tutorials](@ref).

src/PandaModels.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import JSON
88
import Cbc
99
import Ipopt
1010
import Juniper
11+
import HiGHS
1112
try
1213
import Gurobi
1314
catch e
@@ -28,6 +29,7 @@ export run_powermodels_pf,
2829
run_powermodels_multi_storage,
2930
run_pandamodels_multi_vstab,
3031
run_pandamodels_qflex,
32+
run_pandamodels_pflex,
3133
run_pandamodels_multi_qflex,
3234
run_pandamodels_ploss,
3335
run_pandamodels_vstab_test,
@@ -39,6 +41,7 @@ include("input/pp_to_pm.jl")
3941
include("input/tools.jl")
4042
include("models/vstab.jl")
4143
include("models/qflex.jl")
44+
include("models/pflex.jl")
4245
include("models/ploss.jl")
4346
include("models/call_pandamodels.jl")
4447
include("models/call_powermodels.jl")

src/input/pp_to_pm.jl

Lines changed: 71 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -33,84 +33,96 @@ function get_solver(pm)
3333
)
3434
end
3535

36-
if optimizer == "juniper" && nl == "ipopt" && mip == "cbc"
37-
mip_solver = JuMP.optimizer_with_attributes(
36+
if optimizer == "knitro"
37+
solver = JuMP.optimizer_with_attributes(KNITRO.Optimizer, "tol" => tol)
38+
end
39+
40+
if optimizer == "cbc"
41+
solver = JuMP.optimizer_with_attributes(
3842
Cbc.Optimizer,
39-
"logLevel" => log_level,
40-
"seconds" => mip_time_limit,
41-
)
42-
nl_solver = JuMP.optimizer_with_attributes(
43-
Ipopt.Optimizer,
44-
"print_level" => log_level,
45-
"max_cpu_time" => nl_time_limit,
46-
"tol" => 1e-4,
43+
"seconds" => time_limit,
44+
"tol" => tol,
4745
)
46+
end
47+
48+
if optimizer == "scip"
4849
solver = JuMP.optimizer_with_attributes(
49-
Juniper.Optimizer,
50-
"nl_solver" => nl_solver,
51-
"mip_solver" => mip_solver,
52-
"log_levels" => [],
53-
"time_limit" => time_limit,
50+
SCIP.Optimizer,
51+
"tol" => tol
5452
)
5553
end
5654

57-
if optimizer == "juniper" && nl == "gurobi" && mip == "cbc"
58-
mip_solver = JuMP.optimizer_with_attributes(
59-
Cbc.Optimizer,
60-
"logLevel" => log_level,
61-
"seconds" => mip_time_limit,
62-
)
63-
nl_solver = JuMP.optimizer_with_attributes(
64-
Gurobi.Optimizer,
65-
"TimeLimit" => nl_time_limit,
66-
"FeasibilityTol" => tol,
67-
"OptimalityTol" => tol,
68-
)
55+
if optimizer == "highs"
6956
solver = JuMP.optimizer_with_attributes(
70-
Juniper.Optimizer,
71-
"nl_solver" => nl_solver,
72-
"mip_solver" => mip_solver,
73-
"log_levels" => [],
57+
HiGHS.Optimizer,
7458
"time_limit" => time_limit,
59+
"output_flag" => false
7560
)
7661
end
7762

78-
if optimizer == "juniper" && nl == "gurobi" && mip == "gurobi"
79-
mip_solver = JuMP.optimizer_with_attributes(
80-
Gurobi.Optimizer,
81-
"TimeLimit" => mip_time_limit,
82-
"FeasibilityTol" => tol,
83-
"OptimalityTol" => tol,
84-
)
85-
nl_solver = JuMP.optimizer_with_attributes(
86-
Gurobi.Optimizer,
87-
"TimeLimit" => nl_time_limit,
88-
"FeasibilityTol" => tol,
89-
"OptimalityTol" => tol,
90-
)
63+
if optimizer == "juniper"
64+
if nl == "ipopt"
65+
nl_solver = JuMP.optimizer_with_attributes(
66+
Ipopt.Optimizer,
67+
"print_level" => log_level,
68+
"max_cpu_time" => nl_time_limit,
69+
"tol" => 1e-4,
70+
)
71+
end
72+
73+
if nl == "gurobi"
74+
nl_solver = JuMP.optimizer_with_attributes(
75+
Gurobi.Optimizer,
76+
"TimeLimit" => nl_time_limit,
77+
"FeasibilityTol" => tol,
78+
"OptimalityTol" => tol,
79+
)
80+
end
81+
82+
if mip == "gurobi"
83+
mip_solver = JuMP.optimizer_with_attributes(
84+
Gurobi.Optimizer,
85+
"TimeLimit" => mip_time_limit,
86+
"FeasibilityTol" => tol,
87+
"OptimalityTol" => tol,
88+
)
89+
end
90+
91+
if mip == "highs"
92+
mip_solver = JuMP.optimizer_with_attributes(
93+
HiGHS.Optimizer,
94+
"time_limit" => mip_time_limit,
95+
"primal_feasibility_tolerance" => tol,
96+
"optimality_tolerance" => tol,
97+
"output_flag" => false
98+
)
99+
end
100+
101+
if mip == "cbc"
102+
mip_solver = JuMP.optimizer_with_attributes(
103+
Cbc.Optimizer,
104+
"logLevel" => log_level,
105+
"seconds" => mip_time_limit,
106+
)
107+
end
108+
109+
if mip == "ipopt"
110+
mip_solver = JuMP.optimizer_with_attributes(
111+
Ipopt.Optimizer,
112+
"print_level" => log_level,
113+
"max_cpu_time" => nl_time_limit,
114+
"tol" => 1e-4,
115+
)
116+
end
117+
91118
solver = JuMP.optimizer_with_attributes(
92119
Juniper.Optimizer,
93120
"nl_solver" => nl_solver,
94121
"mip_solver" => mip_solver,
95122
"log_levels" => [],
96123
"time_limit" => time_limit,
97124
)
98-
end
99-
100-
if optimizer == "knitro"
101-
solver = JuMP.optimizer_with_attributes(KNITRO.Optimizer, "tol" => tol)
102-
end
103125

104-
if optimizer == "cbc"
105-
solver = JuMP.optimizer_with_attributes(
106-
Cbc.Optimizer,
107-
"seconds" => time_limit,
108-
"tol" => tol,
109-
)
110-
end
111-
112-
if optimizer == "scip"
113-
solver = JuMP.optimizer_with_attributes(SCIP.Optimizer, "tol" => tol)
114126
end
115127

116128
return solver

0 commit comments

Comments
 (0)