Diagram

class geojson_modelica_translator.model_connectors.couplings.diagram.Diagram(coupling_graph)

Bases: object

__init__(coupling_graph)

Methods

__init__(coupling_graph)

to_dict(context_id, is_coupling)

Get the diagram as a dictionary, to be used for templating for model instances or couplings.

Attributes

extent

Returns extent as a string for templating into the district model

grid_cell_size

icon_padding

property extent

Returns extent as a string for templating into the district model

Returns:

str

to_dict(context_id, is_coupling)

Get the diagram as a dictionary, to be used for templating for model instances or couplings.

Parameters:
  • context_id – str, model or coupling context_id to get the dictionary for

  • is_coupling – bool, True if context_id is for a coupling, False if context_id is for a model

{
‘transformation’: {
‘<model name>’: {

‘<model type>’: ‘transformation(extent={{0,-10},{20,10}})’

}

}, ‘line’: {

‘<model A name>’: {
‘<model A port>’: {
‘model B name’: {

‘model B port’: ‘Line(points={{21,0},{46,0}},color={0,0,127})’

}

}

}

}

}