pub struct ModelParameters {
pub milestone_years: Vec<u32>,
pub allow_broken_options: bool,
pub candidate_asset_capacity: Capacity,
pub capacity_limit_factor: Dimensionless,
pub value_of_lost_load: MoneyPerFlow,
pub max_ironing_out_iterations: u32,
pub price_tolerance: Dimensionless,
pub capacity_margin: f64,
pub mothball_years: u32,
}Expand description
Model parameters as defined in the model.toml file.
NOTE: If you add or change a field in this struct, you must also update the schema in
schemas/input/model.yaml.
Fields§
§milestone_years: Vec<u32>Milestone years
allow_broken_options: boolAllow known-broken options to be enabled.
candidate_asset_capacity: CapacityThe (small) value of capacity given to candidate assets.
Don’t change unless you know what you’re doing.
capacity_limit_factor: DimensionlessAffects the maximum capacity that can be given to a newly created asset.
It is the proportion of maximum capacity that could be required across time slices.
value_of_lost_load: MoneyPerFlowThe cost applied to unmet demand.
Currently this only applies to the LCOX appraisal.
max_ironing_out_iterations: u32The maximum number of iterations to run the “ironing out” step of agent investment for
price_tolerance: DimensionlessThe relative tolerance for price convergence in the ironing out loop
capacity_margin: f64Slack applied during cycle balancing, allowing newly selected assets to flex their capacity by this proportion.
Existing assets remain fixed; this gives newly selected assets the wiggle-room to absorb small demand changes before we would otherwise need to break for re-investment.
mothball_years: u32Number of years an asset can remain unused before being decommissioned
Implementations§
Source§impl ModelParameters
impl ModelParameters
Sourcepub fn from_path<P: AsRef<Path>>(model_dir: P) -> Result<ModelParameters>
pub fn from_path<P: AsRef<Path>>(model_dir: P) -> Result<ModelParameters>
Read a model file from the specified directory.
§Arguments
model_dir- Folder containing model configuration files
§Returns
The model file contents as a ModelParameters struct or an error if the file is invalid
Trait Implementations§
Source§impl Debug for ModelParameters
impl Debug for ModelParameters
Source§impl<'de> Deserialize<'de> for ModelParameters
impl<'de> Deserialize<'de> for ModelParameters
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>,
Source§impl PartialEq for ModelParameters
impl PartialEq for ModelParameters
impl StructuralPartialEq for ModelParameters
Auto Trait Implementations§
impl Freeze for ModelParameters
impl RefUnwindSafe for ModelParameters
impl Send for ModelParameters
impl Sync for ModelParameters
impl Unpin for ModelParameters
impl UnwindSafe for ModelParameters
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> 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