Skip to content

Include component name in path for nested modifications #480

@AntoineGautier

Description

@AntoineGautier

unpackModblock does not aggregate nested component names.
For example, the following class mods

model VAVMultiZone "Multiple-zone VAV"
  extends Buildings.Templates.AirHandlersFans.Interfaces.PartialAirHandler(
    nZon(final min=2),
    redeclare final Buildings.Templates.AirHandlersFans.Configuration.VAVMultiZone cfg(
      final nFanSup=if fanSupDra.typ <> Buildings.Templates.Components.Types.Fan.None then 
        fanSupDra.nFan elseif fanSupBlo.typ <> Buildings.Templates.Components.Types.Fan.None
        then fanSupBlo.nFan else 0,

are stored as

    {
      "modelicaPath": "Buildings.Templates.AirHandlersFans.VAVMultiZone",
      "type": "Buildings.Templates.AirHandlersFans.VAVMultiZone",
      "name": "Multiple-zone VAV",
      "value": "Buildings.Templates.AirHandlersFans.VAVMultiZone",
      "visible": false,
      "modifiers": {
        "Buildings.Templates.AirHandlersFans.VAVMultiZone.min": { // should be Buildings.Templates.AirHandlersFans.VAVMultiZone.nZon.min
          "expression": {
            "operator": "none",
            "operands": [
              2
            ]
          },
          "final": true,
          "redeclare": false
        },
        "Buildings.Templates.AirHandlersFans.Interfaces.PartialAirHandler.cfg": {
          "expression": {
            "operator": "none",
            "operands": [
              "Buildings.Templates.AirHandlersFans.Configuration.VAVMultiZone"
            ]
          },
          "final": true,
          "redeclare": true
        },
        "Buildings.Templates.AirHandlersFans.VAVMultiZone.nFanSup": { // should be Buildings.Templates.AirHandlersFans.VAVMultiZone.cfg.nFanSup
          "expression": {
            "operator": "if_elseif", 
// ... truncated

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions