Skip to content

Conversation

@avdudchenko
Copy link
Contributor

@avdudchenko avdudchenko commented Aug 30, 2025

This adds ability for a user to specify custom names for unit blocks and unit arcs by providing a unit_model_display_names option to Connectivity module. The unit_model_display_names should be a dict that maps block names and arc to desired display names, for example.
The bloc names should be unique, while arcs do not have to be unique, as in the example bellow:

map_dict= {
        m.fs.M01.name: "user_M01",
        m.fs.H02.name: "user_H02",
        m.fs.F03.name: "user_F03",
        m.fs.s01.name: "connector",
        m.fs.s02.name: "connector",
    }
conn = Connectivity(input_model=model, unit_model_display_names=user_name)
conn.show() 

Will produce the following output:

user_test_image

Arc naming is only supported in Mermaid graphs, as it's done on the fly during generation, we need to add support for D2, but I am not sure how to do it as I only use Mermaid atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant