pub struct ModelParameters {
pub milestone_years: Vec<u32>,
pub allow_broken_options: bool,
pub candidate_asset_capacity: Capacity,
pub pricing_strategy: PricingStrategy,
pub capacity_limit_factor: Dimensionless,
pub value_of_lost_load: MoneyPerFlow,
pub max_ironing_out_iterations: u32,
pub price_tolerance: Dimensionless,
}
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: bool
Allow known-broken options to be enabled.
candidate_asset_capacity: Capacity
The (small) value of capacity given to candidate assets.
Don’t change unless you know what you’re doing.
pricing_strategy: PricingStrategy
Defines the strategy used for calculating commodity prices
capacity_limit_factor: Dimensionless
Affects 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: MoneyPerFlow
The cost applied to unmet demand.
Currently this only applies to the LCOX appraisal.
max_ironing_out_iterations: u32
The maximum number of iterations to run the “ironing out” step of agent investment for
price_tolerance: Dimensionless
The relative tolerance for price convergence in the ironing out loop
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