What‘s the difference of Petri Nets and Finite State Machines?

Standard finite state machine contain only a single current state. Whereas in Petri nets multiple locations, more or less comparable with states in a finite state machine, can contain one or more tokens. A finite state machine is single threaded while a Petri net is concurrent.

标准有限状态机只包含一个当前状态。而在Petri网中,多个位置(或多或少与有限状态机中的状态相似)可以包含一个或多个令牌。有限状态机是单线程的,而Petri网是并发的。

In a finite state machine the active state changes in response to an event. In a Petri net transitions are executed as soon as all input locations contain at least one token.
A finite state machine can be considered as a special case of a Petri net.

在有限状态机中,活动状态响应事件而改变。在Petri网中,只要所有输入位置包含至少一个令牌,转换就会执行。有限状态机可以看作是Petri网的一种特例。

In general I would recommend using a finite state machine if your process, or the part you wish to represent, is single threaded: fellow software engineers are probably more familiar with finite state machines; and there are more tools to convert a finite state machine to an implementation.

一般来说,如果您的进程或您希望表示的部分是单线程的,我建议使用有限状态机:软件工程师同行可能更熟悉有限状态机;还有更多的工具可以将有限状态机转换为实现。

Use a Petri net only when you need the concurrency or extra expressivity. Or when you are modeling a factory plant where half fabricates are transformed into products or when your audience is more familiar with this image.

只有在需要并发性或额外的表现力时才使用Petri网。或者当你为一个工厂建模时,其中一半的成品被转化为产品,或者当你的观众更熟悉这个形象时。

Perhaps Petri nets can also be used to model, visualize running, massive concurrent systems such as micro service architectures, azure service fabric reliable services and reliable actors, services running on kubernetus, azure function, and AWS Lambda.
In addition, there is more theoretical research about, and using, Petri nets than there is about finite state machines (note that, as I said earlier, finite state machines are reducible to Petri nets).

也许Petri网也可以用来建模、可视化运行的大规模并发系统,比如微服务架构、azure服务结构可靠服务和可靠参与者、在kubernetus上运行的服务、azure函数和AWS Lambda。
此外,关于Petri网和使用Petri网的理论研究比关于有限状态机的理论研究要多(请注意,正如我之前所说,有限状态机可以简化为Petri网)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值