Help Topics Concepts Package Class

## Petri Net Agent Properties and Use

### Properties

The Petri Net Agent panel provides these options:

Architecture
  The Petri Net architecture consists of these elements:
  1. Variables, text section which defines the set of global variables and types referenced by the initialization logic and Transition rules.
  2. Init, text section which contains an ABLE init() ruleblock.
  3. Transitions, one or more Transition nodes which contain an optional boolean guard clause, and actions.
  4. Places, one or more Place nodes which define states and hold Tokens.
  5. Arcs, links Places and Transitions.

### Use

The Petri Net Agent panel is used to define the variables and initialization sections of the Petri Net ruleset.

Steps in using the panel include:

1. Define any import statements for user-defined or standard Java library classes.
2. Create a variables section and define all global variables references by the initialization ruleblock or by Transition rules. The minimal set includes defining Vector tokens ; to hold the set of tokens and a declaration for the type of token used in the Petri Net .. for example Boolean token; if the tokens are simple Boolean values.
3. Create an optional init() ruleblock to perform one-time initialization of the Petri Net state. Actually this is a place where user-defined ruleblocks can also be included in the generated Petri Net ruleset. The initial marking of the Petri Net is usually defined in the individual Place node initial expressions.

For more information refer to the PetriNetAgent details or PetriNetTutorial.