# Supply Sequence Modelling Using Hidden Markov Models

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Literature Review

- (1)
- To propose a method for forecasting the level of subsequent supplies of raw material for production using hidden Markov models.
- (2)
- To identify the hidden states fulfilling the Markov property which describe the dynamics of raw material supplies.
- (3)
- To present a method of modeling using stochastic processes that can be used primarily in relation to irregular deliveries with high randomness.

## 3. Description of the Case Study Company

## 4. Materials and Methods

#### 4.1. Markov Chains

**Definition**

**1.**

**Definition**

**2.**

**Definition**

**3.**

**Definition**

**4.**

**Definition**

**5.**

#### 4.2. Hidden Markov Models

- $S=\left\{{S}_{1},\dots ,{S}_{m}\right\}\u2014$a set of hidden states;
- $V=\left\{{V}_{1},\dots ,{V}_{h}\right\}\u2014$a set of outputs (set of observed states);
- $\pi =\left({\pi}_{1},{\pi}_{2},\dots ,{\pi}_{m}\right)\u2014$initial distribution, where ${\pi}_{i}\stackrel{def}{=}{\pi}_{{S}_{i}}=P\left({X}_{0}={S}_{i}\right)\ge 0$;
- $P={\left[{p}_{ij}\right]}_{1\le i,j\le m}\u2014$transition probability matrix between the hidden states, where for any $n\in N$ the value ${p}_{i}\stackrel{def}{=}{p}_{{S}_{1}{S}_{j}}=P\left({X}_{n+}={S}_{j}|{X}_{n}={S}_{i}\right)$ denotes the probability of transition from state ${S}_{i}$ at time $n\in N$ to state ${S}_{j}$ at time $n+1$;
- $G={\left[{g}_{ij}\right]}_{1\le i\le m,1\le j\le h}\u2014$output probability matrix, where for any $n\in N$ quantity ${g}_{ij}\stackrel{def}{=}{g}_{{S}_{i}{V}_{j}}=P\left({O}_{n}={V}_{j}|{X}_{n}={S}_{i}\right)$ is the probability of observing the state ${V}_{j}$ at time $n$, provided that the hidden part of the system is in the state ${S}_{j}$.

#### 4.3. The problem of Identifying Hidden Markov Models

**Problem**

**1.**

**Problem**

**2.**

**Problem**

**3.**

## 5. Hidden Markov Models in Forecasting the Supply Sequence

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Baum, L.E.; Petrie, T. Statistical inference for probabilistic functions of finite state markov chains. Ann. Math. Stat.
**1966**, 37, 1554–1563. [Google Scholar] [CrossRef] - Zhang, M.; Chen, X.; Li, W. A Hybrid Hidden Markov Model for Pipeline Leakage Detection. Appl. Sci.
**2021**, 11, 3138. [Google Scholar] [CrossRef] - Martins, A.; Fonseca, I.; Farinha, J.T.; Reis, J.; Cardoso, A.J.M. Maintenance Prediction through Sensing Using Hidden Markov Models—A Case Study. Appl. Sci.
**2021**, 11, 7685. [Google Scholar] [CrossRef] - Mor, B.; Garhwal, S.; Kumar, A. A systematic review of hidden Markov models and their applications. Arch. Comput. Methods Eng.
**2021**, 28, 1429–1448. [Google Scholar] [CrossRef] - Alghamdi, R. Hidden Markov models (HMMs) and security applications. Int. J. Adv. Comput. Sci. Appl.
**2016**, 7, 39–47. [Google Scholar] [CrossRef] [Green Version] - Robles, B.; Avila, M.; Duculty, F.; Vrignat, P.; Begot, S.; Kratz, F. Methods to choose the best Hidden Markov Model topology for improving maintenance policy. In Proceedings of the 9th International Conference on Modeling, Optimization & SIMulation, Boredaux, France, 6–8 June 2012. [Google Scholar]
- Nguyen-Le, D.H.; Tao, Q.B.; Nguyen, V.H.; Abdel-Wahab, M.; Nguyen-Xuan, H. A data-driven approach based on long short-term memory and hidden Markov model for crack propagation prediction. Eng. Frac. Mech.
**2020**, 235, 107085. [Google Scholar] [CrossRef] - Malhotra, R.; Singla, C.; Farooque, D. Comparison of Hidden Markov Model with other Machine Learning Techniques in Software Defect Prediction. In Proceedings of the 2022 IEEE 7th International Conference for Convergence in Technology (I2CT), Mumbai, India, 7–9 April 2022; pp. 1–5. [Google Scholar]
- Borucka, A. Logistic regression in modeling and assessment of transport services. Open Eng.
**2020**, 10, 26–34. [Google Scholar] [CrossRef] [Green Version] - Oszczypała, M.; Ziółkowski, J.; Małachowski, J. Analysis of Light Utility Vehicle Readiness in Military Transportation Systems Using Markov and Semi-Markov Processes. Energies
**2022**, 15, 5062. [Google Scholar] [CrossRef] - Ziółkowski, J.; Małachowski, J.; Oszczypała, M.; Szkutnik-Rogoż, J.; Konwerski, J. Simulation model for analysis and evaluation of selected measures of the helicopter’s readiness. Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng.
**2022**, 236, 2751–2762. [Google Scholar] [CrossRef] - Hsieh, M.C.; Giloni, A.; Hurvich, C. The propagation and identification of ARMA demand under simple exponential smoothing: Forecasting expertise and information sharing. IMA J. Manag. Math.
**2020**, 31, 307–344. [Google Scholar] [CrossRef] - Sulandari, W.; Subanar, S.; Rodrigues, P.C. Exponential smoothing on modeling and forecasting multiple seasonal time series: An overview. Fluct. Noise Lett.
**2021**, 20, 2130003. [Google Scholar] [CrossRef] - Lolli, F.; Coruzzolo, A.M.; Peron, M.; Sgarbossa, F. Age-based preventive maintenance with multiple printing options. Int. J. Prod. Econ.
**2022**, 243, 108339. [Google Scholar] [CrossRef] - Cantini, A.; Peron, M.; De Carlo, F.; Sgarbossa, F. A decision support system for configuring spare parts supply chains considering different manufacturing technologies. Int. J. Prod. Res.
**2022**, 60, 1–21. [Google Scholar] [CrossRef] - Kusuma, N.; Roestam, M.; Pasca, L. The analysis of forecasting demand method of linear exponential smoothing. J. Educ. Adm. Manag. Leadersh.
**2021**, 1, 7–18. [Google Scholar] [CrossRef] - Sinaga, H.; Irawati, N. A medical disposable supply demand forecasting by moving average and exponential smoothing method. In Proceedings of the 2nd Workshop on Multidisciplinary and Applications (WMA), Padang, Indonesia, 24–25 January 2018; pp. 24–25. [Google Scholar]
- Rostami-Tabar, B.; Babai, M.Z.; Ali, M.; Boylan, J.E. The impact of temporal aggregation on supply chains with ARMA (1, 1) demand processes. Eur. J. Oper. Res.
**2019**, 273, 920–932. [Google Scholar] [CrossRef] - Hofmann, E.; Rutschmann, E. Big data analytics and demand forecasting in supply chains: A conceptual analysis. Int. J. Log. Man.
**2018**, 29, 739–766. [Google Scholar] [CrossRef] - Seyedan, M.; Mafakheri, F. redictive big data analytics for supply chain demand forecasting: Methods, applications, and research opportunities. J. Big Data
**2020**, 7, 53. [Google Scholar] [CrossRef] - Zvolenský, P.; Barta, D.; Grenčík, J.; Droździel, P.; Kašiar, L. Improved method of processing the output parameters of the diesel locomotive engine for more efficient maintenance. Eksploat. Niezawodn. Maint. Reliab.
**2021**, 23, 315–323. [Google Scholar] [CrossRef] - Huang, L.; Xie, G.; Zhao, W.; Gu, Y.; Huang, Y. Regional logistics demand forecasting: A BP neural network approach. Complex Intell. Syst.
**2020**, 1–16. [Google Scholar] [CrossRef] - Bandara, K.; Shi, P.; Bergmeir, C.; Hewamalage, H.; Tran, Q.; Seaman, B. Sales demand forecast in e-commerce using a long short-term memory neural network methodology. In Proceedings of the International Conference on Neural Information Processing, Sydney, Australia, 12–15 December 2019; Springer: Cham, Switzerland, 2019; pp. 462–474. [Google Scholar] [CrossRef]
- Aamer, A.; Eka Yani, L.; Alan Priyatna, I. Data analytics in the supply chain management: Review of machine learning applications in demand forecasting. Oper. Supply Chain Manag.
**2020**, 14, oscm0440281. [Google Scholar] [CrossRef] - Wen, Z.; Xie, L.; Fan, Q.; Feng, H. Long term electric load forecasting based on TS-type recurrent fuzzy neural network model. Electr. Power Syst. Res.
**2020**, 179, 106106. [Google Scholar] [CrossRef] - Jiang, P.; Li, R.; Liu, N.; Gao, Y. A novel composite electricity demand forecasting framework by data processing and optimized support vector machine. Appl. Energy
**2020**, 260, 114243. [Google Scholar] [CrossRef] - Güven, İ.; Şimşir, F. Demand forecasting with color parameter in retail apparel industry using artificial neural networks (ANN) and support vector machines (SVM) methods. Comput. Ind. Eng.
**2020**, 147, 106678. [Google Scholar] [CrossRef] - Perea, R.G.; Poyato, E.C.; Montesinos, P.; Díaz, J.R. Prediction of irrigation event occurrence at farm level using optimal decision trees. Comput. Electron. Agric.
**2019**, 157, 173–180. [Google Scholar] [CrossRef] - Nowakowski, T.; Komorski, P. Diagnostics of the drive shaft bearing based on vibrations in the high-frequency range as a part of the vehicle’s self-diagnostic system. Eksploat. Niezawodn. Maint. Reliab.
**2022**, 24, 70–79. [Google Scholar] [CrossRef] - Antosz, K.; Jasiulewicz-Kaczmarek, M.; Paśko, Ł.; Zhang, C.; Wang, S. Application of machine learning and rough set theory in lean maintenance decision support system development. Eksploat. Niezawodn. Maint. Reliab.
**2021**, 23, 695–708. [Google Scholar] [CrossRef] - Lin, L.; Guo, H.; Lv, Y.; Liu, J.; Tong, C.; Yang, S. A machine learning method for soil conditioning automated decision-making of EPBM: Hybrid GBDT and Random Forest Algorithm. Eksploat. Niezawodn. Maint. Reliab.
**2022**, 24, 237–247. [Google Scholar] [CrossRef] - Punia, S.; Nikolopoulos, K.; Singh, S.P.; Madaan, J.K.; Litsiou, K. Deep learning with long short-term memory networks and random forests for demand forecasting in multi-channel retail. Int. J. Prod. Res.
**2020**, 58, 4964–4979. [Google Scholar] [CrossRef] - Dhanalakshmi, J.; Ayyanathan, N. An implementation of energy demand forecast using J48 and simple K means. In Proceedings of the 2019 Fifth International Conference on Science Technology Engineering and Mathematics (ICONSTEM), Chennai, India, 14–15 March 2019; IEEE: Piscataway, NJ, USA, 2019; Volume 1, pp. 174–178. [Google Scholar] [CrossRef]
- Huber, J.; Stuckenschmidt, H. Daily retail demand forecasting using machine learning with emphasis on calendric special days. Int. J. Forecast.
**2020**, 36, 1420–1438. [Google Scholar] [CrossRef] - Al-Musaylh, M.S.; Deo, R.C.; Adamowski, J.F.; Li, Y. Short-term electricity demand forecasting using machine learning methods enriched with ground-based climate and ECMWF Reanalysis atmospheric predictors in southeast Queensland, Australia. Renew. Sustain. Energy Rev.
**2019**, 113, 109293. [Google Scholar] [CrossRef] - Racewicz, S.; Kutt, F.; Sienkiewicz, Ł. Power Hardware-In-the-Loop Approach for Autonomous Power Generation System Analysis. Energies
**2022**, 15, 1720. [Google Scholar] [CrossRef] - Projekt Budowlany. Mirosław Stachowski; RECYKL Organizacja Odzysku S.A, Projektowe Usługi Budowlane: Rawicz, Poland, 2019. (In Polish) [Google Scholar]
- Rajca, P.; Zajemska, M. Ocena możliwości paliwa RDF na cele energetyczne. Rynek Energii
**2018**, 4, 137. (In Polish) [Google Scholar] - Privault, N. Understanding Markov Chains; Springer: Singapore, 2018. [Google Scholar] [CrossRef]
- Mamon, R.S.; Elliott, R.J. (Eds.) Hidden Markov Models in Finance; Springer US: Newy York, NY, USA, 2007. [Google Scholar] [CrossRef]
- Zucchini, W.; MacDonald, I.L.; Langrock, R. Hidden Markov Models for Time Series, Chapman; Hall/CRC: Boca Raton, FL, USA, 2017. [Google Scholar] [CrossRef]
- Rabiner, L.R. A tutorial on hidden markov models and selected applications in speech recognition. Proc. IEEE.
**1989**, 77, 257–286. [Google Scholar] [CrossRef] [Green Version] - Giri, B.C.; Glock, C.H. The bullwhip effect in a manufacturing/remanufacturing supply chain under a price-induced non-standard ARMA (1,1) demand process. Eur. J. Oper. Res.
**2022**, 301, 458–472. [Google Scholar] [CrossRef] - Wang, Z. Intelligent Value-Added System Service of Automobile Manufacturing Enterprise Based on Forecast Demand Algorithm Analysis. In Proceedings of the International Conference on Big Data Analytics for Cyber-Physical-Systems, Shanghai, China, 28 November 2021; Springer: Singapore, 2021; pp. 1047–1055. [Google Scholar] [CrossRef]

Condition | Range of Supply Volumes [Ton] |
---|---|

O1 | [0, 27] |

O2 | (27, 37] |

O3 | (37, 43] |

O4 | (43, 50] |

O5 | Over 50 |

O1 | O2 | O3 | O4 | O5 | |
---|---|---|---|---|---|

S1 | 0.906 | 0.070 | 0.000 | 0.000 | 0.024 |

S2 | 0.054 | 0.161 | 0.370 | 0.143 | 0.272 |

S3 | 0.139 | 0.410 | 0.311 0.141 | 0.000 | S4 |

S4 | 0.042 | 0.000 | 0.104 | 0.129 | 0.725 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Borucka, A.; Kozłowski, E.; Parczewski, R.; Antosz, K.; Gil, L.; Pieniak, D.
Supply Sequence Modelling Using Hidden Markov Models. *Appl. Sci.* **2023**, *13*, 231.
https://doi.org/10.3390/app13010231

**AMA Style**

Borucka A, Kozłowski E, Parczewski R, Antosz K, Gil L, Pieniak D.
Supply Sequence Modelling Using Hidden Markov Models. *Applied Sciences*. 2023; 13(1):231.
https://doi.org/10.3390/app13010231

**Chicago/Turabian Style**

Borucka, Anna, Edward Kozłowski, Rafał Parczewski, Katarzyna Antosz, Leszek Gil, and Daniel Pieniak.
2023. "Supply Sequence Modelling Using Hidden Markov Models" *Applied Sciences* 13, no. 1: 231.
https://doi.org/10.3390/app13010231