Global parameters provide a means to control the local properties of APN objects. Those properties can be quicky imported from Excel (XLS) file. The corresponding tables can be accessed from the file menu under parameters. There are three types of parameters:
Transition Parameters
Global parameter is linked to a particular transition policy (each transition can have several policies)
The type of transition is not case sensitive and really, only the first letter needs to be specified
Global Parameters for transitions
Token Properties specify the number and the attributes of the tokens positioned into the linked place at the start of the simulation. The same place can be connected to several token parameters, as long as the colors don't overlap
Trigger properties
Controlling each of the three sets of parameters follows similar rules:
The control parameters need to be created first and then they can be linked using appropriate object dialog (i.e., either transition, token, or trigger)
When the global parameters change all linked objects are automatically updated
The last column indicates the number of linked objects from the net
Clicking on Show Linked button brings up a window with a list of linked object (as identified by their current label).
Only parameters with no linked objects can be removed
List of linked transitions for a global parameter
Copying and pasting from/to Excel is enabled (including copying from Excel any number of rows when no parameters were previously defined in APN)
Read button allows direct reading of parameters from XLS (not XLSX) with the entries in the upper left corner of the first spreadsheet. You need to define the needed number of parameters in the model first (e.g., using copy/paste as described in the previous bullet)Save button writes a new XLS file with the parameter values
All three types of parameters can be imported with a single click by linking XLS file. The following convention is used:
the first sheet corresponds to the transition parameters, the second to token parameters, and the third to trigger parameters.
In addition, starting with the version 2.1.0, the fourth sheet of the control spreadsheet can be used to specify simulation parameters. Screen shot of the fourth tab of the parameter spreadsheet Old parameter files can be read as well (if the fourth sheet does not exist, or cell A1 does not contain "Simulation Parameters" string). When the Flag for Sensor Limits value is set to 1, then the following two rows of the input file allow to specify the start and the end limits for time averaging of all mean sensors (those limits are normalized with respect to the simulation time so only the non-negative values no greater than one are accepted). One can also control those limits individually for each sensor, so in order to avoid overriding those local setting, one can select the Flag for Sensor Limits value other than 1.
When parameters are read successfully from XLS spreadsheet the corresponding line in the menu has a green check mark as seen in the figure and an additional item appears on the menu allowing the update from the file. In addition, the name of the linked file appears at the very top bar of the window to the left of the .apn file. Parameters menu when the file has been linked successfullyOtherwise, the line in the menu shows a red cross, as shown in the next figure. Parameters menu when the file has not been linked successfully. The check of the link is intended to be the "first line of defence" and you might still want to check that the linked file is read properly. It is useful when you accidentally try to link to some XLS file that has not been formatted as expected.