Isolate end-to-end connections in nested systems New in v1.1.0

What does the high-voltage battery pack power? In a nested system, the model answers that across several levels. Energy leaves the pack through a port of the battery, crosses an interface to another subsystem, and goes down through a port at every level on the other side.

A hierarchical view shows which subsystems the battery is connected to. Finding out which parts the pack powers means following the ports level by level:

The hierarchy of the vehicle, with three interfaces between the battery and the other subsystems

An isolated view of the same model can show directly which parts the pack powers:

The isolated view, the battery pack joined by one line each to the power stage, the compressor and the primary stage

All it takes is a few view attributes and a filter. The model itself stays untouched.

Example model

Take the high-voltage power distribution of an electric vehicle. In this example, the battery supplies three other subsystems:

Vehicle
├── batteryHV
│   └── packHV
├── powertrain
│   └── eAxle
│       └── inverter
│           └── powerStage
├── thermal
│   └── acLoop
│       └── compressor
└── powerNetLV
    └── dcdc
        └── primaryStage

Every part has one port, whose type defines which way the energy goes: the port of a SourceHV outputs energy, while the port of a LoadHV takes it in. An InterfaceHV connects the two:

item def ElectricalEnergy;
port def EnergyPort {
    out item electricalEnergy : ElectricalEnergy;
}
part def SourceHV {
    port energyOut : EnergyPort;
}
part def LoadHV {
    port energyIn : ~EnergyPort;
}
interface def InterfaceHV {
    end supplier : EnergyPort;
    end consumer : ~EnergyPort;
    flow of ElectricalEnergy from supplier.electricalEnergy to consumer.electricalEnergy;
}

At each subsystem level, the energy ports are bound to the respective parent’s ports. This is the relationship between the battery and the powertrain:

part def Vehicle {
    part batteryHV : SourceHV {
        part packHV : SourceHV;
    }
    part powertrain : LoadHV {
        part eAxle : LoadHV {
            part inverter : LoadHV {
                part powerStage : LoadHV;
            }
        }
    }

    bind batteryHV.packHV.energyOut = batteryHV.energyOut;
    bind powertrain.energyIn = powertrain.eAxle.energyIn;
    bind powertrain.eAxle.energyIn = powertrain.eAxle.inverter.energyIn;
    bind powertrain.eAxle.inverter.energyIn = powertrain.eAxle.inverter.powerStage.energyIn;

    interface : InterfaceHV connect batteryHV.energyOut to powertrain.energyIn;
}

A binding ties two ports together: what goes through one goes through the other. So the energy entering powertrain is passed on to eAxle, then inverter, then powerStage. The interface connects batteryHV to powertrain, but the energy travels from packHV all the way to powerStage.

The thermal system is connected the same way, but uses feature values instead of an explicit bind. The ports are bound either way, and the view treats both forms alike:

part thermal : LoadHV {
    part acLoop : LoadHV {
        port :>> energyIn = thermal.energyIn;
        part compressor : LoadHV {
            port :>> energyIn = acLoop.energyIn;
        }
    }
}

The complete model is in Download the example.

Configure the view

Start from a view that exposes everything and refine it one setting at a time. The example model includes views for each step.

private import StandardViewDefinitions::*;

view step0_showEverything : InterconnectionView {
    expose Vehicle::*::**;
}

The expose Vehicle::*::** selects everything inside Vehicle, without Vehicle itself.

By default, such a view draws everything the model has: every port, every item in a port, every binding and every interface with its ends and flows.

The default view of the vehicle, with every port, item, binding and interface drawn

Hide the interface details

By default, each interface is drawn as a node showing its internal connections and flows. Setting showConnectionElaborations to false reduces them to single lines:

attribute showConnectionElaborations = false;
The hierarchy with each interface drawn as one line from the battery to a subsystem

Hide the port details

By default, ports show all ports and parameters nested in them. Setting showPorts to compact hides any nested elements that are not directly connected to anything:

attribute showPorts = "compact";
The hierarchy with one port on each part and the binding lines between the ports

Follow the bindings

Finding out what the battery pack powers still means following a chain of binding lines, marked =, from each interface to the innermost part.

A diagram normally draws an interface between the two ports the model connects. With connectThroughBindings, it follows the binding chains and draws the interface between the last port of each. What goes through one bound port goes through the other, so the diagram still shows only what the model says:

attribute connectThroughBindings = true;
The hierarchy with each interface now drawn from the battery pack to an innermost part

The interface that ended on powertrain now ends on powerStage, and all three start on packHV, instead of batteryHV.

Hide the binding lines

The interface lines now cover the same path as the binding lines, so the binding lines can go. A filter removes them:

filter not (@ SysML::BindingConnector);
The hierarchy with three lines from the battery pack to the innermost parts and no binding lines

Hide the ports

Since the interfaces now connect the parts directly and the binding lines are hidden, the remaining ports no longer add valuable information. Changing showPorts from compact to none hides unconnected ports and draws connected ones as labeled dots:

attribute showPorts = "none";
The hierarchy without ports, with lines from the battery pack to the three innermost parts

In a small model this may be the view to keep, since the hierarchy is still in place.

Flatten the hierarchy

For a clean picture of the connections alone, the hierarchy can be dropped. Setting exposeMode to flat draws every element side by side. Each name shows its path, such as powertrain::eAxle::inverter::powerStage, so it is still clear which part it belongs to:

attribute exposeMode = "flat";
Every element of the vehicle drawn side by side, with lines from the battery pack to three of them

Keep the connected elements

Only the parts a line ends on answer what the battery pack powers. Setting showNodes to connected leaves out the other eight. This relies on the binding filter, since a drawn binding line makes both of its parts count as connected:

attribute showNodes = "connected";
The battery pack joined by one line each to the power stage, the compressor and the primary stage

Hint

Any drawn line keeps the parts at its ends. In a model with other kinds of connections, filter those out as well, the same way as the bindings.

Reuse the view

All of the covered settings can be combined into a single reusable view definition:

view def IsolatedView :> InterconnectionView {
    attribute showConnectionElaborations = false;
    attribute connectThroughBindings = true;
    attribute exposeMode = "flat";
    attribute showNodes = "connected";
    attribute showPorts = "none";
    filter not (@ SysML::BindingConnector);
}

view step7b_reusableView : IsolatedView {
    expose Vehicle::*::**;
}

Find unconnected parts

A part that was never connected does not show up in the isolated view, and nothing in the picture says it is missing. As an example, WinterVehicle adds two heaters to the thermal system and binds only one of them:

part def WinterVehicle :> Vehicle {
    part :>> thermal {
        part cabinHeater : LoadHV { port :>> energyIn = thermal.energyIn; }
        part batteryHeater : LoadHV;
    }
}

The isolated view of WinterVehicle shows the cabin heater next to the compressor, and gives no sign that the battery heater exists:

view review_connectedParts : IsolatedView {
    expose WinterVehicle::*::**;
}
The isolated view of the winter vehicle, the battery pack joined to the power stage, the primary stage, the compressor and the cabin heater

To catch such a part, a second view sets showNodes to unconnected. The bindings are not filtered out here, so only parts with neither a binding nor an interface are drawn:

view review_unconnectedParts : GeneralView {
    attribute showConnectionElaborations = false;
    attribute showPorts = "none";
    attribute exposeMode = "flat";
    attribute showNodes = "unconnected";
    expose WinterVehicle::*::**;
}
The battery heater drawn alone, as the only part of the winter vehicle that nothing is connected to

Download the example

Download this example (ZIP)

VehiclePowerDistribution.sysml
package VehiclePowerDistribution {
    item def ElectricalEnergy;
    port def EnergyPort {
        out item electricalEnergy : ElectricalEnergy;
    }
    part def SourceHV {
        port energyOut : EnergyPort;
    }
    part def LoadHV {
        port energyIn : ~EnergyPort;
    }
    interface def InterfaceHV {
        end supplier : EnergyPort;
        end consumer : ~EnergyPort;
        flow of ElectricalEnergy from supplier.electricalEnergy to consumer.electricalEnergy;
    }

    part def Vehicle {
        part batteryHV : SourceHV {
            part packHV : SourceHV;
        }
        part powertrain : LoadHV {
            part eAxle : LoadHV {
                part inverter : LoadHV {
                    part powerStage : LoadHV;
                }
            }
        }
        part thermal : LoadHV {
            part acLoop : LoadHV {
                port :>> energyIn = thermal.energyIn;
                part compressor : LoadHV {
                    port :>> energyIn = acLoop.energyIn;
                }
            }
        }
        part powerNetLV : LoadHV {
            part dcdc : LoadHV {
                part primaryStage : LoadHV;
            }
        }

        bind batteryHV.packHV.energyOut = batteryHV.energyOut;
        bind powertrain.energyIn = powertrain.eAxle.energyIn;
        bind powertrain.eAxle.energyIn = powertrain.eAxle.inverter.energyIn;
        bind powertrain.eAxle.inverter.energyIn = powertrain.eAxle.inverter.powerStage.energyIn;
        bind powerNetLV.energyIn = powerNetLV.dcdc.energyIn;
        bind powerNetLV.dcdc.energyIn = powerNetLV.dcdc.primaryStage.energyIn;

        interface : InterfaceHV connect batteryHV.energyOut to powertrain.energyIn;
        interface : InterfaceHV connect batteryHV.energyOut to thermal.energyIn;
        interface : InterfaceHV connect batteryHV.energyOut to powerNetLV.energyIn;
    }

    part def WinterVehicle :> Vehicle {
        part :>> thermal {
            part cabinHeater : LoadHV { port :>> energyIn = thermal.energyIn; }
            part batteryHeater : LoadHV;
        }
    }

    occurrence def Diagrams {
        private import StandardViewDefinitions::*;
        view def IsolatedView :> InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute connectThroughBindings = true;
            attribute exposeMode = "flat";
            attribute showNodes = "connected";
            attribute showPorts = "none";
            filter not (@ SysML::BindingConnector);
        }

        view step0_showEverything : InterconnectionView {
            expose Vehicle::*::**;
        }
        view step1_hideInterfaceDetails : InterconnectionView {
            attribute showConnectionElaborations = false;
            expose Vehicle::*::**;
        }
        view step2_hidePortDetails : InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "compact";
            expose Vehicle::*::**;
        }
        view step3_followBindings : InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "compact";
            attribute connectThroughBindings = true;
            expose Vehicle::*::**;
        }
        view step4_hideBindingLines : InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "compact";
            attribute connectThroughBindings = true;
            filter not (@ SysML::BindingConnector);
            expose Vehicle::*::**;
        }
        view step5_hidePorts : InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "none";
            attribute connectThroughBindings = true;
            filter not (@ SysML::BindingConnector);
            expose Vehicle::*::**;
        }
        view step6_flattenHierarchy : InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "none";
            attribute connectThroughBindings = true;
            attribute exposeMode = "flat";
            filter not (@ SysML::BindingConnector);
            expose Vehicle::*::**;
        }
        view step7_keepConnectedParts : InterconnectionView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "none";
            attribute connectThroughBindings = true;
            attribute exposeMode = "flat";
            attribute showNodes = "connected";
            filter not (@ SysML::BindingConnector);
            expose Vehicle::*::**;
        }

        view step7b_reusableView : IsolatedView {
            expose Vehicle::*::**;
        }

        view review_connectedParts : IsolatedView {
            expose WinterVehicle::*::**;
        }
        view review_unconnectedParts : GeneralView {
            attribute showConnectionElaborations = false;
            attribute showPorts = "none";
            attribute exposeMode = "flat";
            attribute showNodes = "unconnected";
            expose WinterVehicle::*::**;
        }
    }
} // package VehiclePowerDistribution