Once a model is created, pressing the "Go" button brings up a simulation dialog. The actions associated with each button are as follows:
button progresses one step in a token game. Simulation time associated with the step (frame) is shown in Simulation Menu window together with the step (frame) number itself, while token movements can be observed in the main window. Time units and the precision of time shown can be adjusted in the general properties (under the properties menu)
button moves the simulation one step (frame) back
button resets the simulation to the beginning using the same random seed (so that moving forward will repeat exactly the same sequence of steps)
button resets the simulation to its initial state using a new seed, so a different sequence can be observed
button will trigger an animation of a single run with properties as defined in simulation properties dialog (see below) while the simulation window displayes the time for the next event
button will skip forward the number of steps defined in simulation properties dialog (see below), the default value is 5 steps (frames)
button will initiate a Monte Carlo simulation. A progress bar will appear on the right while MC is running. When the simulation is finished, the bottom of the Simulation Menu will indicate how much time in seconds it took to complete the simulation
After simulation is done results can be evaluated by means of sensors and metrics and exported into Excel using output options.
Simulation Property Dialog
Simulation parameters dialog (asessed from the menu bar under parameters) allows to change the default simulation time (50) and number of simulation (100,000)
Selecting number of time steps determines the number of intermediate time points where sensor information is recorded during transient simulation. When the simulation is complete, saving a report will create a excel file that plots the history for each sensor (so that for 300 time steps implies that sensor values at 300 time points are recorded in the report)
There are two types of animation: event-based and time-based selected
Event-based simulation provides an automated token game with each transition visualized as a token movement that takes "Single step delay" in addition, the user can specify the duration of the pause between the events (in seconds)
For time-based animation animation time in seconds can be specified in sumulation properties to control the speed of the animation of the token game: for the properties provided above animation will run for 5 seconds and simulate a single run up to the end of simulation time. Duration of event-based animation depends on the number of events and usually is not known apriori.
Single step delay (sec) specifies the time for animation of a single transition; if it is set to zero, no animation of transition takes place and token is fired instantenously
Steps skipped in FF (fast forward): specifies how many steps of simulation are done with a single click of
The option "Showing number of tokens" specifies the minimum number of tokens that are shown in the Place label during the animation. If it is set to zero the number always shown, if to -1 the number of tokens is not shown
Regular Monte Carlo simulation is run by default, with another option to generate raw traces for each run and save them in binary matlab file .mat format for further postprocessing (the file is recorded in the current directory with the name "trace.mat").
It is recommended to run one or few replications at a time due to the large size of the files. The events are only recorded if either the origin or the destination place has a sensor (so, add a sensor to the places that you want to be tracked).
The following data elements are recorded:
"time": time of the event (real number)
"placeNames": the names of places
"place": place (integer) showing the index of the new place (which received
the token). If the place does not have a sensor, the output is "-1"
"oldplace": old place (integer) showing the index of the old place (the origin of the the token). If the place does not have a sensor, the output is "-1"
"token": token (integer) showing the index of the token that has been moved
"color": token color (integer) showing the color of the token that has been moved
"shadow": shadow ID (integer) showing the index of the "shadow":
token's second (recessive) ID that was inhereted from the merging of tokens (see
Joints)
To allow for large files version 2.1.6 and higher writes incrementally in blocks of 10,000 entries at a time. Each block is recorded into a matrix with 6 columns and 10,000 rows, with the following convension: "V2X3TraceData" is the second block for the third run. The number of runs, size and the number of blocks, as well as the number of records in the last block are provided in the array Dimensions (so the rest of the last block can be discarded). A simple matlab routine is available upon request that would combine those files in Matlab.
One can save the runs (i.e. the random seed), so that later the results can be repeated by selecting the saved run