Coupling

class geojson_modelica_translator.model_connectors.couplings.coupling.Coupling(model_a, model_b, district_type=None)

Bases: object

A Coupling represents a connection/relationship between two models (e.g., a load and ets). More specifically, is used to create the required components and connections between two models.

__init__(model_a, model_b, district_type=None)

Methods

__init__(model_a, model_b[, district_type])

get_load()

If there's a load model in the coupling, it returns the load model.

get_other_model(model)

Returns the other model in the coupling

render_templates(template_params)

Renders the shared components and connect statements for the coupling.

to_dict()

Attributes

component_definitions_template_path

connect_statements_template_path

id

model_a

model_b

get_load()

If there’s a load model in the coupling, it returns the load model. Else it returns None.

This is used by the district model to find the building’s sys params so it can be passed into the coupling templates

Returns:

LoadBase | None

get_other_model(model)

Returns the other model in the coupling

Parameters:

model – Model

Returns:

Model

render_templates(template_params)

Renders the shared components and connect statements for the coupling.

Parameters:

template_params – dict, parameters for the templates

Returns:

dict, containing key, values: component_definitions, string; connect_statements, string