This section explains how to model system constraints in the SysML Parametric Diagram. Parametric constraints are formulas, and parameters are variables that can be bound to value properties later. Variables can be inputs and outputs of the formula. In general, you must perform the following steps to model your system constraints. However, some actions may already be done in the model creation process, so you may skip these steps and use existing model data. The following procedure provides the main workflow of modeling parametric constraints. 


To model parametric constraints


  1. Open existing project or create new.
  2. Create a new Block or use existing one. In this case, the PowerSubsystem Block is created.
  3. Create Value Properties for that Block. As shown in the figure below, three Value Properties fuelFlowRate, fuelPressure, and fuelDemand are created for a PowerSubsystem BlockSelect their types.
  4. Create Parametric Diagram for a Block which internal structure you want to display. In the opened Display Parameters/Properties dialog, select Clear all and click OK. For example, an empty PowerSubsystem Parametric diagram is created for a PowerSubsystem Block.
  5. Click the Constraint Property button on the diagram palette and then click the empty place of that diagram pane. An unnamed Constraint Property is created. 
  6. Type Constraint Property name and set a Constraint Block as its type. For example, the fuelFlow Constraint Property is created typed by FuelFlow Constraint Block.
  7. Type formula directly on Constraint Property shape. In this example, the equation calculate the flowrate: flowrate=press/(4*injectorDemand).
  8. Create parameters automatically from equation by clicking Parse and Create Parameters from Constraint Property smart manipulator toolbar. The parameters injectorDemandflowrate and press are created in the model. Learn more about how to create Constraint Parameters automatically >
  9. Display Constraint Parameters on Constraint Property shape by clicking Display All Parameters smart manipulator toolbar. As shown in the following figure, all Constraint Parameters are displayed on the selected Constraint Property shape. 

  10. Click  to bind all parameters to corresponding Value Properties. Map parameters with matching Value Properties and click OK. The Value Properties are displayed and connected with parameters. Learn more about Parametric Equation Wizard >

  11. Run the simulation of parametric data. Right-click the Block that owns the Parametric diagram and select Simulation Run. In the Variables tab, type values and click .