< Previous | Next >

Lesson 6: Defining a constraint and adding a parametric diagram

In this lesson, you examine the block definition diagram that specifies the context of the model in terms of its high level structural elements, the SystemUnderControl and ControlSystem blocks, as well as the constraint that specifies the behavioral dependency between these blocks.

In the block definition diagram, a Context block establishes a context for the model. The context is composed of the two systems blocks; a constraintBlock, Heat Energy Equation is used to represent the physical relationship between heat and temperature change. Each of the blocks shown on the diagram is characterized by a set of attributes, but the constraintBlock is defined by a set of constraints.

An internal block diagram, that is attached to the Context block, shows the connections between its components. This is the diagram that you completed in Lesson 4. A parametric diagram is used to show the application of the constraint represented by the Heat Energy Equation to the SystemUnderControl block, that is, to connect (or bind) the parameters of the constraints to specific attributes of the components. Since you added a mass attribute to the SystemUnderControl in Lesson 3, you can now modify the parametric diagram to include a binding to that attribute.

Block definition diagram

To add the mass attribute to the parametric diagram:

  1. In the browser, expand FunctionalAnalysisPkg > Parametric Diagrams.
  2. Double-click Heat Energy Eqn for SystemUnderControl. Four attributes are linked to the Heat Energy Equation, but one attribute is missing: the mass attribute for the m:kg parameter.
  3. In the browser, expand DesignSynthesisPkg > Block Definition Diagrams > SystemUnderControl > Attributes.
  4. In the browser, select the mass attribute and drag it to the right side of the parametric diagram and drop it near the m parameter.
  5. Select the BindingConnector tool BindingConnector tool and draw a line between the mass attribute and the m parameter.
  6. Double-click the m constraint parameter on the right edge of the Heat Energy Equation symbol to open its Features window. Set Type: kg in TypesPkg. (Remember to select the valueType kg.)
    Features window showing General tab for constraint parameter
Your parametric diagram should resemble this example.
Parametric diagram

Lesson checkpoint

In this lesson, you learned the following:
  • Using a block definition diagram to define a constraint
  • Adding an attribute to a parametric diagram
In the next lesson, you build the model and run the simulation.
< Previous | Next >

Feedback