Skip to content

Commit

Permalink
still debug windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Jul 24, 2024
1 parent d16c687 commit c412bf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lightsim2grid/lightSimBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ def runpf(self, is_dc : bool=False) -> Tuple[bool, Union[Exception, None]]:
self.V[:] = 1. # self._grid.get_init_vm_pu() # see issue 30
# apparently pandapower run a "real" dc powerflow with vm_pu = 1
# when it initialize the AC powerflow,
print(f"\tLightSimBackend: self.V.shape = {self.V.shape}")
# print(f"\tLightSimBackend: self.V.shape = {self.V.shape}") # TODO DEBUG WINDOWS
self._debug_Vdc = self._grid.dc_pf(copy.deepcopy(self.V), self.max_it, self.tol)
self._grid.reactivate_result_computation()
if self._debug_Vdc.shape[0] == 0:
Expand Down
3 changes: 3 additions & 0 deletions lightsim2grid/tests/test_n1contingencyrewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def setUp(self) -> None:
self.params.MAX_SUB_CHANGED = 999999
self.params.NB_TIMESTEP_COOLDOWN_LINE = 0
self.params.NB_TIMESTEP_COOLDOWN_SUB = 0
self.params.ACTIVATE_STORAGE_LOSS = False
self.env.change_parameters(self.params)
if self.is_dc():
self.params = copy.deepcopy(self.params)
Expand Down Expand Up @@ -134,6 +135,8 @@ def _aux_test_reward(self, obs, reward):
print(f"_amount_storage_prev = {obs._obs_env._amount_storage_prev}")
print(f"storage p (from obs): {obs.storage_power}") # TODO DEBUG WINDOWS
print(f"storage_power_target p (from obs): {obs.storage_power_target}") # TODO DEBUG WINDOWS
print(f"_obs_env._storage_power : {obs._obs_env._storage_power}") # TODO DEBUG WINDOWS
print(f"_obs_env.delta_time_seconds : {obs._obs_env.delta_time_seconds}") # TODO DEBUG WINDOWS
sim_obs, sim_r, sim_d, sim_i = obs.simulate(self.env.action_space(), time_step=0)
# print(f"without contingency: {sim_d = }, {sim_i['exception']}") # TODO DEBUG WINDOWS
print(f"without contingency: {sim_d = }, {sim_i}")
Expand Down

0 comments on commit c412bf2

Please sign in to comment.