pub struct DerResource {
pub resource_id: usize,
pub resource_type: DerType,
pub bus: usize,
pub p_max_mw: f64,
pub p_min_mw: f64,
pub e_max_mwh: Option<f64>,
pub current_state: DerState,
pub availability: f64,
pub response_time_s: f64,
pub cost_mwh: f64,
}Expand description
A single Distributed Energy Resource participating in the VPP.
Fields§
§resource_id: usizeUnique identifier within the VPP.
resource_type: DerTypeTechnology class.
bus: usizeNetwork bus where this resource is connected.
p_max_mw: f64Maximum injection power [MW] (≥ 0).
p_min_mw: f64Minimum injection power [MW]. Negative values indicate absorption capability (e.g. charging a battery).
e_max_mwh: Option<f64>Energy storage capacity [MWh]; None for non-storage assets.
current_state: DerStateReal-time operational state.
availability: f64Fraction of rated capacity that is currently available [0, 1].
response_time_s: f64Time from dispatch command to full response [seconds].
cost_mwh: f64Variable operating cost [$/MWh].
Implementations§
Source§impl DerResource
impl DerResource
Sourcepub fn effective_p_max(&self) -> f64
pub fn effective_p_max(&self) -> f64
Effective maximum injection power, accounting for availability.
Sourcepub fn effective_p_min(&self) -> f64
pub fn effective_p_min(&self) -> f64
Effective minimum injection power, accounting for availability. Absorption capability is also scaled by availability.
Sourcepub fn available_energy_mwh(&self) -> f64
pub fn available_energy_mwh(&self) -> f64
Available energy for discharge [MWh], considering current SoC. Returns 0.0 for non-storage resources.
Trait Implementations§
Source§impl Clone for DerResource
impl Clone for DerResource
Source§fn clone(&self) -> DerResource
fn clone(&self) -> DerResource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DerResource
impl Debug for DerResource
Source§impl<'de> Deserialize<'de> for DerResource
impl<'de> Deserialize<'de> for DerResource
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>,
Auto Trait Implementations§
impl Freeze for DerResource
impl RefUnwindSafe for DerResource
impl Send for DerResource
impl Sync for DerResource
impl Unpin for DerResource
impl UnsafeUnpin for DerResource
impl UnwindSafe for DerResource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.