pub struct ResolvedNcsBounds { /* private fields */ }Expand description
Pre-resolved per-stage NCS available generation bounds.
Provides O(1) lookup of available_generation_mw by (ncs_index, stage_index).
Returns 0.0 for out-of-bounds access. Populated by cobre-io during the
resolution step and stored in crate::System.
Uses dense 2D storage (n_ncs * n_stages) initialized with each NCS entity’s
installed capacity (max_generation_mw). Stage-varying overrides from
constraints/ncs_bounds.parquet replace individual entries.
§Examples
use cobre_core::resolved::ResolvedNcsBounds;
let empty = ResolvedNcsBounds::empty();
assert!(empty.is_empty());Implementations§
Source§impl ResolvedNcsBounds
impl ResolvedNcsBounds
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Create an empty NCS bounds table.
Used as the default when no NCS entities exist or no bounds file is provided.
§Examples
use cobre_core::resolved::ResolvedNcsBounds;
let t = ResolvedNcsBounds::empty();
assert!(t.is_empty());Sourcepub fn set(&mut self, ncs_idx: usize, stage_idx: usize, value: f64)
pub fn set(&mut self, ncs_idx: usize, stage_idx: usize, value: f64)
Set the available generation for a specific (ncs_idx, stage_idx) pair.
§Panics
Panics if any index is out of bounds.
Sourcepub fn available_generation(&self, ncs_idx: usize, stage_idx: usize) -> f64
pub fn available_generation(&self, ncs_idx: usize, stage_idx: usize) -> f64
Look up the available generation (MW) for a (ncs_idx, stage_idx) pair.
Returns 0.0 when the index is out of bounds or the table is empty.
Trait Implementations§
Source§impl Clone for ResolvedNcsBounds
impl Clone for ResolvedNcsBounds
Source§fn clone(&self) -> ResolvedNcsBounds
fn clone(&self) -> ResolvedNcsBounds
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more