308-522A: Modelling and Simulation

308-522A: Modelling and Simulation

The xpns Petri Net Simulator

The directory Petri Net models contains the .net files for use with the PNS Petri Net simulator. To allow for a quick glance, screen grabs in GIF format are included for each of the models.
Java as well as C sources of the PNS Petri Net simulator can be obtained from the PNS modeller/simulator website.
I have installed ``xpns'' on the SOCS Sun servers (nova, mimi, ...). You only need to type (or put in your .rc files)

   alias xpns /net/u1/prof/hv/PNS/xpns
If you install from the C sources, these are the steps to follow (thanks to Hesheng Chen for trying it out):
  1. Download pns_source.tar.Z;
  2. Uncompress the above file to a directory in which you want to install xpns;
  3. "make clean" in that directory;
  4. Modify the makefile:
     i) In the section "OPTION SUN"
         change -L/usr/local/X11R5/lib to  -L/usr/X11R6/lib 
    ii) in the section "COMPILER UND LINKER"
         change "B = gcc-2.3.3 $O -o" to "B = gcc $O -o"
         change "CC = gcc-2.3.3 $O $I" to "CC = gcc $O $I"
  5. "make pns" in that directory;
  6. You can now run xpns by just issuing "xpns" or "./xpns"
  7. To make xpns accessible from any directory, make sure it either appears in your search path, you create an alias, or a link to it from a directory in your search path (such as /usr/local/bin). Modify the xpns script to reflect your PNS directory (/usr/local/src/PNS/ in this case):
       setenv XAPPLRESDIR /usr/local/src/PNS/ 

From then on, just type xpns. Don't forget to set ``Sequential Manual'' simulation mode to get insight into the dynamics.

Hans Vangheluwe