**2. Theory**

#### *2.1. Process Network Synthesis and the P-Graph Framework*

Process Network Synthesis is the act of designing and making decisions about a complex system of processes consisting of several steps and dependencies. The process under examination is generally the production or achievement of a dedicated material, state, or a set of such. Steps of the process to be modeled must be identified, but the emphasis is on the whole system itself. Usually there is a range of options leading from the available sources, like raw or freely available materials, or conditions, to the desired final products. Most importantly, selection of the actually utilized options must be made, so that other details, like actual material flows can be selected.

The P-Graph is a graph-theoretic model first introduced by Friedler et al. [9]. It is capable of modeling PNS problems unambiguously and gives options to e ffectively find optimal solutions. The model consists of a directed bipartite graph of a material node set and an operating unit node set. The material nodes resemble the states in the model. A state is usually representing the presence of some material or other physical or virtual property. The operating unit nodes represent transitions of a set of states into another. This is generally some kind of production step, transportation of goods, purchase, but may simply mean some logical consequence of the existence of a state based on others. Arcs from material nodes to operating unit nodes represent consumption. Arcs between operating units to materials represent production. That means the inputs and outputs of an operating unit are the materials for which there exist arcs going towards, and starting from the operating unit. In both cases, arcs are directed towards material flow. Materials can be both inputs and outputs at the same time. In this way, the P-Graph represents the structure of the process, see Figure 1. There are three types of materials in a P-Graph:


The goal of the PNS problem is to find a structure and operation for the system which is optimal in some manner. A structure of the system involves appropriate selection of available technologies and other activities, and the corresponding material flows. Optimality may refer to di fferent objectives, typically it is cost minimization. A structure of the process network is to be found for which all products are obtained. This is called a solution structure, and it is, in general, a subset of the original P-Graph. Along with the rigorous mathematical definition of P-Graphs, five axioms are described that must hold for a P-Graph in order to be considered as a solution structure [9]:


The P-Graph framework also includes algorithms that can be used to solve PNS problems:

• The Maximal Structure Generation (MSG) is a polynomial-time algorithm which finds the so-called maximal structure of a PNS problem [10]. This structure is the union of all solution structures, and it is itself a solution structure as well, as a consequence of the axioms. The point in finding the maximal structure is that unnecessary parts of the PNS problem can be excluded a priori from optimization.


**Figure 1.** Example P-Graph with five operating units, three possible raw materials, two desired final products, and a byproduct. Note that cycles are possible in P-Graphs.

**Figure 2.** The same example P-Graph with additional data supplied: the consumption and production ratios for each operating unit.

These data also correspond to a PNS problem and the ABB is capable of presenting detailed solutions only when these are also available. PNS Studio is a software toll with which PNS problems can be designed as P-Graphs. These can also be solved using the SSG or ABB methods to find cost-optimal solutions for a process network. The software is freely Available online [13], and was also used in the case study of this work.

#### *2.2. Extensions of the P-Graph Framework*

The P-Graph framework originally targeted chemical engineering problems, but the tool is useful for other areas as well. The framework itself was also extended by additional functionalities, either in implementation or application.

Time-Constrained PNS (TCPNS) is a problem where timing constraints on the flows can be added [14]. This gives the possibility to make scheduling decisions by P-Graphs. Note that this was already possible with the framework with certain circumstances. Certain vehicle routing problems where deliveries are fixed in time were also solved by P-Graphs before TCPNS was introduced [15]. Purely scheduling problems of process networks, where there is a fixed set of tasks and orders must be found with various storage policies, can also be addressed [16]. These methods most importantly show that operating units in P-Graphs do not necessarily resemble actual equipment, but possibly logical relationship, like conversion, or precedence relationships.

Separation Network Synthesis (SNS) is a production environment that can separate chemicals into their pure components in multiple possible ways that can be optimized. This is not a utility, but a production optimization problem, which can be transformed to a PNS problem and solved by the ABB algorithm [17].

In a PNS problem, the input and output ratios for operating units are fixed. This is not the case in some real world circumstances, when equipment units can have several di fferent inputs with arbitrary ratios. Pelletizers and furnaces are an example for this. The model complicates if ratios are arbitrary, but also subject to constraints, like minimum or maximum ratios. The P-Graph framework was extended to address such case of input scenarios [18], as the underlying MILP model of the system was extended with linear constraints to obtain an appropriate model. Note that the P-Graph framework may be itself capable of modeling such operating units with several material nodes and operating unit nodes.

The P-Graph methodology can be extended to meet multi-periodic demands and supplies. Multi-periodic means di fferent rates of production of final products or consumption of raw materials and products at various time periods, and optimization of the whole duration in a single model [19]. Periods are an important issue, because assuming average load during a period may lead to underestimating capacity needs during the year. This is especially true if operation should run at an extremely high rate in short periods, while at low rate in general, resulting in an average that is way under the capacity required to be operational at all times. However, the equipment units may have minimal required flow to be working, which complicates the operating unit model of the P-Graph, so the multi-periodic modeling scheme can possible be extended to model such technologies [20]. Although multi-periodic modeling is a logical extension of the P-Graph framework, which means it does not require additional tools to be implemented, the PNS Studio software already has support for making multi-periodic models easier [21]. Note that this usually requires manual addition of a vast amount of data, as each period is usually modeled by its own P-Graph, which is replicated. The PNS problem can ge<sup>t</sup> very di fficult to understand if the number of periods is high.
