On this page
Instance Table with simulation results
Magic Model Analyst allows you to record the verification status of runtime values. The cells in the Variables pane and in Instance tables are highlighted in green if runtime values meet the constraints during the simulation, and in red - if they do not. You can do the normal recording verification status of runtime values by using the resultLocation tag in a Simulation Configuration. The instances with recorded values in slots are created at the end of the simulation.
To export the simulation results to an Instance Specification
- After running the simulation, do one of the following:
- In the Variables pane of the Simulation window, click .
- In the Variables pane of the Simulation window, right-click the simulated element and select Export Value To > Instance.
- Specify the resultLocation tag in a Simulation Configuration. The instances with recorded values in slots are created at the end of the simulation.
The variables are evaluated and colored in red and/or green depending on whether there are any constraint failures in the Instance Table.
The instance table with highlighted passed and failed values.
The verification status and instances for constraints are recorded using the VerificationStatus stereotype that is applied to the Value specification of the properties you are working on. You can also see the details of the constraint failure in the tooltip when hovering the mouse over any highlighted values in the Variables tab of the Simulation window as shown in the following figure.
The Variables pane displaying values with verification status.
In addition, the failed verdict values of State Invariant are highlighted in red, and the passed values are highlighted in green. However, you must create a Dependency relationship between the test case and a 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 window showing verification status with the fail status tag.
The VerificationStatus stereotype, as shown in the figure above, has the tags as follows
Tag | Description |
---|---|
constraint | The name of the failure constraint. |
margin | The Requirement margin value calculated from value properties and the Requirement boundary (a satisfy Relation). |
requirement | The name of the failure Requirement. |
status | The result of the verification, either pass or fail. |
timestamp | The 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, Magic Model Analyst 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.
Related pages