Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
pycity_scheduling
Commits
ccc39479
Commit
ccc39479
authored
Jul 20, 2021
by
Sebastian Schwarz
Browse files
Merge branch 'issue50_mpi-integration' into 'development'
Issue50 mpi integration See merge request
!44
parents
de4a61cf
072a65a3
Pipeline
#512985
passed with stages
in 56 minutes and 56 seconds
Changes
92
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ccc39479
...
...
@@ -28,6 +28,7 @@ pycity_scheduling requires at least the following Python packages:
-
pyomo==6.0.0
-
Shapely==1.7.1
-
pycity_base==0.3.2
-
mpi4py (optional)
-
pylint (optional)
-
sphinx (optional)
-
numpydoc (optional)
...
...
gitlab-utils/Dockerfile
View file @
ccc39479
...
...
@@ -9,7 +9,7 @@ ENTRYPOINT /bin/bash
# Install the archlinux base packages:
RUN
pacman
-Syu
sudo
git patch wget php doxygen make cmake clang base-devel gcc gcc-fortran unzip
tar
bzip2 expat gdbm libffi openssl bluez-libs mpdecimal sqlite tk bison flex pkgconf boost boost-libs zlib gmp blas gsl readline ncurses tbb cliquer ghc ghc-libs haskell-criterion coin-or-asl lapack metis
--noconfirm
RUN
pacman
-Syu
sudo
git patch wget php doxygen make cmake clang base-devel gcc gcc-fortran unzip
tar
bzip2 expat gdbm libffi openssl bluez-libs mpdecimal sqlite tk bison flex pkgconf boost boost-libs zlib gmp blas gsl readline ncurses tbb cliquer ghc ghc-libs haskell-criterion coin-or-asl lapack metis
openmpi
--noconfirm
# Create a builduser (required for some archlinux operations running inside Docker):
...
...
requirements.txt
View file @
ccc39479
...
...
@@ -4,6 +4,7 @@ matplotlib==3.3.4
pyomo
==5.7.1
Shapely
==1.7.1
pycity_base
==0.3.2
mpi4py
==3.0.3
pylint
sphinx
numpydoc
...
...
src/__init__.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/__init__.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_00_fundamentals.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_01_algorithm_central.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_02_algorithm_local.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_03_algorithm_stand-alone.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_04_algorithm_dual-decomposition.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
@@ -93,7 +93,7 @@ def main(do_plot=False):
results
=
opt
.
solve
()
cd
.
copy_schedule
(
"dual_decomposition"
)
# Print some
ADMM
results:
# Print some
dual decomposition
results:
print
(
"Dual Decomposition - Number of iterations:"
)
print
(
results
[
"iterations"
][
-
1
])
print
(
"Dual Decomposition - Norm vector 'r' over iterations:"
)
...
...
src/examples/example_05_algorithm_exchange-admm.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
@@ -28,7 +28,7 @@ from pycity_scheduling.classes import *
from
pycity_scheduling.algorithms
import
*
# This is a very simple power scheduling example using the distributed
E
xchange ADMM algorithm.
# This is a very simple power scheduling example using the distributed
e
xchange ADMM algorithm.
def
main
(
do_plot
=
False
):
...
...
@@ -95,11 +95,11 @@ def main(do_plot=False):
cd
.
copy_schedule
(
"admm"
)
# Print some ADMM results:
print
(
"ADMM - Number of iterations:"
)
print
(
"
Exchange
ADMM - Number of iterations:"
)
print
(
results
[
"iterations"
][
-
1
])
print
(
"ADMM - Norm vector 'r' over iterations:"
)
print
(
"
Exchange
ADMM - Norm vector 'r' over iterations:"
)
print
(
results
[
"r_norms"
])
print
(
"ADMM - Norm vector 's' over iterations:"
)
print
(
"
Exchange
ADMM - Norm vector 's' over iterations:"
)
print
(
results
[
"s_norms"
])
print
(
""
)
...
...
src/examples/example_06_algorithm_warmstart.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
@@ -98,7 +98,7 @@ def main(do_plot=False):
ev
=
ElectricalVehicle
(
environment
=
e
,
e_el_max
=
37.0
,
p_el_max_charge
=
22.0
,
soc_init
=
0.65
)
ap
.
addEntity
(
ev
)
# Perform the scheduling with the
E
xchange ADMM algorithm to obtain an algorithm warmstart point:
# Perform the scheduling with the
e
xchange ADMM algorithm to obtain an algorithm warmstart point:
opt
=
ExchangeADMM
(
city_district
=
cd
,
rho
=
2.0
,
eps_primal
=
1
,
eps_dual
=
1
,
mode
=
"integer"
)
r1
=
opt
.
solve
()
imbalance
=
sum
(
np
.
abs
(
cd
.
schedule
[
"p_el"
]
-
bd1
.
schedule
[
"p_el"
]
-
bd2
.
schedule
[
"p_el"
]))
...
...
src/examples/example_07_objective_peak-shaving.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_08_objective_max-consumption.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_09_objective_self-consumption.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_10_objective_price.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_11_objective_co2.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_12_objective_valley-filling.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_13_district_generator.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
src/examples/example_14_district_flexibility_quantification.py
View file @
ccc39479
...
...
@@ -2,7 +2,7 @@
The pycity_scheduling framework
Copyright (C) 202
0
,
Copyright (C) 202
1
,
Institute for Automation of Complex Power Systems (ACS),
E.ON Energy Research Center (E.ON ERC),
RWTH Aachen University
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment