pub struct DynamicModel {
pub generators: Vec<GeneratorDyn>,
pub exciters: Vec<ExciterDyn>,
pub governors: Vec<GovernorDyn>,
pub pss: Vec<PssDyn>,
pub loads: Vec<LoadDyn>,
pub facts: Vec<FACTSDyn>,
pub unknown_records: Vec<UnknownDyrRecord>,
pub oels: Vec<OelDyn>,
pub uels: Vec<UelDyn>,
pub shafts: Vec<ShaftDyn>,
}Expand description
Complete dynamic model database parsed from a .dyr file.
Fields§
§generators: Vec<GeneratorDyn>Generator dynamic models (GENCLS, GENROU, GENSAL).
exciters: Vec<ExciterDyn>Excitation system models (EXST1, ESST3A, ESDC2A, EXDC2, IEEEX1).
governors: Vec<GovernorDyn>Turbine-governor models (TGOV1, IEEEG1).
pss: Vec<PssDyn>Power system stabilizer models (IEEEST, ST2CUT).
loads: Vec<LoadDyn>Load dynamic models (CLOD, INDMOT, MOTOR) — Phase 12.
facts: Vec<FACTSDyn>FACTS/HVDC dynamic models (CSVGN1, CSTCON, TCSC, CDC4T, VSCDCT) — Phase 13.
unknown_records: Vec<UnknownDyrRecord>Records with unrecognised model names — stored verbatim for diagnostics.
oels: Vec<OelDyn>Over-excitation limiter models (OEL1B, OEL2C, SCL1C) — Wave 37.
uels: Vec<UelDyn>Under-excitation limiter models (UEL1, UEL2C) — Wave 37.
shafts: Vec<ShaftDyn>Multi-mass torsional shaft models for time-domain SSR simulation.
Implementations§
Source§impl DynamicModel
impl DynamicModel
Sourcepub fn n_generators(&self) -> usize
pub fn n_generators(&self) -> usize
Number of generator dynamic records.
Sourcepub fn n_exciters(&self) -> usize
pub fn n_exciters(&self) -> usize
Number of exciter records.
Sourcepub fn n_governors(&self) -> usize
pub fn n_governors(&self) -> usize
Number of governor records.
Sourcepub fn coverage(&self) -> (usize, usize, f64)
pub fn coverage(&self) -> (usize, usize, f64)
Compute supported model coverage.
Returns (n_supported, n_total, coverage_pct).
Sourcepub fn find_facts(&self, bus: u32, device_id: &str) -> Option<&FACTSDyn>
pub fn find_facts(&self, bus: u32, device_id: &str) -> Option<&FACTSDyn>
Find the first FACTS/HVDC dynamic record at the given bus with the given device ID.
Sourcepub fn find_load(&self, bus: u32, load_id: &str) -> Option<&LoadDyn>
pub fn find_load(&self, bus: u32, load_id: &str) -> Option<&LoadDyn>
Find the first load dynamic record at the given bus with the given load ID.
Sourcepub fn find_generator(
&self,
bus: u32,
machine_id: &str,
) -> Option<&GeneratorDyn>
pub fn find_generator( &self, bus: u32, machine_id: &str, ) -> Option<&GeneratorDyn>
Find the first generator dynamic record at the given bus with the given machine ID.
Sourcepub fn find_exciter(&self, bus: u32, machine_id: &str) -> Option<&ExciterDyn>
pub fn find_exciter(&self, bus: u32, machine_id: &str) -> Option<&ExciterDyn>
Find the first exciter record at the given bus with the given machine ID.
Sourcepub fn find_governor(&self, bus: u32, machine_id: &str) -> Option<&GovernorDyn>
pub fn find_governor(&self, bus: u32, machine_id: &str) -> Option<&GovernorDyn>
Find the first governor record at the given bus with the given machine ID.
Sourcepub fn find_pss(&self, bus: u32, machine_id: &str) -> Option<&PssDyn>
pub fn find_pss(&self, bus: u32, machine_id: &str) -> Option<&PssDyn>
Find the first PSS record at the given bus with the given machine ID.
Sourcepub fn find_shaft(&self, bus: u32, machine_id: &str) -> Option<&ShaftDyn>
pub fn find_shaft(&self, bus: u32, machine_id: &str) -> Option<&ShaftDyn>
Find the first shaft dynamic record at the given bus with the given machine ID.
Sourcepub fn unknown_model_summary(&self) -> Vec<UnknownModelGroup>
pub fn unknown_model_summary(&self) -> Vec<UnknownModelGroup>
Build a summary report of unknown/unrecognized dynamic models.
Groups unknown records by model name, counts occurrences, lists affected buses, and suggests standard equivalents where known.
Sourcepub fn incomplete_machines(&self) -> Vec<IncompleteMachine>
pub fn incomplete_machines(&self) -> Vec<IncompleteMachine>
Find generators that have a generator model but are missing one or more of: exciter, governor, or PSS.
Returns (bus, machine_id, has_exciter, has_governor, has_pss) tuples.
Trait Implementations§
Source§impl Clone for DynamicModel
impl Clone for DynamicModel
Source§fn clone(&self) -> DynamicModel
fn clone(&self) -> DynamicModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more