Expand description
Code for calculating commodity prices used by the simulation.
Structsยง
- Commodity
Prices - A map relating commodity ID + region + time slice to current price (endogenous)
- Weighted
Average ๐Accumulator - Weighted average accumulator for
MoneyPerFlowprices. - Weighted
Average ๐Backup Accumulator - Weighted average accumulator with a backup weighting path for
MoneyPerFlowprices.
Functionsยง
- add_
full_ ๐cost_ average_ prices - Calculate full cost prices for a set of commodities using a load-weighted average across assets and add to an existing prices map.
- add_
full_ ๐cost_ prices - Calculate full cost prices for a set of commodities and add to an existing prices map.
- add_
marginal_ ๐cost_ average_ prices - Calculate marginal cost prices for a set of commodities using a load-weighted average across assets and add to an existing prices map.
- add_
marginal_ ๐cost_ prices - Calculate marginal cost prices for a set of commodities and add to an existing prices map.
- add_
scarcity_ ๐adjusted_ prices - Calculate scarcity-adjusted prices for a set of commodities and add to an existing prices map.
- calculate_
annual_ ๐activities - Calculate annual activities for each asset by summing across all time slices
- calculate_
prices - Calculate commodity prices.
- iter_
candidate_ ๐asset_ min_ prices - Calculate prices as the minimum cost across candidate assets, using either a marginal cost or
full cost strategy (depending on
pricing_strategy). Prices are given for each commodity in the granularity of the commodityโs time slice level. For seasonal/annual commodities, this involves taking a weighted average across time slices for each asset according to potential activity (i.e. the upper activity limit), omitting prices in the extreme case of zero potential activity (Note: this should NOT happen as validation should ensure there is at least one candidate that can provide a price in each time slice for which a price could be required). Costs for candidates are calculated assuming full utilisation. - iter_
existing_ ๐asset_ average_ prices - Calculate prices as the load-weighted average cost across existing assets, using either a
marginal cost or full cost strategy (depending on
pricing_strategy). Prices are given for each commodity in the granularity of the commodityโs time slice level. For seasonal/annual commodities, this involves taking a weighted average across time slices for each asset according to activity (with a backup weight based on potential activity if there is zero activity across the selection, and omitting prices in the extreme case of zero potential activity). - iter_
existing_ ๐asset_ max_ prices - Calculate prices as the maximum cost across existing assets, using either a marginal cost or
full cost strategy (depending on
pricing_strategy). Prices are given for each commodity in the granularity of the commodityโs time slice level. For seasonal/annual commodities, this involves taking a weighted average across time slices for each asset according to activity (with a backup weight based on potential activity if there is zero activity across the selection, and omitting prices in the extreme case of zero potential activity).