Module prices

Module prices 

Source
Expand description

Code for calculating commodity prices used by the simulation.

Structsยง

CommodityPrices
A map relating commodity ID + region + time slice to current price (endogenous)
WeightedAverageAccumulator ๐Ÿ”’
Weighted average accumulator for MoneyPerFlow prices.
WeightedAverageBackupAccumulator ๐Ÿ”’
Weighted average accumulator with a backup weighting path for MoneyPerFlow prices.

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).