public class TristatePhilNetGenerator
extends java.lang.Object
| Constructor and Description |
|---|
TristatePhilNetGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPhilA(PetriNet pn,
int i,
int next)
Override point to generate arcs for one philosopher
|
protected Philosopher |
addPhilPT(PetriNet pn,
int i)
Override point to generate places and transition for one philosopher
|
PetriNet |
generateNet(int n)
Method to generate a net of a given size.
|
protected Philosopher addPhilPT(PetriNet pn, int i)
pn - net which get generatedi - number of the philosopherPhilosopher object holding informations about the new created philosopherprotected void addPhilA(PetriNet pn, int i, int next)
pn - net which get generatedi - number of the philosophernext - number of the neighboring philosopherpublic PetriNet generateNet(int n)
NetGeneratorgenerateNet in interface NetGeneratorn - Parameter for the size of the net.