File tree Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -275,3 +275,6 @@ test.txt
275
275
test_output.txt
276
276
test_pypower_fdpf.py
277
277
lightsim2grid /tests /_grid2op_for_test /
278
+ bug_sparselu
279
+ bug_sparselu_eigen.cpp
280
+ test_segfault.sh
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ Change Log
20
20
21
21
[0.7.6] 2023-xx-yy
22
22
--------------------
23
+ - [BREAKING] now able to retrieve `dcSbus ` with a dedicated method (and not with the old `get_Sbus `).
24
+ If you previously used `gridmodel.get_Subus() ` to retrieve the Sbus used for DC powerflow, please use
25
+ `gridmodel.get_dcSbus() ` instead.
23
26
- [FIXED] now voltage is properly set to 0. when shunts are disconnected
24
27
- [FIXED] now voltage is properly set to 0. when storage units are disconnected
25
28
- [FIXED] a bug where non connected grid were not spotted in DC
@@ -31,6 +34,7 @@ Change Log
31
34
one.
32
35
- [ADDED] possibility to set / retrieve the names of each elements of the grid.
33
36
- [ADDED] embed in the generator models the "non pv" behaviour. (TODO need to be able to change Q from python side)
37
+ - [ADDED] computation of PTPF (Power Transfer Distribution Factor) is now possible
34
38
- [IMPROVED] now performing the new grid2op `create_test_suite `
35
39
- [IMPROVED] now lightsim2grid properly throw `BackendError `
36
40
Original file line number Diff line number Diff line change @@ -219,8 +219,8 @@ def _aux_test(self, pn_net):
219
219
Vdc = backend ._grid .dc_pf (Vinit , max_iter , tol_this )
220
220
backend ._grid .reactivate_result_computation ()
221
221
backend ._grid .tell_topo_changed ()
222
- Ydc_me = copy .deepcopy (backend ._grid .get_Ybus ())
223
- Sdc_me = copy .deepcopy (backend ._grid .get_Sbus ())
222
+ Ydc_me = copy .deepcopy (backend ._grid .get_dcYbus ())
223
+ Sdc_me = copy .deepcopy (backend ._grid .get_dcSbus ())
224
224
assert np .max (np .abs (V_init_ref [pp_vect_converter ] - Vdc [:nb_sub ])) <= 100. * self .tol ,\
225
225
f"\t Error for the DC approximation: resulting voltages are different " \
226
226
f"{ np .max (np .abs (V_init_ref [pp_vect_converter ] - Vdc [:nb_sub ])):.5f} pu"
Original file line number Diff line number Diff line change @@ -125,12 +125,12 @@ def test_compare_pp(self):
125
125
mat_pp = self .ref_samecase .get_dcYbus ().todense ()
126
126
assert max_ <= self .tol_eq , f"error for dcYbus: { max_ :.2e} "
127
127
# check Sbus without slack
128
- Sbus_ordered = self .gridmodel .get_Sbus ()[reorder ].reshape (- 1 )
128
+ Sbus_ordered = self .gridmodel .get_dcSbus ()[reorder ].reshape (- 1 )
129
129
if slack_id > 0 :
130
- max_ = np .abs (Sbus_ordered [:slack_id ] - self .ref_samecase .get_Sbus ()[:slack_id ]).max ()
130
+ max_ = np .abs (Sbus_ordered [:slack_id ] - self .ref_samecase .get_dcSbus ()[:slack_id ]).max ()
131
131
assert max_ <= self .tol_eq , f"error for dc Sbus: { max_ :.2e} "
132
- if slack_id != self .gridmodel .get_Sbus ().shape [0 ] - 1 :
133
- max_ = np .abs (Sbus_ordered [(slack_id + 1 ):] - self .ref_samecase .get_Sbus ()[(slack_id + 1 ):]).max ()
132
+ if slack_id != self .gridmodel .get_dcSbus ().shape [0 ] - 1 :
133
+ max_ = np .abs (Sbus_ordered [(slack_id + 1 ):] - self .ref_samecase .get_dcSbus ()[(slack_id + 1 ):]).max ()
134
134
assert max_ <= self .tol_eq , f"error for dc Sbus: { max_ :.2e} "
135
135
136
136
# same in AC
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ def setUp(self) -> None:
32
32
warnings .filterwarnings ("ignore" )
33
33
self .gridmodel = init (self .case )
34
34
self .V_init = 1. * self .gridmodel .get_bus_vn_kv ()
35
- self .gridmodel .change_solver (self .get_solver_type ())
35
+ solver_type = self .get_solver_type ()
36
+ if solver_type not in self .gridmodel .available_solvers ():
37
+ self .skipTest ("Solver type not supported on this platform" )
38
+ self .gridmodel .change_solver (solver_type )
36
39
self .gridmodel .dc_pf (self .V_init , 1 , 1e-8 )
37
40
self .dcYbus = 1.0 * self .gridmodel .get_dcYbus ()
38
41
self .dcSbus = 1.0 * self .gridmodel .get_dcSbus ().real
You can’t perform that action at this time.
0 commit comments