Skip to content

Simulation Configuration

LeonBein edited this page Nov 29, 2019 · 4 revisions

Simulation configurations are the heart configuration files for Scylla simulations. For each Process Model of the simulation, one simulation configuration is needed.

General structure of file

SCs are encoded as .xml files. Their root contains all needed namespace definition and can also contain multiple <simulationConfiguration> tags. Currently, however, only one simulation configuration per file is allowed.

Element simulationConfiguration

Each simulationConfiguration element must contain a unique id attribute to identify it, a processRef attribute that equals the process id of the corresponding process, a processInstances attribute for the number of process instances that should be spawned when starting the simulation, and a startDateTime that is parseable by the ISO-8601 extended local or offset date-time format (e.g. "2022-03-24T00:00+02:00"). An additional endDateTime attribute can be specified, if the simulation of the specific process should be terminated before all of its instances finish. At least one startEvent element with a specified arrival rate must be present as child element of each simulationConfiguration element, to determine in which rate to spawn the process instances. A randomSeed attribute can be specified for all instances of the process. It will determine random elements such as task durations, event arrival rates, gateway branching behavior and more. If not set, the global seed specified inside the Global Configuration is used. simulationConfiguration elements contain a number of children which each define one aspect of the simulation configuration, mostly mapping to one element of the Process Model.

Standard Simulation Configuration Elements

There is a set of elements inside the a simulation configuration file that can be parsed without plugins. These are:

startEvent

startEvent elements are mandatory for all configurations that are not for subprocesses. It configures the arrival rate of a BPMN start event. A startEvent element must have an id attribute that maps to the id of the corresponding BPMN start event. It contains an arrivalRate element, which has a timeUnit (matching java TimeUnit enum names) attribute and in turn contains a distribution element (for distributions see below).

task

task elements define the configuration for a BPMN task. A task element must have an id attribute that maps to the id of the corresponding BPMN task. It should contain a duration and a resources element, which describe how long the task takes and which resources are needed. Additionally a setUpDuration child can be defined, which is similar to the duration element, but describes the setup duration. If not defined, no (setup-) duration or no resources are assumed. A (setup-) duration element has a timeUnit (matching java TimeUnit enum names) attribute and contains a distribution element (for distributions see below). resources elements contain one or more resource elements which represent the assignment of one resource type. resource elements have the attributes id which must match a resource id from the Global Configuration, and amount whicht descibes how many instances of the resource type with the given id are needed to perform the task. Optionally a resource element can contain an assignmentDefinition element, which contains more information on how the resource should be assigned. Name and body of children of this element are saved as pair for later use, one example would be <nsp:priority>4</nsp:priority> which would set the priority of this assignment to 4. (See Global Configuration#Resource assignment strategies for more)

subProcess

subProcess elements encapsulate the configuration for one bpmn subprocess. It must have an id attribute that maps to the id of the corresponding BPMN sub process. A subProcess element is handled as if it was the root element for a new simulationc onfiguration and might contain each of the standard simulation configuration elements.

Plugin elements

All other elements that a simulation configuration root contains belong to different Plugins. A good example are exclusiveGateway from the Exclusive Gateway.

Distributions

As the simulation is based on randomness, distributions are used to model it. Therefore, many elements inside a simulation configuration might contain distributions. A distribution contains of one root element containing multiple parameter elements. The element types and their attributes are:

  • binomialDistribution : models a binomial distribution
    • probability : double between 0 and 1
    • amount : integer
  • constantDistribution : constantly returns one value
    • constantValue : double
  • erlangDistribution : models an erlang distribution
    • order : integer >= 1
    • mean : positive double
  • exponentialDistribution : Models an exponential distribution
    • mean : positive double
  • triangularDistribution : models a triangular distribution
    • lower : double <= peak and < upper
    • peak : double >= lower and <= upper
    • upper : double > lower and >= peak
  • normalDistribution : models a normal distribution
    • mean : double
    • standardDeviation : double > 0
  • poissonDistribution : models a poisson distribution
    • mean : double
  • uniformDistribution models an uniform distributions
    • lower : double <= upper
    • upper : double >= lower
  • arbitraryFiniteProbabilityDistribution : models a distribution onto a finite set of elements * entry : element with attributes value:double and frequency:double in [0;1]