pub enum AssetState {
Commissioned {
id: AssetID,
agent_id: AgentID,
mothballed_year: Option<u32>,
parent: Option<AssetRef>,
},
Decommissioned {
id: AssetID,
agent_id: AgentID,
decommission_year: u32,
},
Future {
agent_id: AgentID,
},
Selected {
agent_id: AgentID,
},
Parent {
agent_id: AgentID,
group_id: AssetGroupID,
},
Candidate,
}Expand description
The state of an asset
New assets are created as either Future or Candidate assets. Future assets (which are
specified in the input data) have a fixed capacity and capital costs already accounted for,
whereas Candidate assets capital costs are not yet accounted for, and their capacity is
determined by the investment algorithm.
Future and Candidate assets can be converted to Commissioned assets by calling
the commission method (or via pool operations that commission future/selected assets).
Commissioned assets can be decommissioned by calling decommission.
Variants§
Commissioned
The asset has been commissioned
Fields
Decommissioned
The asset has been decommissioned
Fields
Future
The asset is planned for commissioning in the future
Selected
The asset has been selected for investment, but not yet confirmed
Parent
The asset is a parent of other assets.
Parents are used for grouping (commissioned) divided assets, which can be used as an optimisation.
Fields
group_id: AssetGroupIDID of the asset group
Candidate
The asset is a candidate for investment but has not yet been selected by an agent
Trait Implementations§
Source§impl Clone for AssetState
impl Clone for AssetState
Source§fn clone(&self) -> AssetState
fn clone(&self) -> AssetState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AssetState
impl Debug for AssetState
Source§impl Display for AssetState
impl Display for AssetState
Source§impl PartialEq for AssetState
impl PartialEq for AssetState
impl StructuralPartialEq for AssetState
Auto Trait Implementations§
impl Freeze for AssetState
impl !RefUnwindSafe for AssetState
impl !Send for AssetState
impl !Sync for AssetState
impl Unpin for AssetState
impl !UnwindSafe for AssetState
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 more