Skip to content

Commit 1e9025b

Browse files
authored
Merge pull request #700 from BDonnot/bd_dev
Fix the protections in case of soft_overflow_threshold
2 parents b8e7217 + 62a3653 commit 1e9025b

31 files changed

+1058
-95
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
- name: Build wheel
6969
run: |
7070
python setup.py bdist_wheel
71-
# auditwheel repair dist/*.whl # only for compiled code !
7271
7372
- name: Install wheel
7473
run: |
@@ -80,7 +79,23 @@ jobs:
8079
python -c "import grid2op"
8180
python -c "from grid2op import *"
8281
python -c "from grid2op.Action._backendAction import _BackendAction"
82+
83+
# - name: Run full tests + code coverage
84+
# if: matrix.python.name == 'cp312'
85+
# run: |
86+
# python -m pip install --upgrade coverage
87+
# python -m pip install --find-links=dist/ grid2op[test]
88+
# cd grid2op/tests
89+
# coverage run -m unittest discover
90+
# coverage xml -i
8391

92+
# - name: Upload coverage
93+
# if: matrix.python.name == 'cp312'
94+
# uses: actions/upload-artifact@v4
95+
# with:
96+
# name: coverage.xml
97+
# path: grid2op/tests/*.xml
98+
8499
- name: List wheel
85100
run:
86101
ls ./dist/*.whl

CHANGELOG.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ Native multi agents support:
158158
- [FIXED] an issue in the AAA tests: when backend does not support storages, some tests were skipped not correctly
159159
- [FIXED] an issue when computing the cascading failure routine, in case multiple iterations were performed,
160160
the cooldowns were not updated correctly.
161+
- [FIXED] cascading failure could be started at the first observation (t=0, just after a reset).
162+
- [FIXED] a bug when "SOFT_OVERFLOW_THRESHOLD" was not 1.: it also impacted "instantaneous overcurrent protections"
163+
(it was triggered when `flow > SOFT_OVERFLOW_THRESHOLD * HARD_OVERFLOW_THRESHOLD * th_lim`)
164+
- [FIXED] a bug when "SOFT_OVERFLOW_THRESHOLD" was not 1.: the backend routine to compute the protections
165+
disconnected the lines with a counter based on `flow > th_lim` and not `flow > th_lim * SOFT_OVERFLOW_THRESHOLD`
166+
- [ADDED] Possibility to disconnect loads, generators and storage units (if proper flag set in the environment).
167+
See documentation.
161168
- [ADDED] possibility to set the "thermal limits" when calling `env.reset(..., options={"thermal limit": xxx})`
162169
- [ADDED] possibility to retrieve some structural information about elements with
163170
with `gridobj.get_line_info(...)`, `gridobj.get_load_info(...)`, `gridobj.get_gen_info(...)`
@@ -173,6 +180,10 @@ Native multi agents support:
173180
- [ADDED] possibility to set the initial time stamp of the observation in the `env.reset`
174181
kwargs by using `env.reset(..., options={"init datetime": XXX})`
175182
- [ADDED] the `ChangeNothing` time series class now supports forecast
183+
- [ADDED] test coverage on the CI
184+
- [ADDED] the `obs.timestep_protection_triggered` counter which counts whether or not the
185+
"time overcurrent protection" (soft overflow) will be triggered: lines will be disconnected
186+
if `time overcurrent protection > parameters.NB_TIMESTEP_POWERFLOW_ALLOWED`
176187
- [IMPROVED] possibility to set the injections values with names
177188
to be consistent with other way to set the actions (*eg* set_bus)
178189
- [IMPROVED] error messages when creating an action which changes the injections
@@ -203,11 +214,9 @@ Native multi agents support:
203214
it... unless you know what you are doing)
204215
- [IMPROVED] `ForecastEnv` is now part of the public API.
205216
- [IMPROVED] no need to call `self._compute_pos_big_top()` at the end of the implementation of `backend.load_grid()`
206-
207-
[1.10.5] - 2025-03-07
208-
------------------------
209-
- [FIXED] force pandapower < 3 otherwise pandapower backend does not work and
210-
lots of tests are failing.
217+
- [IMPROVED] type hints in various files.
218+
- [IMPROVED] documentation of the backend
219+
- [IMRPOVED] `SOFT_OVERFLOW_THRESHOLD` can now be lower than 1
211220

212221
[1.10.5] - 2025-03-07
213222
------------------------

0 commit comments

Comments
 (0)