pub struct Branch {}Fields§
§from: BusId§to: BusId§r: f64Series resistance (p.u.).
x: f64Series reactance (p.u.).
b: f64Total line-charging susceptance (p.u.); half goes to each end.
rate_a: f64§rate_b: f64§rate_c: f64§tap: f64Tap ratio, MATPOWER convention: 0 means “no tap” (a line), treated as 1.
shift: f64Phase shift (degrees).
in_service: bool§angmin: f64§angmax: f64§control: Option<TransformerControl>Regulating-transformer control data, when this branch is a transformer
under automatic tap or phase control. None for lines and for fixed-ratio
transformers. #[serde(default)] so JSON written before the field existed
still deserializes.
extras: ExtrasImplementations§
Source§impl Branch
impl Branch
Sourcepub fn effective_tap(&self) -> f64
pub fn effective_tap(&self) -> f64
Effective tap ratio (0 ⇒ 1).
Sourcepub fn is_transformer(&self) -> bool
pub fn is_transformer(&self) -> bool
A transformer iff the raw tap field is nonzero (an explicit 1 counts) or
there is a phase shift.
Sourcepub fn has_angle_limits(&self) -> bool
pub fn has_angle_limits(&self) -> bool
True when the branch constrains its angle difference, i.e. the limits deviate from the ±360° “unconstrained” default. Formats without angle limit fields (PSS/E, PowerWorld) use this to warn on what they drop.