eemeter.ee.meter

class eemeter.ee.meter.EnergyEfficiencyMeter(default_model_mapping=None, default_formatter_mapping=None)[source]

Meter for determining energy efficiency derivatives for a single traces.

Parameters:default_model_mapping (dict) – mapping between (interpretation, frequency) tuples used to select the default model (if none is explicitly provided in .evaluate()).
evaluate(meter_input, formatter=None, model=None, weather_source=None, weather_normal_source=None)[source]

Main entry point to the meter, which models traces and calculates derivatives.

Parameters:
  • meter_input (dict) – Serialized input containing trace and project data.
  • formatter (tuple of (class, dict), default None) – Formatter for trace and weather data. Used to create input for model. If None is provided, will be auto-matched to appropriate default formatter. Class name can be provided as a string (class.__name__) or object.
  • model (tuple of (class, dict), default None) – Model to use in modeling. If None is provided, will be auto-matched to appropriate default model. Class can be provided as a string (class.__name__) or class object.
  • weather_source (eemeter.weather.WeatherSource) – Weather source to be used for this meter. Overrides weather source found using project.site. Useful for test mocking.
  • weather_normal_source (eemeter.weather.WeatherSource) – Weather normal source to be used for this meter. Overrides weather source found using project.site. Useful for test mocking.
Returns:

results – Dictionary of results with the following keys:

  • "status": SUCCESS/FAILURE
  • "failure_message": if FAILURE, message indicates reason for failure, may include traceback
  • "logs": list of collected log messages
  • "model_class": Name of model class
  • "model_kwargs": dict of model keyword arguments (settings)
  • "formatter_class": Name of formatter class
  • "formatter_kwargs": dict of formatter keyword arguments (settings)
  • "eemeter_version": version of the eemeter package
  • "modeled_energy_trace": modeled energy trace
  • "derivatives": derivatives for each interpretation
  • "weather_source_station": Matched weather source station.
  • "weather_normal_source_station": Matched weather normal source station.

Return type:

dict