solarforecastarbiter.datamodel.Cost¶
-
class
solarforecastarbiter.datamodel.
Cost
(name: str, type: str, parameters: Union[solarforecastarbiter.datamodel.TimeOfDayCost, solarforecastarbiter.datamodel.DatetimeCost, solarforecastarbiter.datamodel.ConstantCost, solarforecastarbiter.datamodel.ErrorBandCost])[source]¶ Specify how cost metrics should be calculated.
Parameters: - name (str) – Identifier for these cost parameters
- type (str) – The type of cost parameters that are included in parameters. One of ‘timeofday’, ‘datetime’, ‘constant’, or ‘errorband’.
- parameters (
solarforecastarbiter.datamodel.ConstantCost
orsolarforecastarbiter.TimeOfDayCost
orsolarforecastarbiter.DatetimeCost
orsolarforecastarbiter.ErrorBandCost
) – Parameters for the specific cost function type.
-
__init__
(name: str, type: str, parameters: Union[solarforecastarbiter.datamodel.TimeOfDayCost, solarforecastarbiter.datamodel.DatetimeCost, solarforecastarbiter.datamodel.ConstantCost, solarforecastarbiter.datamodel.ErrorBandCost]) → None¶
Methods
__init__
(name, type, parameters, …)from_dict
(input_dict[, raise_on_extra])Construct a dataclass from the given dict, matching keys with the class fields. replace
(**kwargs)Convience wrapper for dataclasses.replace()
to create a new dataclasses from the old with the given keys replaced.to_dict
()Convert the dataclass into a dictionary suitable for uploading to the API.