Deserialize

Restore / Deserialize previously serialized tessif features using json.

class tessif.deserialize.RestoredResults(json_stream)[source]

Bases: object

Json Deserialzed Resultiers.

property node_data

Return all recognized node keyed results.

property edge_data

Return all recognized edge keyed results.

property system_wide_data

Return all recognized system wide results.

property inbounds

Inbound node mapping.

Mapping of a list of inbound nodes (in fact their uid string representations) to the node (in fact its uid string representations) being the target of the inbounds.

Meaning, for an energy system like 1 -> 2 <-3, this mapping would look like

inbounds['1'] == []
inbounds['2'] == ['1', '3']
property outbounds

Outbound node mapping.

Mapping of a list of outbound nodes (in fact their uid string representations) to the node (in fact its uid string representations) being the source of the outbounds.

Meaning, for an energy system like 1 <- 2 -> 3, this mapping would look like

outbounds['1'] == []
outbounds['2'] == ['1', '3']
tessif.deserialize.deserialize_nodes(nodes)[source]

Deserialize node results.

tessif.deserialize.deserialize_uid_nodes(node_uid_dict)[source]

Deserialize node uids.

tessif.deserialize.deserialize_eges(edge_list)[source]

Deserialize edge results.

tessif.deserialize.deserialize_pure_dict_results(results_dict)[source]

Deserialize dict results needing no additional parsing.

tessif.deserialize.deserialize_singular_results_values(result_values)[source]

Deserialize singular value results.

tessif.deserialize.deserialize_dicts_of_pdseries_results(result_dict)[source]

Deserialize dicts of pandas series results.

tessif.deserialize.deserialize_dicts_of_dataframe_results(results_dict)[source]

Deserialize number of constraints results.

tessif.deserialize.deserialize_edge_keyed_results(results_dict)[source]

Deserialize net energy flow results.

class tessif.deserialize.SystemModelDecoder(*args, **kwargs)[source]

Bases: json.decoder.JSONDecoder

Decoder used in tessif system model deserialization.

parse_tuple(tpl)[source]

Parse Tessif’s various tuple stirngs.

parse_edge_key(edge_string)[source]

Parse the edge string key.

tuple_hook(d)[source]

Modify tuple decoding.