#[non_exhaustive]pub struct McOpfCoil {Show 15 fields
pub positive: usize,
pub negative: Option<usize>,
pub prescribed: Option<[f64; 2]>,
pub load_law: Option<McOpfLoadLaw>,
pub reactive_slope: Option<f64>,
pub power_factor_coefficients: Option<[f64; 2]>,
pub volt_var: Option<McOpfDroop>,
pub volt_watt: Option<McOpfDroop>,
pub p_min: Option<f64>,
pub p_max: Option<f64>,
pub q_min: Option<f64>,
pub q_max: Option<f64>,
pub current_max: Option<f64>,
pub apparent_max: Option<f64>,
pub cost: f64,
}Expand description
One two-terminal coil; a missing negative terminal means physical ground.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.positive: usizePositive global terminal index; current points from positive to negative.
negative: Option<usize>Negative global terminal index, or physical ground.
prescribed: Option<[f64; 2]>Fixed [P,Q] per-unit power: consumption for loads, injection otherwise.
load_law: Option<McOpfLoadLaw>Voltage-dependent demand, normalized to its physical coil voltage.
reactive_slope: Option<f64>Legacy signed Q/P ratio. Prefer power_factor_coefficients for assembly.
None also means the ratio is not representable, when bounded coefficients
are present. Do not use this field to detect whether PF control is active.
power_factor_coefficients: Option<[f64; 2]>Bounded [a,b] for fixed PF: a * P + b * Q = 0, where
a = sqrt((1 - |pf|) * (1 + |pf|)) and b = -pf. PF follows OpenDSS
and BMOPF by sign: pf > 0 gives Q/P = +tan(acos |pf|), Q with
the same sign as P; pf < 0 the opposite sign.
Coefficients retain tiny nonzero PF without trigonometric cancellation.
volt_var: Option<McOpfDroop>Reactive injection as a smoothed function of monitored voltage.
volt_watt: Option<McOpfDroop>Active injection as a smoothed function of monitored voltage.
p_min: Option<f64>Optional active injection lower bound in per unit.
p_max: Option<f64>Optional active injection upper bound in per unit.
q_min: Option<f64>Optional reactive injection lower bound in per unit.
q_max: Option<f64>Optional reactive injection upper bound in per unit.
current_max: Option<f64>Optional coil current magnitude cap in per unit.
apparent_max: Option<f64>Optional coil apparent-power cap in per unit.
cost: f64Currency/hour per per-unit active injection (same sign for sources).