**5. Conclusions**

A P-Graph model was developed, and the energy supply options of a manufacturing plant in Hungary were investigated. The general PNS was defined, and the P-Graph framework was introduced. Step by step, the P-Graph model of the problem was constructed. Estimates on future demands were made to serve as a basis for our optimization model. We defined the raw materials, the demands, the intermediates, and the operating units. Parameters were gathered to materials and the operating units but the structure of the model has the main focus. Modeling techniques were presented for the P-Graph framework to handle situations like mass-based capacity limitations, multiple potential inputs with arbitrary ratios or activities like purchasing. A multi-periodic P-Graph is implemented which di fferentiates winter and mid-year consumption. It is capable of modeling operating unit capacities when demands are fluctuating, and also takes into account solar energy supplies.

The PNS Studio software was used to solve the single and multi-periodic models with the ABB algorithm. The multi-periodic scenarios establish that energy supply methods can vary between winter and other parts of the years. It can be observed from the results that significant improvement can be obtained compared to the business as usual solution, where all electricity and heat is purchased from the market. However, this requires that the investments of local energy supply options, biomass and solar energy utilization have a long investment horizon. This means that although there are considerable options for sustainable energy supplies, as they are beneficial in the long-term, the economical environment significantly impacts their e fficiency.

The P-Graph model was shown to be capable of determining the best solutions for an energy supply optimization problem. Note that other aspects can be included in the future. Upgrades like insulation, better heating system, energy saving light bulbs, and other investments can be incorporated to yield a more precise model for the demands, as well as other power plant types and resources. Storage and exact availability of raw materials can still be modeled in a multi-periodic manner. Other demands, like the water system of the plant can be governed by a single unified PNS problem. Nevertheless, the current model is capable of handling similar supply and investment options with di fferent data, with minor modifications.

**Supplementary Materials:** The following are Available online at http://www.mdpi.com/1996-1073/12/8/1484/s1. The P-Graph model files for the case study presented, in PGSX format, with a few solution structures. These can be viewed, edited or resolved by the P-Graph Studio software. Images of the solution structures from the mentioned cases are also provided.

**Author Contributions:** Introduction, I.H. and H.C.; Materials and Methods, A.É. and I.H. Results, A.É. and H.C.; Discussions, A.É.; Conclusions, I.H. and L.H. Review and editing, H.C. and I.H. Solver programming, L.H.

**Funding:** We acknowledge the financial support of Széchenyi 2020 under the EFOP-3.6.1-16-2016-00015.

**Acknowledgments:** We gratefully thank Adrián Szlama for his work on the P-Graph model and data collection and evaluation.

**Conflicts of Interest:** The authors declare no conflict of interest.
