0

I am currently building a controller that should take a Petri Net and, based on input events it receives from another device, should fire output events to that same device.

The question is: how would a Petri Net fire output events to an external device?

  • Should it fire an event when a place receives a token?
  • Should it fire an event when a transition is activated?
  • ...
tibaum
  • 43
  • 1
  • 5

1 Answers1

0

Answers to these questions depend on the technology and/or application.

For example consider an application where the position of a robot on the floor is controlled by a mouse. The floor is represented on the computer screen and the pointer stands for the position of the robot. The mouse down, mouse move and mouse up input events will be used in the application. When a mouse down event occurs the intialize robot (output) event is sent to the robot. When a mouse move event occurs the move robot (output) event is sent to the robot. When a mouse up event occurs pause (output) event is sent to the robot.

Figure 1 (of the PDF version) is a token game of the control logic coupled with a simulation of the robot and the floor. For this simulation the computer screen is represented by Transition T2. The mouse down in Transition T0 stands for the mouse down of the application, the mouse click in Transition T2 stands for the mouse up of the application. The mouse move in Transition T2 fires the move robot event in the simulation. The robot (red dot) moves immediately to the new position.

enter image description here

For the mouse down event in Transition T0 it does not matter if the output event fires when the transition is enabled or when the output of the transition fires. This is because when the transtion is enabled it is expected to fire eventually within a short period of time. For the mouse move event in Transition T2 the move robot event should fire when the transition is enabled because Transition T2 is not exepcted to fire until the mouse up event occurs.

A dynamic and interactive diagram is available in PDF: "How to Fire a Petri Net for Output Events" An HTML with JavaScrtip+SVG is also available as an attachment of the PDF document.