# Petri 网

Petri 网是一种描述并发计算的形式化数学模型，它将系统描述为库所与变迁构成的二分有向图，托肯在图中流动以表示系统的状态。该模型由卡尔·亚当·佩特里（Carl Adam Petri）在其 1962 年的学位论文《与自动机的通信》（*Kommunikation mit Automaten*）中提出，论文写于波恩的莱茵-威斯特法伦仪器数学研究所<sup>[1](https://www.informatik.uni-hamburg.de/TGI/publikationen/public/1962/Petri62/Petri62_eng.html)</sup>。Petri 网是并发理论所依托的形式化模型中的一个突出例子，与事件结构、迹结构和并发变迁系统并列<sup>[2](https://eprints.soton.ac.uk/261824/1/survey.pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 起源 | 卡尔·亚当·佩特里 1962 年于波恩大学的学位论文《与自动机的通信》<sup>[1](https://www.informatik.uni-hamburg.de/TGI/publikationen/public/1962/Petri62/Petri62_eng.html)</sup> |
| 结构 | 一个标识 Petri 网是一个五元组 (P, T, I, O, M)：库所与变迁的有限集合、输入与输出弧函数，以及为各库所分配托肯的初始标识<sup>[3](https://staff.um.edu.mt/jskl1/petri.html)</sup> |
| 执行 | 当每个输入库所持有的托肯数不少于指向该变迁的弧数时，该变迁被使能；引发从输入库所移走托肯，并向输出库所加入托肯<sup>[3](https://staff.um.edu.mt/jskl1/petri.html)</sup> |
| 可达性 | 可判定（迈尔，STOC 1981）；已发表的最好上界是阿克曼级，且该问题不是初等的，最坏情况下需要一座指数塔<sup>[4](https://arxiv.org/abs/1809.07115)</sup> |
| 扩展 | 着色网、时间网、随机网、同步网、连续网和混合网针对时间、数据和定量分析对普通网作了扩展<sup>[5](https://www.sciencedirect.com/science/article/pii/0005109894900248)</sup> |
| 标准化 | ISO/IEC 15909 分三部分定义高级 Petri 网：概念与图形记法（2019）、传输格式，以及扩展与结构化机制（2021）<sup>[6](https://www.iso.org/standard/67235.html)</sup><sup> • </sup><sup>[7](https://www.iso.org/standard/81504.html)</sup> |
| 应用 | 硬件、软件与数据库系统，化学与生物过程，业务流程，制造，通信协议，以及交通系统<sup>[4](https://arxiv.org/abs/1809.07115)</sup><sup> • </sup><sup>[6](https://www.iso.org/standard/67235.html)</sup> |

## 定义与执行

标识 Petri 网，或称 P 网，定义为一个五元组 (P, T, I, O, M)。P 与 T 是库所与变迁的非空有限集合，二者无公共元素。输入函数 I: P × T → ℕ 给出从每个库所到每个变迁的有向弧数，输出函数 O: T × P → ℕ 给出从每个变迁到每个库所的弧数。底层结构 (P, T, I, O) 是一个二分有向多重图。初始标识 M: P → ℕ 为每个库所分配一定数目的托肯<sup>[3](https://staff.um.edu.mt/jskl1/petri.html)</sup>。

执行通过引发变迁来进行。当每个输入库所所含的托肯数不少于从该库所指向该变迁的弧数时，该变迁被使能；否则被禁用。引发时，沿每条入弧从每个输入库所移走一个托肯，并沿每条出弧向每个输出库所加入一个托肯。引发会改变输入库所与输出库所的标识，从而可能使能或禁用其他变迁。所有互不排斥的已使能变迁可以并行引发，形式化模型正是以此表示并发<sup>[3](https://staff.um.edu.mt/jskl1/petri.html)</sup>。

在通常的图形记法中，库所画作圆圈，变迁画作短粗竖线，弧画作箭头，托肯画作库所内的小点。库所表示活动开始前必须成立的条件；变迁表示活动本身<sup>[3](https://staff.um.edu.mt/jskl1/petri.html)</sup>。

## 历史

佩特里在 20 世纪 50 年代末至 60 年代初发展了他的方法，当时计算理论的主要关注点是数学上繁复的串行问题的局部计算；他的目标则是一种关于并发与同步的理论<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S1367578818300117)</sup>。与一种广为流传的假设相反，1962 年的论文中并没有以经典图形记法出现的 Petri 网；那种表示法约三年后才出现，佩特里在 2007 年说，他是在“一种玩闹的心情”下发明了结构知识的图形表示的<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S1367578818300117)</sup>。

1962 年播下的种子首先在美国生长，基本上持续到 20 世纪 70 年代中期，那里在计算机科学、业务流程管理和交换系统设计方面存在一种智识氛围<sup>[9](https://www.sciencedirect.com/science/article/pii/S1367578813000473)</sup>。此后，该领域产生了数百部研究与教科书专著以及数千项理论与应用贡献，ISO 与 IEC 标准规范着 Petri 网在工程中的使用<sup>[9](https://www.sciencedirect.com/science/article/pii/S1367578813000473)</sup>。2009 年，佩特里获得 2008 年度 IEEE 计算机先驱奖，“以表彰其在 1962 年创立 Petri 网理论，该理论不仅被数十万计的科学出版物引用，而且显著推进了并行与分布式计算领域”<sup>[10](https://www.informatik.uni-hamburg.de/TGI/PetriNets/history/)</sup>。

## 分析与判定问题

Petri 网的核心算法问题是可达性：从给定的初始格局出发，是否存在一个合法的执行步骤序列到达给定的最终格局<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。其历史跨越半个世纪。在萨切尔多特与坦尼于 1977 年给出不完整证明之后，恩斯特·迈尔 在其 STOC 1981 的工作中确立了可判定性，科萨拉朱于 1982 年简化了证明，兰伯特在 20 世纪 90 年代作了改进<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。在下界方面，理查德·利普顿于 1976 年证明可达性需要指数空间，这一界维持了 40 多年，并导致学界猜测其为 ExpSpace 完全的<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。

这一猜测在 2018 年被推翻，沃伊切赫·切尔文斯基、斯瓦沃米尔·拉索塔、兰科·拉齐奇、热罗姆·勒鲁和菲利普·马佐维茨基 证明了可达性不是初等的：判定它可能需要以一座指数塔为界的时间和空间，而这座塔的高度本身是输入规模的初等函数<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。已发表的最好上界是 勒鲁与施米茨在 LICS 2019 给出的非原始递归的阿克曼级上界<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。该结果还意味着，形式语言、逻辑、并发系统和进程演算中的许多问题都具有非初等复杂性，因为 Petri 网可达性可归约到这些问题<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。

其他经典问题则更早得到解决。判定一个网是否一致、可逆或活跃可归约为可达性，而可达性等价于两个网的引发序列集合的相等问题与包含问题<sup>[11](https://www.sciencedirect.com/science/article/pii/0304397576900670)</sup>。对于梅林提出的时间 Petri 网，可达性与有界性是不可判定的，而可控性问题，即一组变迁能否禁用某个给定变迁，即使对 1-有界网也需要指数空间<sup>[12](https://www.sciencedirect.com/science/article/pii/0304397577900147)</sup>。

## 扩展

普通 Petri 网充当共同的基础，被比作一种共同语言，使受过不同训练的人之间得以对话，而一族派生模型则针对特定目的对其加以扩展<sup>[5](https://www.sciencedirect.com/science/article/pii/0005109894900248)</sup>。

**时间与随机扩展。** 时间网为变迁引发附加固定时长，而随机网则从概率分布中抽取时长<sup>[13](https://journals.sagepub.com/doi/10.1016/j.jala.2005.04.005)</sup>。在引发时长服从指数分布的马尔可夫 Petri 网中，底层过程是一个连续时间马尔可夫链，已使能变迁的引发时长具有概率密度 \( f_j(t) = n_j(M) \cdot \mu_j \cdot \mathrm{exp}(-n_j(M) \cdot \mu_j \cdot t) \)，其中 \( \mu_j \) 是引发参数，\( n_j(M) \) 是在标识 M 下的使能度<sup>[14](https://link.springer.com/article/10.1007/s10626-026-00435-y)</sup>。广义随机 Petri 网将时间变迁与瞬时变迁结合起来<sup>[15](https://ptolemy.berkeley.edu/projects/chess/design/2012/lectures/EE249_8_mocPetri.pdf)</sup>。

**数据与层次。** 着色 Petri 网以数据、时间和层次扩展经典形式化模型，为托肯附加数据类型，为弧附加卫条件<sup>[16](https://arxiv.org/abs/2406.04694)</sup><sup> • </sup><sup>[13](https://journals.sagepub.com/doi/10.1016/j.jala.2005.04.005)</sup>。引入高级网是因为经典的低级模型随着网规模增大而受困于状态爆炸问题，削弱了表示和分析现实大规模系统的能力<sup>[17](https://www.sciencedirect.com/science/article/abs/pii/S0164121298100286)</sup>。网也可以按层次建模，用一个库所或变迁替代整个网，或用子网替代库所与变迁<sup>[17](https://www.sciencedirect.com/science/article/abs/pii/S0164121298100286)</sup>。

**重置网与可重构网。** 重置网增加了重置弧，可清除某个库所中的全部托肯，这是对业务流程中活动取消进行建模的一种自然方式<sup>[18](https://www.sciencedirect.com/science/article/pii/S0020025508004581)</sup>。动态结构网与可重构网能够依据重写规则在运行时创建或删除库所、变迁或弧，从而支持云平台和移动网络等自适应系统<sup>[14](https://link.springer.com/article/10.1007/s10626-026-00435-y)</sup>。

## 应用

Petri 网用于对硬件、软件与数据库系统以及化学、生物与业务流程进行建模和分析<sup>[4](https://arxiv.org/abs/1809.07115)</sup>。ISO/IEC 15909-1 标准列出的应用领域包括航空航天、空中交通管制、银行、生物与化学过程、通信协议、计算机硬件体系结构、控制系统、分布式计算、容错系统、医院流程、物流、制造系统、核电系统、包括铁路控制在内的交通系统，以及工作流<sup>[6](https://www.iso.org/standard/67235.html)</sup>。在控制界，网被采纳为离散事件系统的重要建模工具，应用范围从制造与过程工程直到计算机系统与网络流量协议<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S1367578818300117)</sup>。

**工作流网。** 工作流网是专为业务流程建模设计的 Petri 网变体，设有指定的初始库所与终止库所，分别对过程的初始化与终止建模<sup>[19](https://michaelblondin.com/papers/BMO22a.pdf)</sup>。其核心正确性概念是合理性，直观上问的是每个已启动的过程是否都能终结<sup>[20](https://link.springer.com/chapter/10.1007/978-3-032-32526-6_17)</sup>。三个主要变体的复杂性于 2022 年得到确定：经典合理性与结构合理性是 EXPSPACE 完全的，而广义合理性是 PSPACE 完全的，因而在计算上更简单<sup>[21](https://arxiv.org/abs/2201.05588)</sup>。

**工具与基准测试。** 一个成熟的工具生态支持分析：GreatSPN 与 TimeNET 提供图形建模、状态空间生成以及用于瞬态与稳态分析的数值求解器；Möbius 以随机活动网面向可靠性与性能评估；PIPE 与 PIPE2 提供轻量级开源建模；ROMEO 与 TINA 支持时间网扩展<sup>[14](https://link.springer.com/article/10.1007/s10626-026-00435-y)</sup>。一年一度的模型检测竞赛（2024 年的一届在日内瓦举行，共有 15 款工具提交参赛）在状态空间、可达性和时序逻辑考察类别上以 Petri 网模型对这些工具进行基准测试<sup>[22](https://mcc.lip6.fr/2024/results.php)</sup>。

## References

1. [Carl Adam Petri (1962). Kommunikation mit Automaten. Dissertation, Universität Bonn.](https://www.informatik.uni-hamburg.de/TGI/publikationen/public/1962/Petri62/Petri62_eng.html)
2. [Survey of categorical approaches to concurrency (University of Southampton).](https://eprints.soton.ac.uk/261824/1/survey.pdf)
3. [Petri Nets: Definition and basic ideas, University of Malta.](https://staff.um.edu.mt/jskl1/petri.html)
4. [Czerwiński, Lasota, Lazić, Leroux, Mazowiecki. The Reachability Problem for Petri Nets is Not Elementary. arXiv:1809.07115.](https://arxiv.org/abs/1809.07115)
5. [David, Alla (1994). Petri nets for modeling of dynamic systems: A survey. Automatica 30(2).](https://www.sciencedirect.com/science/article/pii/0005109894900248)
6. [ISO/IEC 15909-1:2019, High-level Petri nets, Part 1: Concepts, definitions and graphical notation.](https://www.iso.org/standard/67235.html)
7. [ISO/IEC 15909-3:2021, High-level Petri nets, Part 3: Extensions and structuring mechanisms.](https://www.iso.org/standard/81504.html)
8. [Giua, Silva (2018). Petri nets and Automatic Control: A historical perspective. Annual Reviews in Control.](https://www.sciencedirect.com/science/article/abs/pii/S1367578818300117)
9. [Silva (2013). Half a century after Carl Adam Petri's Ph.D. thesis: A perspective on the field. Annual Reviews in Control 37(2).](https://www.sciencedirect.com/science/article/pii/S1367578813000473)
10. [Petri Nets World: History, University of Hamburg.](https://www.informatik.uni-hamburg.de/TGI/PetriNets/history/)
11. [Araki, Kasami (1976). Some decision problems related to the reachability problem for Petri nets. Theoretical Computer Science 3(1).](https://www.sciencedirect.com/science/article/pii/0304397576900670)
12. [Hack (1977). Complexity of some problems in Petri nets. Theoretical Computer Science 4(3).](https://www.sciencedirect.com/science/article/pii/0304397577900147)
13. [Russo, Sasso (2005). Modeling, Analysis, Simulation and Control of Laboratory Automation Systems Using Petri Nets. Journal of the Association for Laboratory Automation.](https://journals.sagepub.com/doi/10.1016/j.jala.2005.04.005)
14. [A survey on performance evaluations in time-dependent Petri nets. Discrete Event Dynamic Systems.](https://link.springer.com/article/10.1007/s10626-026-00435-y)
15. [Petri Net extensions, EE249 lecture notes, UC Berkeley.](https://ptolemy.berkeley.edu/projects/chess/design/2012/lectures/EE249_8_mocPetri.pdf)
16. [Colored Petri Nets for Modeling and Simulation of a Green Supply Chain System. arXiv:2406.04694.](https://arxiv.org/abs/2406.04694)
17. [Comparative study and categorization of high-level Petri nets. Journal of Systems and Software 43(2), 1998.](https://www.sciencedirect.com/science/article/abs/pii/S0164121298100286)
18. [Soundness-preserving reduction rules for reset workflow nets. Information Sciences 179(6), 2009.](https://www.sciencedirect.com/science/article/pii/S0020025508004581)
19. [the complexity of soundness in workflow nets](https://michaelblondin.com/papers/BMO22a.pdf)
20. [Weighted Soundness for Workflow Nets. Springer.](https://link.springer.com/chapter/10.1007/978-3-032-32526-6_17)
21. [Blondin, Mazowiecki, Offtermatt (2022). The complexity of soundness in workflow nets. arXiv:2201.05588.](https://arxiv.org/abs/2201.05588)
22. [Model Checking Contest 2024 results.](https://mcc.lip6.fr/2024/results.php)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Discrete mathematics

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/petri-net

English original: https://www.edgepedia.org/petri-net
