in-toolset’s documentation

in-toolset is an editor and (basic) simulator for industry workflow nets (inets), a model of interorganisational workflows based on petrinets.

Currently, the tool supports editing and manually simulating these industry workflows, and exporting industry nets as PNML petri nets, but support for checking for bisimilarity using LTSmin and for automatically generating a subset of the language of triggering sequences of an inet in XES is planned, as is a model of “domains” for organisations and messages.

in-toolset has cross-platform support and has been verified to work on linux, MacOS, and windows. It should work on most systems with python3.6 or newer and pyqt5. The recommended way to install it is to run pip install in-toolset, this makes a command-line tool in-toolset available which starts the graphical editor.

The toolset was originally created by: Daniel Otten, Jakob Wuhrer, Julia Bolt, Ricardo Schaaf, and Yannik Marchand, on behalf of Pieter Kwantes of Leiden University.

It is provided here licensed under the GNU General Public License v3.0.

Indices and tables

Submodules

common

This module allows for signalling with callbacks and interconnectable signals. To do this, the Signal and SignalListener classes are used. Furthermore, it provides the class Property which allows the creation of object properties with associated signals to signify changes.

class in_toolset.common.Property(signame, default=None)

A basic property system that can be used to add properties with getters, setters, and signals to a class..

class in_toolset.common.Signal

A Signal basically consists of a list of callbacks and associated params that will be called when emit() is called.

connect(func, *param)

Connect a callback, to be called when when emit() is called.

disconnect(func, *param)

Disconnect or remove a callback so that it will no longer be called when emit() is called.

emit(*args)

Call all connected callbacks with args and their associated param

class in_toolset.common.SignalListener

The SignalListener class groups callbacks and the signals to which they were added to allow for easier deletion/disconnection.

connect(signal, callback)

Connect callback to signal and store it in this

disconnect()

Disconnect all callbacks stored in this

config

The config module allows for configuration of the behaviour of in-toolset, using a text file with key-value items as storage for the settings

class in_toolset.config.Config(filename)

Manages basic configuration of the graphical interface as a list of key-value pairs

get(field)

Get the value of field

load(filename)

Load the key-value pairs from the file filename into self

set(field, value)

Set the value of field to value

in_toolset.config.get(field)

Get the current value of the configuration field field

main

in_toolset.main.main()

Start the graphical editor with a new, blank, industry net.

Model

The in_toolset.model module contains code for modelling the behaviour of petri nets, industry nets and generic uncoloured petri nets.

It relies heavily on the signalling and property classes in in_toolset.common.

model.base

class in_toolset.model.base.Node

A special child class of Object. It introduces directional connections between Nodes, which allows for the creation of graphs and the like

connect(target)

Create an outgoing connection from self to target

disconnect(target)

Remove an outgoing connection from self to target if present

class in_toolset.model.base.Object

A basic object class, objects can be marked as deleted and have Signal-typed members to signify deletion or changes

delete()

Mark the object as deleted

restore()

Mark the object as active

class in_toolset.model.base.ObjectList

A list of objects of the Object class. When iterating over an ObjectList, deleted or inactive Objects are filtered out.

add(obj)

Add an object to the list

remove(obj)

Remove an item from the list

class in_toolset.model.base.PetriNet

A representation of a petrinet, containing places and transitions, implemented as a child class of Object. Places and transitions are represented as objects of type Place and Transition , respectively

combine(other)

Merge other and self into a new PetriNet and return it. This allows for bisimulation using LTSmin

deadlock

The Property deadlock shows whether the petrinet is currently in deadlock. A petrinet is in deadlock if there are no enabled transitions.

setInitialMarking()

(Re)Set all places in self to the default initial marking. This default initial marking is defined such that all places without any incoming transitions will contain one token, and the others will be empty.

triggerRandom()

Trigger a random transition, if possible

class in_toolset.model.base.Place

A representation of a place as in petri nets, implemented as a child class of Node. Can contain a positive number of uncoloured tokens, and can be connected to incoming or outgoing transitions transitions.

give()

Increase the number of tokens by 1

setTokens(tokens)

Set the number of tokens in self to tokens

take()

Decrease the number of tokens by 1

class in_toolset.model.base.Transition

A representation of a transition as in petri nets, implemented as a child class of Node. Can be connected to an arbitrary number of places.

enabled

The Property enabled shows whether the transition is currently enabled.

trigger()

Trigger self, updating the amount of tokens contained in all connected places

triggered = None

The Signal triggered emits when the transition is triggered

model.pnml

class in_toolset.model.pnml.PNMLWriter(net, graph)

Allows exporting a petrinet and a graph in PNML format

save(file)

Write petrinet corresponding to self.net and self.graph to file in PNML format

model.project

class in_toolset.model.project.ProjectReader

Loads a project file (in our own json-based file format) corresponding to an inet into the program.

class in_toolset.model.project.ProjectWriter

Writes a project to a project file (in our own json-based file format).

model.ui

This library adds the ability to store data necessary for a visual representation of an industry net.

class in_toolset.model.ui.TransitionType

An enum for the different possible transition types

INPUT = 1

An input transition can receive messages from another enterprise if connected on the industry level

INTERNAL = 0

An internal transition “stays” within a single enterprise net and is not connected to other nets

OUTPUT = 2

An output transition can send messages to another enterprise if enabled and connected on the industry level

class in_toolset.model.ui.UIArrow(source, target)
class in_toolset.model.ui.UIChannelArrow(source, target, channel)
class in_toolset.model.ui.UIGraph
class in_toolset.model.ui.UIInternalArrow(source, target)
class in_toolset.model.ui.UILabel
class in_toolset.model.ui.UILooseArrow(node, transition)
class in_toolset.model.ui.UINode(obj)
class in_toolset.model.ui.UIObject
class in_toolset.model.ui.UIPetriNet
class in_toolset.model.ui.UITransition

User Interface

ui.app

class in_toolset.ui.app.Application

The main class, corresponding to one instance of the graphical toolkit. It manages windows and allows for basic managing of projects.

createProject(filename=None)

Create a new project or load an existing one

start()

Start the graphical interface and the program itself

ui.common

class in_toolset.ui.common.ArrowBase(scene)
class in_toolset.ui.common.ArrowItem(scene, arrow)
class in_toolset.ui.common.LabelBase(scene)
boundingRect(self) → QRectF
paint(self, QPainter, QStyleOptionGraphicsItem, widget: QWidget = None)
class in_toolset.ui.common.LabelItem(scene, label)
class in_toolset.ui.common.LooseArrowItem(scene, style, arrow)
paint(self, QPainter, QStyleOptionGraphicsItem, widget: QWidget = None)
class in_toolset.ui.common.NodeBase(scene, shape=None)
paint(self, QPainter, QStyleOptionGraphicsItem, widget: QWidget = None)
class in_toolset.ui.common.NodeItem(scene, shape, node)

ui.enterprise

class in_toolset.ui.enterprise.PlaceItem(scene, style, node)
paint(self, QPainter, QStyleOptionGraphicsItem, widget: QWidget = None)
class in_toolset.ui.enterprise.PlaceSettings(node)
class in_toolset.ui.enterprise.TemporaryArrow(scene, source)

A placeholder arrow to be displayed on the canvas during placement of a arrow (while it is being dragged), to show the orientation and place of the arrow currently being placed.

class in_toolset.ui.enterprise.TemporaryPlace(scene, style)

A placeholder place to be displayed on the canvas during placement of a place, to show the place of the place currently being placed.

class in_toolset.ui.enterprise.TemporaryTransition(scene, style)

A placeholder transition to be displayed on the canvas during placement of a transition, to show the place of the transition currently being placed.

class in_toolset.ui.enterprise.TransitionItem(scene, style, node)
class in_toolset.ui.enterprise.TransitionSettings(node)

ui.industry

class in_toolset.ui.industry.ChannelArrowItem(scene, style, arrow)
class in_toolset.ui.industry.ChannelArrowLabel(scene, arrow)
class in_toolset.ui.industry.EnterpriseItem(scene, style, obj)
class in_toolset.ui.industry.EnterpriseSettings(obj)
class in_toolset.ui.industry.LooseArrowSettings(obj)
class in_toolset.ui.industry.MessageAnimItem(scene, style, arrow, isTarget)
class in_toolset.ui.industry.TemporaryArrowItem(scene, source)

ui.menu

class in_toolset.ui.menu.Action(text, shortcut, checkable=False)
class in_toolset.ui.menu.EditMenu
class in_toolset.ui.menu.FileMenu
class in_toolset.ui.menu.MenuBar
class in_toolset.ui.menu.ViewMenu

ui.scene

class in_toolset.ui.scene.GeneralSettings(net)
class in_toolset.ui.scene.SeparatorLine
class in_toolset.ui.scene.SettingsWidget

ui.tools

class in_toolset.ui.tools.ToolBar(style)

The menu bar that can be used to select the active tools for left and right mouse buttons

addGroup(name)

Make a group of tools availabe, so that their corresponding tool buttons may be visible in the toolbar.

currentTool(group)

Return the currently active tool for a specific group, if there is an active too in said group. Otherwise, return -1.

reset()

Empty the toolbar

selectTool(name)

Select and enable the tool with name name

class in_toolset.ui.tools.ToolBarHeader(style, group)
paintEvent(self, QPaintEvent)
class in_toolset.ui.tools.ToolButton(style, tool)
paintEvent(self, QPaintEvent)

ui.view

class in_toolset.ui.view.EditorItem(scene)
class in_toolset.ui.view.EditorScene
drawBackground(self, QPainter, QRectF)
keyPressEvent(self, QKeyEvent)
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
class in_toolset.ui.view.EditorShape(scene, shape=None)
boundingRect(self) → QRectF
paint(self, QPainter, QStyleOptionGraphicsItem, widget: QWidget = None)
shape(self) → QPainterPath
class in_toolset.ui.view.EditorView(scene)
keyPressEvent(self, QKeyEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
wheelEvent(self, QWheelEvent)

ui.window

class in_toolset.ui.window.EnterpriseItem(node)
class in_toolset.ui.window.IndustryItem(industry)
class in_toolset.ui.window.MainWindow(style)
closeEvent(self, QCloseEvent)
keyPressEvent(self, QKeyEvent)
class in_toolset.ui.window.NetListWidget