stemp_abw.results package

Submodules

stemp_abw.results.io module

stemp_abw.results.io.oemof_json_to_results(results_json)[source]

Convert stored oemof results json back to result dicts

Parameters:results_json (JSON formatted str) – Format see stemp_abw.results.tools.oemof_results_to_json()
Returns:
  • dict – Results from optimization as returned by oemof.outputlib.processing.results() (sequences only without timestamps, no scalars)
  • dict – Parameters of optimization as returned by oemof.outputlib.processing.parameter_as_dict() (scalars only, no sequences)
stemp_abw.results.io.oemof_results_to_json(results, param_results)[source]

Convert oemof raw results to json

Parameters:
  • results (dict) – Results from optimization as returned by oemof.outputlib.processing.results()
  • param_results (dict) – Parameters of optimization as returned by oemof.outputlib.processing.parameter_as_dict()
Returns:

Serialized results, format: {‘param_results’:

{‘node_from_1’:
{‘node_to_1’: {‘scalars’: {‘param_1’: val_1,

’param_2’: val_2}

}

}

},

’results’:
{‘node_from_1’:
{‘node_to_1’: {‘sequences’: [n values]

}

}

}

}

Return type:

JSON formatted str

Notes

  • Node keys in results and para_results must be provided as strings using oemof.outputlib.processing.convert_keys_to_strings()
  • In the sequences, timestamps are not preserved (values only)

stemp_abw.results.result_charts module

stemp_abw.results.results module

stemp_abw.results.serializers module

class stemp_abw.results.serializers.ResultLayerDataSerializer(options)[source]

Bases: object

Serializer for GeoJSON result layers

get_features(queryset)[source]
serialize(queryset)[source]

Serialize queryset

Module contents