Skip to content

Commit

Permalink
revert weird changes
Browse files Browse the repository at this point in the history
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
  • Loading branch information
petersalemink95 committed Jun 4, 2024
1 parent 7f65dc9 commit 0104896
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ class Transformer : public Branch {
double phase_shift() const final { return clock_ * deg_30; }
bool is_param_mutable() const final { return true; }
// getters
IntS tap_pos() const { return tap_pos_; }
BranchSide tap_side() const { return tap_side_; }
IntS tap_min() const { return tap_min_; }
IntS tap_max() const { return tap_max_; }
IntS tap_nom() const { return tap_nom_; }
constexpr IntS tap_pos() const { return tap_pos_; }
constexpr BranchSide tap_side() const { return tap_side_; }
constexpr IntS tap_min() const { return tap_min_; }
constexpr IntS tap_max() const { return tap_max_; }
constexpr IntS tap_nom() const { return tap_nom_; }

// setter
bool set_tap(IntS new_tap) {
constexpr bool set_tap(IntS new_tap) {
if (new_tap == na_IntS || new_tap == tap_pos_) {
return false;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ class Transformer : public Branch {
return {r / base_z, x / base_z};
}

IntS tap_limit(IntS new_tap) const {
constexpr IntS tap_limit(IntS new_tap) const {
new_tap = std::min(new_tap, std::max(tap_max_, tap_min_));
new_tap = std::max(new_tap, std::min(tap_max_, tap_min_));
return new_tap;
Expand Down Expand Up @@ -267,4 +267,6 @@ class Transformer : public Branch {
}
};

static_assert(transformer_c<Transformer>);

} // namespace power_grid_model

0 comments on commit 0104896

Please sign in to comment.