Skip to content

Commit 82c81ff

Browse files
authored
Merge pull request #640 from BDonnot/bd_dev
Bd dev
2 parents f508dc6 + df61eaf commit 82c81ff

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
container: quay.io/pypa/manylinux2014_x86_64
1515
env:
1616
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
17+
GHA_USE_NODE_20: false
1718
strategy:
1819
matrix:
1920
python:
@@ -46,7 +47,7 @@ jobs:
4647
steps:
4748

4849
- name: Checkout sources
49-
uses: actions/checkout@v1
50+
uses: actions/checkout@v3
5051
with:
5152
submodules: true
5253

@@ -159,13 +160,13 @@ jobs:
159160
run: python setup.py sdist
160161

161162
- name: Upload wheel
162-
uses: actions/upload-artifact@v2
163+
uses: actions/upload-artifact@v4
163164
with:
164165
name: grid2op-wheel-${{ matrix.config.name }}-${{ matrix.python.name }}
165166
path: dist/*.whl
166167

167168
- name: Upload source archive
168-
uses: actions/upload-artifact@v2
169+
uses: actions/upload-artifact@v4
169170
if: matrix.config.name == 'darwin' && matrix.python.name == 'cp310'
170171
with:
171172
name: grid2op-sources
@@ -238,12 +239,12 @@ jobs:
238239

239240
steps:
240241
- name: Download wheels
241-
uses: actions/download-artifact@v2
242+
uses: actions/download-artifact@v4
242243
with:
243244
path: download
244245

245246
- name: Upload wheels
246-
uses: actions/upload-artifact@v2
247+
uses: actions/upload-artifact@v4
247248
with:
248249
name: grid2op-wheels
249250
path: |

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ Next release
7171
- [FIXED] an issue in the backend: if the backend failed to be
7272
created the `_grid` attribute was set to `None` and not set back to
7373
- [FIXED] the `self.skip_if_needed()` was missing for one of the test suite.
74+
- [FIXED] an error in the descirption of the `educ_case14_storage` environment
75+
(wrong sign for the slack generator)
76+
- [IMPROVED] error message when forecasts are not correctly set-up
7477

7578
[1.10.3] - 2024-07-12
7679
-------------------------

grid2op/Chronics/gridStateFromFileWithForecasts.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ def __init__(
7171
self._order_prod_p_forecasted = None
7272
self._order_prod_v_forecasted = None
7373
self._data_already_in_mem = False # says if the "main" value from the base class had to be reloaded (used for chunk)
74+
7475
self._nb_forecast = len(h_forecast)
7576
self._h_forecast = copy.deepcopy(h_forecast)
7677
self._check_hs_consistent(self._h_forecast, time_interval)
77-
7878
# init base class
7979
GridStateFromFile.__init__(
8080
self,
@@ -83,7 +83,7 @@ def __init__(
8383
time_interval=time_interval,
8484
max_iter=max_iter,
8585
chunk_size=chunk_size,
86-
)
86+
)
8787

8888
def _clear(self):
8989
super()._clear()
@@ -106,7 +106,9 @@ def _check_hs_consistent(self, h_forecast, time_interval):
106106
if prev.total_seconds() // 60 != h:
107107
raise ChronicsError("For now you cannot build non contiuguous forecast. "
108108
"Forecast should look like [5, 10, 15, 20] "
109-
"but not [10, 15, 20] (missing h=5mins) or [5, 10, 20] (missing h=15)")
109+
"but not [10, 15, 20] (missing h=5mins) or [5, 10, 20] "
110+
f"(missing h=15 in this example). Missing h={prev} "
111+
f"at position {i}, found {h}")
110112

111113
def _get_next_chunk_forecasted(self):
112114
load_p = None

grid2op/data/educ_case14_storage/grid.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"gen": {
138138
"_module": "pandas.core.frame",
139139
"_class": "DataFrame",
140-
"_object": "{\"columns\":[\"name\",\"bus\",\"p_mw\",\"vm_pu\",\"sn_mva\",\"min_q_mvar\",\"max_q_mvar\",\"scaling\",\"slack\",\"in_service\",\"type\",\"controllable\",\"min_p_mw\",\"max_p_mw\",\"slack_weight\",\"power_station_trafo\"],\"index\":[0,1,2,3,4,5],\"data\":[[null,1,40.0,1.045,null,-40.0,50.0,1.0,false,true,null,true,0.0,140.0,0.0,null],[null,2,0.0,1.01,null,0.0,40.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[null,5,0.0,1.07,null,-6.0,24.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[null,5,0.0,1.07,null,-6.0,24.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[null,7,0.0,1.09,null,-6.0,24.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[\"gen_0_5\",0,-219.0,1.06,null,-9999.0,9999.0,1.0,true,true,null,true,null,null,1.0,null]]}",
140+
"_object": "{\"columns\":[\"name\",\"bus\",\"p_mw\",\"vm_pu\",\"sn_mva\",\"min_q_mvar\",\"max_q_mvar\",\"scaling\",\"slack\",\"in_service\",\"type\",\"controllable\",\"min_p_mw\",\"max_p_mw\",\"slack_weight\",\"power_station_trafo\"],\"index\":[0,1,2,3,4,5],\"data\":[[null,1,40.0,1.045,null,-40.0,50.0,1.0,false,true,null,true,0.0,140.0,0.0,null],[null,2,0.0,1.01,null,0.0,40.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[null,5,0.0,1.07,null,-6.0,24.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[null,5,0.0,1.07,null,-6.0,24.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[null,7,0.0,1.09,null,-6.0,24.0,1.0,false,true,null,true,0.0,100.0,0.0,null],[\"gen_0_5\",0,219.0,1.06,null,-9999.0,9999.0,1.0,true,true,null,true,null,null,1.0,null]]}",
141141
"orient": "split",
142142
"dtype": {
143143
"name": "object",
@@ -1763,4 +1763,4 @@
17631763
},
17641764
"user_pf_options": {}
17651765
}
1766-
}
1766+
}

grid2op/tests/test_MakeEnv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ def test_hash_l2rpn_case14_sandbox(self):
763763
def test_hash_educ_case14_storage(self):
764764
# the file "storage_units_charac" was not used when hashing the environment, which was a bug
765765
self.aux_test_hash_l2rpn_case14_sandbox("educ_case14_storage",
766-
"c5192c21b778129ae4201ff5c992c1d7605fda26280c7267858d3e87cf03adbc15a15913355908b39a7c0839811eec399bed82714d4cd78e5fcae7d984bd641b")
766+
"fb8cfe8d2cd7ab24558c90ca0309303600343091d41c43eae50abb09ad56c0fc8bec321bfefb0239c28ebdb4f2e75fc11948b4dd8dc967e4a10303eac41c7176")
767767

768768
if __name__ == "__main__":
769769
unittest.main()

0 commit comments

Comments
 (0)