Prototypes¶
Classes:
|
Generates a composition of SimVar and SimEvent that represents a BPMN end event. |
|
Generates a composition of SimVar and SimEvent that represents a BPMN exclusive join gateway. |
|
Generates a composition of SimVar and SimEvent that represents a BPMN exclusive split gateway. |
|
A SimVar that represents a BPMN Flow. |
|
Generates a composition of SimVar and SimEvent that represents a BPMN intermediate event. |
|
A SimVar that represents a parallel join gateway. |
|
A SimVar that represents a parallel split gateway. |
|
Generates a composition of SimVar and SimEvent that represents a BPMN start event. |
|
Generates a composition of SimVar and SimEvent that represents a BPMN task. |
|
Superclass for all prototypes. |
- class simpn.prototypes.BPMNEndEvent(model, incoming, outgoing, name)¶
Generates a composition of SimVar and SimEvent that represents a BPMN end event.
- Parameters:
model – the SimProblem to which the event composition must be added.
incoming – a list with one SimVar: a case SimVar.
outgoing – parameter is only here for consistency, must be [].
name – the name of the event.
- class simpn.prototypes.BPMNExclusiveJoinGateway(model, incoming, outgoing, label)¶
Generates a composition of SimVar and SimEvent that represents a BPMN exclusive join gateway. A join gateway has multiple incoming flows and one outgoing flow.
- Parameters:
model – the SimProblem to which the event composition must be added.
incoming – a list with exactly one SimVar: a case SimVar.
outgoing – a list with at least two SimVar: a case SimVar.
label – the label on the gateway.
- class simpn.prototypes.BPMNExclusiveSplitGateway(model, incoming, outgoing, label, behavior)¶
Generates a composition of SimVar and SimEvent that represents a BPMN exclusive split gateway. A choice has a single incoming flow (SimVar) and multiple outgoing flows (SimVar) to choose from. A behavior function must be specified that determines which outgoing flow is chosen. The behavior function must take a single input parameter, which is the incoming flow. The behavior function must return a list of SimToken, which are put on the outgoing flows. For outgoing flows that are not chosen, the behavior function must None. Exactly one SimToken must be returned for each outgoing flow.
- Parameters:
model – the SimProblem to which the event composition must be added.
incoming – a list with exactly one SimVar: a case SimVar.
outgoing – a list with at least two SimVar: a case SimVar.
label – the label on the gateway.
behavior – specifies the choice behavior of the gateway.
- class simpn.prototypes.BPMNFlow(model, _id)¶
A SimVar that represents a BPMN Flow. It is just a SimVar with a different visualisation.
- class simpn.prototypes.BPMNIntermediateEvent(model, incoming, outgoing, name, behavior, guard=None)¶
Generates a composition of SimVar and SimEvent that represents a BPMN intermediate event. The intermediate event can make changes to the data of a case and can generate waiting time for the case.
- Parameters:
model – the SimProblem to which the event composition must be added.
incoming – a list with at least one SimVar: a case SimVar.
outgoing – a list with at least one SimVar: a case SimVar.
name – the name of the event.
behavior – specifies the changes that the intermediate event makes to the data and the delay that the intermediate event may lead to.
guard – an optional guard that specifies under which condition the intermediate event can happen.
- class simpn.prototypes.BPMNParallelJoinGateway(model, incoming, outgoing, label, behavior=None)¶
A SimVar that represents a parallel join gateway. It is just a SimEvent with a different visualisation. It must have multiple incoming places and a single outgoing place. Its behavior takes the data from one of the source places and passes it to the outgoing place.
- class simpn.prototypes.BPMNParallelSplitGateway(model, incoming, outgoing, label)¶
A SimVar that represents a parallel split gateway. It is just a SimEvent with a different visualisation. It must have a single incoming place and multiple outgoing places. Its behavior takes the data from the source place and passes it to each of its outgoing places.
- class simpn.prototypes.BPMNStartEvent(model, incoming, outgoing, name, interarrival_time, behavior=None)¶
Generates a composition of SimVar and SimEvent that represents a BPMN start event. Adds it to the specified model. The start event generates new cases with the specified interarrival_time. Cases are places on the outgoing SimVar. The cases will be a tuple (unique_number, case_data). Case_data will be generated according to the specified behavior, or unspecified if behavior==None.
- Parameters:
model – the SimProblem to which the start event composition must be added.
incoming – parameter is only here for consistency, must be [].
outgoing – a list with a single SimVar in which the cases will be placed.
name – the name of the start event.
interarrival_time – the interarrival time with which events are generated. Can be a numeric value or a function that produces a numeric value, such as a sampling function from a random distribution.
behavior – an optional behavior describing how case_data is produced.
- class simpn.prototypes.BPMNTask(model, incoming, outgoing, name, behavior, guard=None, outgoing_behavior=None)¶
Generates a composition of SimVar and SimEvent that represents a BPMN task. Adds it to the specified model. The task must have at least two incoming and two outgoing SimVar. The first SimVar represents the case that must be processed by the task and the second the resource. There can be additional SimVar that represent additional variables that the task may need or produce. The behavior specifies how the task may change the case data. It also specifies the processing time of the task in the form of a SimToken delay. The behavior must take input parameters according to the incoming variables and produces a single intermediate variable, which must be a tuple (case, resource [, <additional variable 1>, <additional variable 2>, …])@delay.
- Parameters:
model – the SimProblem to which the task composition must be added.
incoming – a list with at least two SimVar: a case SimVar, a resource SimVar, and optionally additional SimVar.
outgoing – a list with at least two SimVar: a case SimVar, a resource SimVar, and optionally additional SimVar.
name – the name of the task.
behavior – the behavior function, which takes at least two input parameters according to the incoming variables and produces a single intermediate variable.
guard – an optional guard that specifies which combination of case and resource is allowed. The guard must take at least two input parameters according to the incoming variables.
outgoing_behavior – an optional behavior that specifies how the outgoing variables are produced from the single intermediate variable.
- class simpn.prototypes.Prototype(model, incoming, outgoing, name)¶
Superclass for all prototypes. Contains the basic structure of a prototype, which is a composition of SimVar and SimEvent. A prototype must subclass this class. Each event and variable that the prototype creates must both be added to the model and to the prototype itself. The prototype must finally be added to the model, using the model.add_prototype() method.