Skip to content

Execution outside GUI

sjdayday edited this page Dec 2, 2014 · 4 revisions

home or back

Execution outside the GUI

The Runner interface enables execution of Petri nets and include hierarchies independently from the GUI. The current implementation is PetriNetRunner, which supports the execution of a Petri net or include hierarchy through the command line or through a Java program. Clients may request that execution be stopped after a given number of steps. An initial seed for pseudo-random operations can be provided; this is useful for generating repeatable test results, so that the "random" selection of the next enabled transition is in fact deterministic.

The current implementation is single-threaded -- a separate instance of PetriNetRunner is required for each Petri net or include hierarchy to be executed.

Program capabilities

The following services are only available through the Runner API, not through command line invocation.

Program clients may listen for global events, including execution start and completion, and each "firing" -- the round (step) that has just completed, the transition that fired, and the prior and resulting marking of the executable Petri net.

Program clients may also listen for token changes to places that have External interface status. Clients may also request that External places be marked. Finally, clients may provide a context for external transitions.

Continue to Questions and next steps

Clone this wiki locally