Petri net
Getting Started
Create an account
- click on register and enter the required information.
- after submission, you see a message, that you have to activate your email address. Since this is a demo installation you don’t have to verify your email
- go to login page and enter your username and password
Create a project
- Click Create an empty project and enter a project name in the upcoming dialog.
- After submission you see your new project in the list of owned.
- Click the project to open it.
Build a Petri net
- Click the file icon, placed in explorer on the left.
- In the upcoming dialog click the Model tab and select the PetriNet as model type in the dropdown.
- Pick a filename and click on the Create button.
- Click the appearing PetriNet file in the explorer to open the model in the canvas.
- Now you can start modeling your PetriNet.
- Add place and transition nodes
- Connect them with arcs by dragging from the arrow icon that appears when hovering over a place/transtion and releasing the mouse button when hovering over the target node
- Give some places a token count >0
- Test the simulation by double-clicking on transitions that are enabled
Petri net MGL
While you’re modeling the story, compare the definitions from the specification MGL file with the behavior of the modeling tool.
@style("model/PetriNet.style")
graphModel PetriNet {
package info.scce.cinco.product.petrinetpaper
nsURI "http://cinco.scce.info/product/petrinetpaper"
iconPath "icons/petri-icon.png"
diagramExtension "pn"
@style(place,"${token}")
node Place {
outgoingEdges (PlaceTransitionArc)
incomingEdges (TransitionPlaceArc)
attr EInt as token
}
@style(transition)
@contextMenuAction("info.scce.cinco.product.petrinetpaper.actions.TriggerTransition")
@doubleClickAction("info.scce.cinco.product.petrinetpaper.actions.TriggerTransition")
node Transition {
outgoingEdges (TransitionPlaceArc)
incomingEdges (PlaceTransitionArc)
}
@style(arc)
edge PlaceTransitionArc { }
@style(arc)
edge TransitionPlaceArc { }
@style(txt, "${label}")
node Txt {
attr EString as label
}
}