flexops.costing.evaluate_fuel_cost

flexops.costing.evaluate_fuel_cost(aggregate_fuel_usage: ndarray, tariff: DataFrame, dt_hours: float, *, fuel_type: str = 'gas', dr_config: DRConfig | None = None, time_index: DatetimeIndex | None = None, prorate: bool = True, prev_demand_dict: dict | None = None, decomposition_type: str | None = None) → float

Compute the TRUE (de-relaxed) fuel cost on a fixed realized usage array.

Mirrors evaluate_cost() for a fuel utility.

Parameters:
  • aggregate_fuel_usage – Realized fuel usage per timestep, a volumetric flow in m³/hr.

  • tariff – An EECO rate_data DataFrame (the utility’s rows).

  • dt_hours – Timestep length in hours; passed to EECO once.

  • fuel_type – The fuel’s EECO utility; see add_fuel_cost().

  • dr_config – Ignored in v0 (DR is containers-only).

  • time_index – The usage array’s naive datetime index (see evaluate_cost()); omit only for a flat tariff.

  • prorate – Prorate monthly demand and fixed charges to the horizon length (see evaluate_cost()).

  • prev_demand_dict – Optional prior-demand carry for billing this horizon as one slice of a longer billing period (see evaluate_cost()). None (default) bills the horizon standalone.

  • decomposition_type – See evaluate_cost().

Returns:

The horizon-total fuel cost in dollars.

Raises:

FlexConfigError – If fuel_type is not a supported EECO utility.