Variant Connector Block with Simscape Bus Block
This example shows how to use Variant Connector blocks with the Simscape Bus block.
In this example, the mechanical and electrical network lines are bundled together using the Simscape Bus block. The components of the mechanical network are in the leaf region formed by the leaf Variant Connector block VC1. The components of the electrical network are in the leaf region formed by the leaf Variant Connector block VC2. During simulation, VC1 and VC2 are aware of the Simscape Bus hierarchy and its connectivity. This means that if the variant condition A==1
evaluates to true
, only the components in the mechanical network become active. The components in the electrical network remain inactive.