Main Content

Create Prioritized Requirements

Since R2024a

You can use the Requirements Table block to create prioritized sibling requirements. When you run the model and the block reaches the first prioritized requirement with a true precondition, the block checks the postcondition for that requirement and does not check the preconditions or postconditions for subsequent sibling requirements. You can create prioritized child requirements by specifying the child evaluation for a parent requirement, or create prioritized first-level hierarchy requirements by specifying the child evaluation for the requirements table. For more information on requirement hierarchy and child evaluation, see Establish Hierarchy in Requirements Table Blocks and Specify Child Evaluation in Requirements Table Blocks.

Specify Prioritized Evaluation for First-Level Hierarchy Requirements

To create prioritized first-level requirements, ensure that a row is not selected, and, in the Rows section, set Evaluation to Prioritized. The prioritized icon indicates that the requirements are prioritized. Only the requirements in the first level of hierarchy become prioritized.

For example, in this table, the block evaluates the first requirement. If u1 and u2 are equal to 0, the block assigns the data y a value of 0. If the first requirements preconditions do not evaluate to true, the block checks the preconditions of the second requirement. If the second requirements precondition evaluate to true, then the block assigns y a value of 1 and does not check requirement 3 or 4.

Requirements table with four prioritized first-level requirements.

You can create prioritized first-level requirements programmatically by setting the ChildEvaluation property of RequirementsTable

Specify Prioritized Evaluation for Child Requirements

To make the children of a parent requirement prioritized, select the row index of a parent requirement. Then, in the Table tab, in the Rows section, set Evaluation to Prioritized. The prioritized icon in the index column indicates prioritized requirements. When you specify child requirements as prioritized, only the direct children of the selected parent requirement become prioritized.

To remove the prioritized child evaluation of the parent requirement, click the requirement row index and set Evaluation to Independent.

You can create prioritized child requirements programmatically by setting the ChildEvaluation property of a RequirementRow.

See Also

|

Related Topics