pub struct LoadDispatchResult {
pub bus: u32,
pub p_served_pu: f64,
pub q_served_pu: f64,
pub p_curtailed_pu: f64,
pub curtailment_pct: f64,
pub cost_contribution: f64,
pub lmp_at_bus: f64,
pub net_curtailment_benefit: f64,
}Expand description
Post-solve dispatch result for a single dispatchable load.
Fields§
§bus: u32External bus number this dispatch result applies to.
p_served_pu: f64Real power served at optimal dispatch (per-unit, positive = consuming).
q_served_pu: f64Reactive power served at optimal dispatch (per-unit, positive = consuming).
p_curtailed_pu: f64Real power curtailed: p_sched - p_served (per-unit, ≥ 0).
curtailment_pct: f64Curtailment percentage: (p_curtailed / p_sched) * 100.
cost_contribution: f64Objective cost contribution ($/hr), consistent with generator costs.
lmp_at_bus: f64LMP at this bus from the OPF solution ($/MWh).
net_curtailment_benefit: f64Net economic benefit of curtailment: (LMP - curtailment_cost) * MW_curtailed.
Positive when curtailment is economically beneficial (LMP > curtailment cost).
Implementations§
Source§impl LoadDispatchResult
impl LoadDispatchResult
Sourcepub fn from_solution(
dl: &DispatchableLoad,
p_served_pu: f64,
q_served_pu: f64,
lmp: f64,
base_mva: f64,
) -> Self
pub fn from_solution( dl: &DispatchableLoad, p_served_pu: f64, q_served_pu: f64, lmp: f64, base_mva: f64, ) -> Self
Build a dispatch result from OPF solution values.
§Arguments
dl: the dispatchable load resourcep_served_pu: optimal P_served from OPF (per-unit)q_served_pu: optimal Q_served from OPF (per-unit)lmp: LMP at the load’s bus ($/MWh)base_mva: system MVA base
Trait Implementations§
Source§impl Clone for LoadDispatchResult
impl Clone for LoadDispatchResult
Source§fn clone(&self) -> LoadDispatchResult
fn clone(&self) -> LoadDispatchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoadDispatchResult
impl Debug for LoadDispatchResult
Source§impl<'de> Deserialize<'de> for LoadDispatchResult
impl<'de> Deserialize<'de> for LoadDispatchResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LoadDispatchResult
impl RefUnwindSafe for LoadDispatchResult
impl Send for LoadDispatchResult
impl Sync for LoadDispatchResult
impl Unpin for LoadDispatchResult
impl UnsafeUnpin for LoadDispatchResult
impl UnwindSafe for LoadDispatchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more