echo.objectives.tariff module
- class echo.objectives.tariff.BlockImportTariff(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, reset_periods: list = NOTHING, reset_index: RangeSet = <pyomo.core.base.set.FiniteScalarRangeSet object>, *, component: Port, blocks: list, rates: list)
Bases:
BlockTariff- apply_constraints(model: EchoConcreteModel) None
- create_vars(model: EchoConcreteModel) None
- objective_expr(model: EchoConcreteModel) float
- property window_active: str
- class echo.objectives.tariff.BlockTariff(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, reset_periods: list = NOTHING, reset_index: RangeSet = <pyomo.core.base.set.FiniteScalarRangeSet object>, *, component: Port, blocks: list, rates: list)
Bases:
ObjectiveA block tariff, or step tariff, divides consumption over a time period into different blocks, and each block has a different price.
- blocks: list
- get_block_var_name(i: int) str
- property num_price_bands: int
- rates: list
- reset_index: RangeSet
- reset_periods: list
- class echo.objectives.tariff.Day(*values)
Bases:
Enum- holiday = 'holiday'
- weekday = 'weekday'
- weekend = 'weekend'
- class echo.objectives.tariff.DemandCharge(reset_periods: ndarray | list | None = None, num_reset_periods: int = 0, reset_index: RangeSet = <pyomo.core.base.set.FiniteScalarRangeSet object>, min_demand: float = 0.0, import_demand: bool = False, export_demand: bool = False, uid: str = NOTHING, name: str = NOTHING, *, rate: float, window_array: ndarray | list)
Bases:
objectA demand charge is a rate that applies to the maximum demand over one or many specified time windows.
- create_params(model: EchoConcreteModel, df: DataFrame) None
- create_vars(model: EchoConcreteModel) None
- export_demand: bool
- get_objective_total(model: EchoConcreteModel) float
- import_demand: bool
- property max_demand_val: str
- min_demand: float
- name: str
- num_reset_periods: int
- objective_expr(model: EchoConcreteModel) float
- rate: float
- reset_index: RangeSet
- reset_periods: ndarray | list | None
- uid: str
- property window_active: str
- window_array: ndarray | list
- class echo.objectives.tariff.DemandTariffObjective(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, expansion_periods: int = 1, *, component: Port, demand_charges: list[DemandCharge | ImportDemandCharge | ExportDemandCharge])
Bases:
ObjectiveA demand tariff objective contains a set of one or more demand charges.
- apply_constraints(model: EchoConcreteModel, return_rules: bool = False) None | list[Callable]
- create_params(model: EchoConcreteModel, df: DataFrame) None
- create_vars(model: EchoConcreteModel) None
- demand_charges: list[DemandCharge | ImportDemandCharge | ExportDemandCharge]
- expansion_periods: int
- objective_expr(model: EchoConcreteModel) float
- verify_objective(model: EchoConcreteModel, df: DataFrame) None
- class echo.objectives.tariff.ExportDemandCharge(reset_periods: ndarray | list | None = None, num_reset_periods: int = 0, reset_index: RangeSet = <pyomo.core.base.set.FiniteScalarRangeSet object>, uid: str = NOTHING, name: str = NOTHING, import_demand: bool = False, export_demand: bool = True, min_demand: float = 0.0, *, rate: float, window_array: ndarray | list)
Bases:
DemandCharge- export_demand: bool
- import_demand: bool
- min_demand: float
- class echo.objectives.tariff.ExportTariff(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, expansion_periods: int = 1, export_tariff_dict: dict | None = NOTHING, *, tariff_array: ndarray | list, component: Port)
Bases:
TariffThe ExportTariff objective applies a tariff, defined as an array of prices, to the negative (exporting) component of the specified port.
- apply_constraints(model: EchoConcreteModel) None
- create_params(model: EchoConcreteModel, df: DataFrame) None
- property export_tariff: str
- export_tariff_dict: dict | None
- objective_expr(model: EchoConcreteModel) float
- class echo.objectives.tariff.ImportDemandCharge(reset_periods: ndarray | list | None = None, num_reset_periods: int = 0, reset_index: RangeSet = <pyomo.core.base.set.FiniteScalarRangeSet object>, uid: str = NOTHING, name: str = NOTHING, import_demand: bool = True, export_demand: bool = False, min_demand: float = 0.0, *, rate: float, window_array: ndarray | list)
Bases:
DemandCharge- export_demand: bool
- import_demand: bool
- min_demand: float
- class echo.objectives.tariff.ImportTariff(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, expansion_periods: int = 1, import_tariff_dict: dict | None = NOTHING, *, tariff_array: ndarray | list, component: Port)
Bases:
TariffThe ImportTariff objective applies a price per kWh of energy imported at a defined port.
- apply_constraints(model: EchoConcreteModel) None
- create_params(model: EchoConcreteModel, df: DataFrame) None
- property import_tariff: str
- import_tariff_dict: dict | None
- objective_expr(model: EchoConcreteModel) float
- class echo.objectives.tariff.PathTariff(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, expansion_periods: int = 1, path_tariff_dict: dict = NOTHING, *, tariff_array: ndarray | list, component: Path)
Bases:
TariffThe PathTariff objective applies a cost per kW of power flow on a specified path.
- apply_constraints(model: EchoConcreteModel) None
- create_params(model: EchoConcreteModel, df: DataFrame) None
- objective_expr(model: EchoConcreteModel) float
- property path_tariff: str
- path_tariff_dict: dict
- class echo.objectives.tariff.ResetPeriod(*values)
Bases:
Enum- day = 'day'
- month = 'month'
- quarter = 'quarter'
- week = 'week'
- year = 'year'
- class echo.objectives.tariff.Tariff(component: Port | Path | None = None, weight: float = 1, uid: str = NOTHING, name: str = NOTHING, expansion_periods: int = 1, *, tariff_array: ndarray | list)
Bases:
Objective- expansion_periods: int
- static return_tariff_dict(array: list[float] | ndarray, expansion_periods: int) dict
- tariff_array: ndarray | list
- class echo.objectives.tariff.ThroughputCost(weight: float = 1, uid: str = NOTHING, name: str = NOTHING, *, component: Port, rate: float)
Bases:
ObjectiveA ThroughputCost objective applies a fixed rate to total throughput (i.e. import minus export) at a port.
- apply_constraints(model: EchoConcreteModel) None
- objective_expr(model: EchoConcreteModel) float
- rate: float
- class echo.objectives.tariff.TimePeriod(start_time: time, end_time: time, day_type: list[Day])
Bases:
object- end_time: time
- overlaps(other: TimePeriod) bool
Determines whether two
TimePeriodobjects are overlapping.Intended use if for validating
Windowobjects.- Parameters:
other – The other TimePeriod to compare to
- Returns:
True if both
TimePeriodobjects overlap, False otherwise.- Return type:
bool
- start_time: time
- to_bool(df: DataFrame) ndarray
Convert time period to an array based on whether a row is in the time period :param df: input DataFrame
Returns:
- class echo.objectives.tariff.Window(time_periods: list[TimePeriod] = NOTHING, reset_periods: ResetPeriod | None = None)
Bases:
objectClass for specifying window over which a tariff is calculated using datetimes
- get_reset_period_array(df: DataFrame) list[int]
Returns an array where each value is the number of time intervals within which the demand charge is calculated.
- reset_periods: ResetPeriod | None
- time_periods: list[TimePeriod]
- to_bool_periods(df: DataFrame) ndarray
To convert a window to a bool array