需求
“Create a Petri net for a producer and consumer sharing a bounded buffer with three free slots and one token for each ready worker.”
接著試試Change the buffer capacity to five.Add a second consumer token.
The bounded-buffer producer/consumer pattern as a Petri net — complementary free/used slot places enforce the buffer size, a timed withdraw transition models the consumer's rate, and place capacity caps the buffer at three slots. Tokens flowing through free→used→free show backpressure as a structural property.
“Create a Petri net for a producer and consumer sharing a bounded buffer with three free slots and one token for each ready worker.”