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 9960ac5 commit 3dd0eee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lightsim2grid/lightSimBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,12 @@ def assert_grid_correct_after_powerflow(self) -> None:
except TypeError as exc_:
_init_action_to_set = self._get_action_to_set_deprecated()
self._init_action_to_set += _init_action_to_set
assert np.isfinite(self.prod_pu_to_kv).all()
assert np.isfinite(self.load_pu_to_kv).all()
assert np.isfinite(self.lines_or_pu_to_kv).all()
assert np.isfinite(self.lines_ex_pu_to_kv).all()
if self.n_line > 0:
assert np.isfinite(self.storage_pu_to_kv).all()

def _get_action_to_set_deprecated(self):
warnings.warn("DEPRECATION: grid2op <=1.4 is not well supported with lightsim2grid. Lots of bugs have been"
Expand Down Expand Up @@ -1346,7 +1352,7 @@ def copy(self) -> Self:
"max_it", "tol", "_turned_off_pv", "_dist_slack_non_renew",
"_use_static_gen", "_loader_method", "_loader_kwargs",
"_stop_if_load_disco", "_stop_if_gen_disco",
"_timer_fetch_data_cpp", "_debug_Vdc", "V"
"_timer_fetch_data_cpp"
]
for attr_nm in li_regular_attr:
if hasattr(self, attr_nm):
Expand All @@ -1365,7 +1371,8 @@ def copy(self) -> Self:
"prod_p", "prod_q", "prod_v",
"storage_p", "storage_q", "storage_v",
"sh_p", "sh_q", "sh_v", "sh_bus", "sh_theta",
"line_or_theta", "line_ex_theta", "load_theta", "gen_theta", "storage_theta",
"line_or_theta", "line_ex_theta", "load_theta", "gen_theta", "storage_theta",
"_debug_Vdc"
]
for attr_nm in li_attr_npy:
if hasattr(self, attr_nm):
Expand Down
2 changes: 2 additions & 0 deletions src/powerflow_algorithm/BaseDCAlgo.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ bool BaseDCAlgo<LinearSolver>::compute_pf(const Eigen::SparseMatrix<cplx_type> &
std::cout << "\t\tBaseDCAlgo.tpp: dcYbus_noslack_ (sum): " << dcYbus_noslack_.coeffs().abs().sum() << std::endl; // TODO DEBUG WINDOWS
std::cout << "\t\tBaseDCAlgo.tpp: Va_dc_without_slack (inf norm): " << Va_dc_without_slack.lpNorm<Eigen::Infinity>() << std::endl; // TODO DEBUG WINDOWS
std::cout << "\t\tBaseDCAlgo.tpp: Va_dc_without_slack (l1 norm): " << Va_dc_without_slack.lpNorm<1>() << std::endl; // TODO DEBUG WINDOWS
std::cout << "\t\tBaseDCAlgo.tpp: V (l1 norm): " << V.lpNorm<1>() << std::endl; // TODO DEBUG WINDOWS
std::cout << "\t\tBaseDCAlgo.tpp: Sbus (l1 norm): " << Sbus.lpNorm<1>() << std::endl; // TODO DEBUG WINDOWS
ErrorType error = _linear_solver.solve(dcYbus_noslack_, Va_dc_without_slack, has_just_been_factorized);
if(error != ErrorType::NoError){
err_ = error;
Expand Down

0 comments on commit 3dd0eee

Please sign in to comment.