# Smart Factory Web--A Blueprint Architecture for Open Marketplaces for Industrial Production
## 5 Smart Factory Web Approach
### Search for Production Capabilities
#### 5.4.1 Process Description with Colored Petri Nets  
There are several key requirements for a model of a manufacturing process:  
* It must be able to describe a flexible network of assets (resources), materials, process steps and intermediate products in a production diagram. * It should be possible to flexibly assign properties (attributes) to entities. * The model must be able to handle synchronization and timing in order to describe the scheduling dependencies in a production diagram. * It must be possible to formulate constraints on process steps such as restrictions on properties of input products. * The model shall support a modular approach and a hierarchy of submodels. This allows several engineers to work on the same overall model, allows models to be re-used and allows the modeling process to be structured with a top-down or bottom-up approach. * Models shall be linkable through I/O interfaces. * A model shall have a formal, mathematical foundation to enable model validation and the deployment of analysis tools to assess the model behavior (e.g., to find deadlocks or to simulate the model execution. Based on these requirements, Colored Petri Nets (CPN) were selected as a modeling framework [18]. The discrete event graphical modeling language CPN combines Petri Nets and the programming language ML. Petri Nets were originally conceived to model concurrency in distributed systems on the basis of \"tokens\" flowing along arcs through a network of places and transitions. Arcs are connections from places to transitions or vice versa. A transition of a Petri Net may fire (i.e., execute) if it is enabled, i.e., there are sufficient tokens in all of its input places. When the transition fires, it consumes the required input tokens, and creates tokens in its output places. CPN extends the basic Petri Net concept by allowing complex data objects called colors to be used as tokens and the transitions to realize arbitrary defined mappings of the input tokens onto the output tokens, including a transformation of the colors (Figure 6). The functions to generate the output colors as well as the specification of constraints on when a transition is enabled are defined in the language ML, operating on colors. CPN conforms to the ISO standard for high-level Petri Nets [19]. CPN has been applied to model many systems ranging from communication protocols and data networks up to business processes and workflows, as well as automatic control and manufacturing systems. A CPN model is executable and can thus be used to simulate the system under study. The built-in language ML allows arbitrary information structures to be modeled. There is a formal definition of syntax and semantics allowing a CPN to be analyzed in depth. The concept of time is covered too, thus enabling the modeling of durations for the execution of transitions. CPN has been implemented in the free software CPN Tools ([[http://cpntools.org/](http://cpntools.org/)]([http://cpntools.org/](http://cpntools.org/)), accessed on 15 July 2021). The tool provides a graphical editor for the modeling and simulation of a CPN. CPN Tools supports hierarchical modeling, whereby transitions can be broken down into sub-transitions with associated places and arcs. CPN was combined with AI methods for multi-agent manufacturing scheduling [20]. Moreover, process mining has been carried out based on CPN (discovering CPN from event logs) as in [21]. In summary, CPN provides a rich and flexible modeling environment to describe process diagrams and supply chains. Figure 7 shows an example CPN model for the production of computer mice. Not all aspects of computer mouse manufacturing are included, but a representative subset to illustrate the approach with a flexible level of detail.