Skip to main content

calculate_coefficients_for_assets

Function calculate_coefficients_for_assets 

Source
pub fn calculate_coefficients_for_assets(
    model: &Model,
    objective_type: &ObjectiveType,
    assets: &[AssetRef],
    prices: &Prices,
    year: u32,
) -> HashMap<AssetRef, Rc<ObjectiveCoefficients>>
Expand description

Calculates cost coefficients for a set of assets for a given objective type.

Returns a map from each asset to its ObjectiveCoefficients, which holds a per-time-slice activity coefficient and market cost.

Activity coefficients are revenue from flows (including the primary output) minus operating cost, calculated using shadow prices. A small positive epsilon is added to each activity coefficient so that assets with near-zero net value still appear in dispatch.

Market costs are calculated using market prices rather than shadow prices. For NPV they use the same revenue-minus-operating-cost calculation as the activity coefficients. For LCOX the sign is inverted (as the value represents a cost) and the primary output (commodity of interest) is excluded.