#[non_exhaustive]pub struct Generator {Show 18 fields
pub bus: BusId,
pub energy_source: GeneratorEnergySource,
pub pg: f64,
pub qg: f64,
pub pmax: f64,
pub pmin: f64,
pub qmax: f64,
pub qmin: f64,
pub vg: f64,
pub mbase: f64,
pub in_service: bool,
pub cost: Option<GenCost>,
pub caps: [Option<f64>; 11],
pub voltage_regulation_on: bool,
pub regulating_terminal: Option<TerminalReference>,
pub regulated_bus: Option<BusId>,
pub active_power_control: Option<ActivePowerControl>,
pub uid: Option<String>,
}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.bus: BusId§energy_source: GeneratorEnergySourcePrimary energy source used by the generating equipment.
pg: f64Real power set point (MW).
qg: f64Reactive power set point (MVAr).
pmax: f64§pmin: f64§qmax: f64§qmin: f64§vg: f64Voltage set point (p.u.).
mbase: f64§in_service: bool§cost: Option<GenCost>§caps: [Option<f64>; 11]The MATPOWER gen capability / ramp columns past PMIN, aligned to
GEN_EXTRA_KEYS by index (None for a column the source omitted).
A fixed array, not an Extras map: a string-keyed map per generator
costs 11 heap allocations each, which dominates the parse of a large
generator-heavy case. Surfaced into formats that name them (PowerModels).
On the JSON snapshot it is a name-keyed object (see caps_serde) so the
schema stays additive when GEN_EXTRA_KEYS grows; #[serde(default)] so a
snapshot that omits it deserializes to the empty set.
voltage_regulation_on: boolWhether the generator’s voltage regulation is enabled. Formats without
an explicit enable field use true, matching the voltage set point
carried by the balanced generator row.
regulating_terminal: Option<TerminalReference>The exact equipment terminal whose voltage is regulated. None means
the generator’s own terminal, or that the source format names only a
regulated bus.
regulated_bus: Option<BusId>The remote bus whose voltage this generator regulates, when that is not its
own terminal bus (PSS/E IREG). None means it regulates its own bus.
Part of the cross-element voltage-control graph: a format that names a
remote regulated bus (PSS/E) keeps it across a round trip instead of
collapsing every generator onto its own terminal. #[serde(default)] so
JSON written before the field existed still deserializes.
active_power_control: Option<ActivePowerControl>Governor and distributed slack settings, when supplied by the source.
uid: Option<String>Stable row identity; see Bus::uid.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Generator
impl<'de> Deserialize<'de> for Generator
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Generator, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Generator, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Generator
impl JsonSchema for Generator
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more