Skip to content

Commit

Permalink
fix source count
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
  • Loading branch information
mgovers committed Oct 10, 2023
1 parent 060ae65 commit f7d4772
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct MathModelTopology {

Idx n_branch() const { return static_cast<Idx>(branch_bus_idx.size()); }

Idx n_source() const { return source_buses.size(); }
Idx n_source() const { return source_buses.element_size(); }

Idx n_shunt() const { return shunt_bus_indptr.back(); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ template <bool sym, typename DerivedSolver> class IterativePFSolver {
output.shunt = y_bus.template calculate_shunt_flow<ApplianceMathOutput<sym>>(output.u);

// prepare source, load gen and bus_injection
output.source.resize(source_buses_->size());
output.source.resize(source_buses_->element_size());
output.load_gen.resize(load_gen_bus_indptr_->back());
output.bus_injection.resize(n_bus_);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ template <bool sym> class LinearPFSolver {
output.shunt = y_bus.template calculate_shunt_flow<ApplianceMathOutput<sym>>(output.u);

// prepare source, load gen and node injection
output.source.resize(source_buses_->size());
output.source.resize(source_buses_->element_size());
output.load_gen.resize(load_gen_bus_indptr_->back());
output.bus_injection.resize(n_bus_);

Expand Down

0 comments on commit f7d4772

Please sign in to comment.