On this page

Cameo Simulation Toolkit supports recording verification status of runtime values. You can verify and record the status of constraints during runtime. If constraints are not met during the simulation, cells in the Requirement/Instance table will be highlighted in red on the Variables pane. You can do the normal recording verification status of runtime values by using the resultLocation tag in SimulationConfig. The instances with recorded values in slots are created at the end of simulation.

Prerequisites

If you want constraint failures to be displayed in an Instance Table, the Simulation Profile must be used in your model.


The Requirement(s) table shows that the constraint in the requirement is not met, thus the requirement is colored in red as follows



The Requirement(s) table showing the constraint within a requirement which is not met and colored in red.

If you right-click on the Variables pane and select Export Value To > Instance, the variables will be evaluated and colored in red if there are constraint failures in the instance table, as shown in the following figure



The instance table showing the constraints after being exported to an Instance.


The status (pass/fail), related requirements, and instances for constraints are recorded using the VerificationStatus stereotype that is applied on the Value specification of the properties that you are working on. You can also see the detail of the constraint failure in the tooltip when hovering the mouse over any highlighted red values in the Requirement/Instance table as shown in the following figure



The simulation console showing the variables which have met or not met the constraints.

In addition, failed verdict of State Invariant is highlighted with red values and the tooltip. However, you must create a Dependency relation between the testcase and value property as shown in the following figure.


Failed State Invariant with highlighted red values and the tooltip.

If the VerificationStatus state on the Value specification fails, the active validation will be marked for notification with the fail status tag as shown in the following figure


The Specification dialog showing verification status with the fail status tag.

The VerificationStatus stereotype, as shown in the figure above, has the tags as follows

Tag

Description

constraintThe name of the failure constraint.

requirement

The name of the failure Requirement.

status

The result of the verification, either pass or fail.

timestampThe timestamp of the first failure recorded.

Remember Failure Status option

During the evaluation of particular configurations and scenarios, some Requirements/constraints can fail, and those values are marked in red. However, they may pass later and are marked in green again, but the failure is not recorded by default. To solve this problem, Simulation Toolkit provides the Remember Failure Status option in «SimulationConfig» to remember any failure status until the termination and record it as fail, even though it passes at the end. If the Remember Failure Status option is set true, and there are constraint failures during the simulation, the first fail status will be recorded in the status of «VerificationStatus» of new/recorded instance, and the time of the first failure will also be recorded in the timestamp tag as shown in the figure below.

Setting the Remember Failure Status tag of a SimulationConfig to record the fail status and timestamp if available.