Creating constraint blocks

You can add constraint properties to parametric diagrams. Parametric diagrams are based upon constraint properties.

Procedure

  1. Right-click the package in the browser where you want the diagram to be created and then select Add New > Diagrams > Block Definition Diagram.
  2. Select the Constraint Block buttonConstraint Block button above the window and place the constraint block on the block definition diagram.
  3. To add a new constraint, right click on the block and select Add New > Constraint.

    Constraint Block button

    The specifications and the names of the constraints appear within SysML block constraint compartment. Constraint Block button

  4. Rename the new constraint block using the Features window.

    You can edit Constraints from the Block Feature window.

    Constraint Block button

  5. Since constraints can only be added to an element in the browser, right-click the constraint block and select Locate. This option navigates to that constraint block in the browser.
  6. Right-click the constraint block and select Add New > General Elements > Constraint. This selection specifies the relationship between the constraint parameter and the constraint block.
  7. Open the Constraint Features window and rename the constraint. Click Apply.
  8. In the Specification of the constraint, add the appropriate mathematical relationship, that is, Volume=B*D*H. Click Apply and the constraint features appear in the constraint block.
  9. Add attributes to the constraint block if there are any constants that the constraint formula might use, for example g which is 9.81 M/s2. Click OK to close the window and save the Features you entered.
  10. Add constraint parameters for the variables in the constraint formula. This addition might also be accomplished from the browser. Right-click the constraint block and select Add New > Constraint Blocks > ConstraintParameter. Rename the parameter in the Features window.
  11. The constraint parameter might be typed with an SI unit by opening its Features window and then selecting Type. From the list, scroll to the top and select <<Select>>, navigate through the package tree to the SysML profile, and locate the ModelLibrary unit definitions. Select the correct unit definition.
  12. The constraint parameter with its type then displays on the constraint block. New constraint parameters can be added to the constraint block directly from the constraint parameters section of the browser hierarchy. Repeat the constraint parameter definition steps (1012) for each variable element in the constraint.

Results

Constraints are included in the Compartments field of the SysML block state machine.

Constraint Block button

You can automatically convert ConstraintBlock to ConstraintProperty when the Block and the ConstraintBlock are connected by a Direct Composition.

An alert message appears if the newly created requirement block has the same name with an already existing one.


Feedback