pub struct Asset {
pub id: AssetID,
pub agent_id: AgentID,
pub process: Rc<Process>,
pub process_parameter: Rc<ProcessParameter>,
pub region_id: RegionID,
pub capacity: f64,
pub commission_year: u32,
}
Expand description
An asset controlled by an agent.
Fields§
§id: AssetID
A unique identifier for the asset
agent_id: AgentID
A unique identifier for the agent
process: Rc<Process>
The Process
that this asset corresponds to
process_parameter: Rc<ProcessParameter>
The ProcessParameter
corresponding to the asset’s region and commission year
region_id: RegionID
The region in which the asset is located
capacity: f64
Capacity of asset
commission_year: u32
The year the asset comes online
Implementations§
Source§impl Asset
impl Asset
Sourcepub fn new(
agent_id: AgentID,
process: Rc<Process>,
region_id: RegionID,
capacity: f64,
commission_year: u32,
) -> Result<Self>
pub fn new( agent_id: AgentID, process: Rc<Process>, region_id: RegionID, capacity: f64, commission_year: u32, ) -> Result<Self>
Create a new Asset
.
The id
field is initially set to AssetID::INVALID
, but is changed to a unique value
when the asset is stored in an AssetPool
.
Sourcepub fn decommission_year(&self) -> u32
pub fn decommission_year(&self) -> u32
The last year in which this asset should be decommissioned
Sourcepub fn get_energy_limits(&self, time_slice: &TimeSliceID) -> RangeInclusive<f64>
pub fn get_energy_limits(&self, time_slice: &TimeSliceID) -> RangeInclusive<f64>
Get the energy limits for this asset in a particular time slice
This is an absolute max and min on the PAC energy produced/consumed in that time slice.
Sourcepub fn maximum_activity(&self) -> f64
pub fn maximum_activity(&self) -> f64
Maximum activity for this asset (PAC energy produced/consumed per year)
Trait Implementations§
impl StructuralPartialEq for Asset
Auto Trait Implementations§
impl Freeze for Asset
impl RefUnwindSafe for Asset
impl !Send for Asset
impl !Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
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
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>
Converts
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>
Converts
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