Petri Net is a formalism to describe changes between 2 or more states across discrete time and has been used to model many systems. We present PNet - a pure Python library for Petri Net modeling and simulation in Python programming language. The design of PNet focuses on reducing the learning curve needed to define a Petri Net by using a text-based language rather than programming constructs to define transition rules. Complex transition rules can be refined as regular Python functions. To demonstrate the simplicity of PNet, we present 2 examples - bread baking, and epidemiological models.
翻译:Petri Net是一种形式主义,用来描述两个或两个以上州之间不同时间的变化,并用来模拟许多系统。我们介绍了PNet-一个纯的Python图书馆,用于用Python编程语言进行Petri Net的建模和模拟。PNet的设计侧重于减少界定Petri Net所需的学习曲线,使用基于文字的语言,而不是编程结构来界定过渡规则。复杂的过渡规则可以作为常规的 Python 函数加以改进。为了展示Python PNet的简单性,我们举了两个例子-面包烘烤和流行病学模型。