SySim model execution log (SySim)
While running a SySim model execution, SySim can record a log of the data being passed between the SySim Control Blocks.
To record a log from a SySim model execution, you must have Microsoft Office Excel™ installed on your computer.
To record a log from a SySim model execution, click the
Simulation Log button on the SySim Control Bar. After clicking the Simulation Log button, the log is recorded to a Microsoft Spreadsheet.
After saving the SySim model execution log spreadsheet, you can import that spreadsheet to a Sequence Diagram in Modeler. To import a SySim model execution log file: right-click a Sequence Diagram, point to SySim, and then click Import Sequence Diagram.
On the form of the application generated by SySim, there is an Errors button with an exclamation mark icon. This button:
- Becomes active before the simulation starts to indicate there are errors or warnings that may affect the simulation intent.
- Becomes active during the simulation to indicate there is simulation log output.
When the button is active, pressing the button opens a dialog where the last 500 lines of the contents can be seen.
SySim model execution log
The SySim model execution log spreadsheet includes the following information:
·Time column - records the SySim model execution step number at which the message was generated.
• Time column - records the SySim model execution step number at which the message was generated.
• Message column - records the name of the output port from which the message flowed.
• Parameters column - records the parameters that were passed by the message.
• Block property columns - a column is created for each Block Property the SySim Simulator block owns.
• Message rows - a row is created for each message that flows from a shown Block Property. The row indicates the start and end Block Properties for the message.
This example uses the Traffic Lights - SySim example model. The SySim model execution has been generated from the Traffic Lights SySim Simulator block.
The log is generated to a Microsoft Excel spreadsheet and you can see the columns that are created for each Block Property of the Traffic Lights SySim Simulator block. You can also see that a row is created for each message that flows between those Block Properties, the source Block Property cell is shown in Orange and the receiving Block Property cell is shown in Blue. The name of the output port and the parameters being passed are shown in the Message and Parameters columns.
Imported SySim model execution log
After importing a SySim model execution log file, in the Package that owns the Sequence Diagram SySim creates Events and Instances:
• Events - An Event is created for each port from which a message flows. The name of the Event is set to that of the port.
• Instances - An Instance is created for each Block Property the SySim Simulator block owns.
• The Sequence Diagram that is populated from the SySim model execution log file includes the following items and information:
• Block Property Instances - The instances that were created for each Block Property the SySim Simulator block owns.
• Statements - a Statement is created for each message that flows from an output port of a shown Block Property. The name of the Statement is set to the Event (the port from which the message flowed).
• Event Message- an Event Message is created for each message that flows from an output port of a show Block Property. The Event used for the message is the Event that was created for the output port.
The Actual Parameters property of each Event Message is set to the parameter values that are passed by the message.
In the following example, the preceding example SySim model execution log file has been imported into a Modeler Sequence Diagram. In the Log Input package you can see the instances that have been created for each Block Property of the Traffic Lights SySim Simulator block and the Events that have been created for each port from which a message flows. On the Sequence Diagram you can see that a Statement has been created for each message that flows between the shown Block Properties and you can see the Event Messages and their passed parameter values.
Parent topic