Introduction

The overall contribution of temperature-sensitive perishable foods in the economies of many industrialized nations of the world is constantly growing. The range of these temperature-sensitive perishables includes poultry, meat, human milk and dairy products, fish and seafood products, prepared jollof rice, salad, and different chilled ready-to-eat-perishable foods, to name a few. These perishable foods stand high chances of spoilage due to their production processes and transportation across complex national and international logistic networks. These perishables are usually transported using various refrigerated storage and transportation equipment through several intermediaries such as the primary producers, food service suppliers, retailers, hospitals, restaurateurs, etc, prior to reaching the intended end-users (that is, the consumers). During these transit phases, appropriate temperatures must be maintained otherwise the safety and quality of the perishable foods may be compromised due to the development of various kinds of food bacteria1,2,3,4,5,6,7. The Food Standards Agency (FSA) has estimated that a total of 2.4 million cases of foodborne illness are recorded per year in the United Kingdom8. Thus, the challenge of ensuring the quality and safety of temperature-sensitive perishables hinges on maintaining an intact cold chain right from the production facility through the intermediary actors to the consumers.

Over the past decade, the inventory modeling systems of perishable foods have received increasing research attention in the literature because of their strategic importance9,10,11,12,13,14,15,16 towards finding ways to reduce perishable foods spoilage and resultant wastage. Study has shown that excessive inventories as well as inappropriate quality control account for the loss of temperature-sensitive perishables in a supply chain. Hence, the quality and safety of perishables remain part of the most essential aspect usually considered throughout the supply chain. Temperature-sensitive perishable foods generally have a limited lifetime, otherwise known as shelf-life, a function of the product’s storage conditions, characteristics, and time17. For businesses, the goal is usually to maintain the quality and safety of their time-sensitive perishables to maximize profit by ensuring that they are sold to the end-users within their shelf-life. Coincidentally, the quality and safety of time-sensitive perishable foods hugely depend on the environmental conditions of transportation and storage18.

Wanga and Li19 maintained that the quality of time-sensitive perishable food can be regarded as a dynamic state which is usually in continuous decreasing with time until the food becomes unsuitable for consumption of sale due to its poor quality. Several studies have presented different mathematical models in the existing literature primarily focused on modeling quality control of perishable foods20,21,22,23. However, an accurate estimation of the quality of perishable foods must take into account a range of factors including storage conditions, the dynamics of time-sensitive food characteristics, and quality attributes. Additionally, the deterioration of the overall quality of perishable foods is largely dependent on the storage temperature and length of storage. The other factors that affect perishable food quality deterioration include gas constant and activation energy. But the control of storage temperature of perishable foods mainly plays a crucial role in terms of maintaining their overall quality and safety. Hence, this paper has studied mathematical models that can ensure optimal perishable foods’ temperature control to guarantee their quality and safety for end users consumption.

Several other researchers have studied basic quality deterioration control models for perishable foods production and inventory systems12,24,25,26,27. A review study was presented in28 which covered the recent trends in modelling of deteriorating inventory. The authors presented a comprehensive review of the advances of deteriorating inventory in the literature. Unfortunately, because of the technical difficulties involved, the products storage temperature as a key factor is seldom incorporated in these inventory theory-based modelling techniques. However, studies have suggested the critical importance of storage temperature control of time-sensitive, perishable foods during refrigeration29. The widely adoption of modern technologies like time temperature indicator (TTI) and radio frequency identification (RFID) can enable automatic real-time capturing of perishable foods data such as humidity, temperature, etc, and other related information like product identity, and properties19,30. Therefore, it is feasible to dynamically forecast the quality of time-sensitive perishable foods during storage based on the automatically generated environmental conditions data thereby ensuring that the quality of perishables can be maintained especially by controlling the storage temperature, which is a key environmental factor thereby minimizing general food waste. However, to the best of our knowledge, no criterion has been proposed in the literature to guide how to set and control the optimal temperature of perishable foods under disparate system parameters such as temperature and humidity during storage. Additionally, to investigate the management of multi-temperature commodities supply chain, the k-means clustering technique is used in this paper to determine the temperature clusters for a range of perishable foods with different but manageable refrigerated storage temperature levels. Despite existing extensive research as illustrated in Table 1 on optimal storage temperatures and temperature clustering for perishable foods, there is a lack of studies integrating these approaches to address the complexities of a multi-commodity perishable food supply chain. This study aims to bridge this research gap by combining a mathematical optimal control model for single-item storage temperature with k-means clustering for multi-commodity temperature management to determine suitable temperature zones for diverse perishable foods, offering a comprehensive approach to enhancing food quality and reducing waste.

Table 1 Comparative study table and research gap.

The remaining parts of the paper are organized as follows: materials and methods, optimal target temperature, modelling optimal temperature control, optimal storage temperature, and k-Means clustering technique are presented in Section "Materials and methods". Section "Results and discussion" contains the results and discussion, while Section "Conclusions" concludes the study.

Materials and methods

Optimal target temperature

During perishable foods transportation, microbial growth which leads to quality deterioration is usually controlled through refrigerated storage. Using refrigeration to keep the temperature of perishable foods at the point where both the microbial and metabolic deterioration of the products are reduced aids in prolonging their shelf-life and further maintains the quality of the products. Nevertheless, studies have shown that prolonging the shelf-life of time-sensitive perishable foods through refrigerated storage without conducting proper temperature control could become a potential risk factor for food-borne illness due to development of microbial hazards31. A key factor in protecting perishable products against quality deterioration while in refrigerated storage and transported for distribution is ensuring optimal temperature control by maintaining the ideal storage temperature. In other words, perishable foods’ quality deterioration depends largely on both time and mishandling of storage temperature. Storage temperature mishandling is generally additive, and even short periods of mishandling of the perishable foods storage temperature during loading, transportation, and offloading, could result in a significant amount of quality deterioration by the time the food arrives at their intended destination32. Different categories of perishable food groups have different ideal storage temperature levels. For instance, there are cold chill, exotic chill, medium chill, and frozen storage temperature levels. The ideal frozen temperature level for ice cream is − 25 °C, and − 18 °C for other perishable foods and similar food ingredients. For poultry and fresh meat, most meat-based provisions, vegetables and dairy, and some fruits, it is cold chill of 0–1 °C. For fats, jollof rice, cheeses, butters, and some pastry-based food products, it is medium chill of 5 °C, whereas for eggs, potatoes, bananas, and exotic fruit, it is exotic chill of 10–15 °C33. Other studies have recommended the division of some time-sensitive perishable foods in line with their optimum storage temperature requirements like vegetables and fruits into different categories such as 0–2 °C group, 7–10 °C group, and 13–18 °C group34. Group 1 (0–2 °C) is the category for most of the green, temperature fruits, and non-fruit vegetables, while groups 2 (7–10 °C) and group 3 (13–18 °C) are the categories for the majority of chill-sensitive perishable products.

Notations and assumptions

The proposed optimal control model is based on the following notations and assumptions.

Notations

\(\mathcal{Q}\left(\theta \right)\) Quality factor of the perishable food measured at time \(\theta\)

\(\psi\) Quality decay coefficient.

\(n\) Power factor referred to as the order of the reaction.

\(\mathcal{Q}0\) Initial quality of the perishable food measured at \(\theta =0\)

\({\psi }_{0}\) Pre-exponential factor for the reaction.

\({A}_{0}\) Activation energy for the reaction measured in cal/mole.

\(R\) Ideal gas constant = 1.987 cal/K mole.

\(T\left(\theta \right)\) Absolute perishable food storage temperature.

\(\widetilde{\mathbb{T}}\) Lowest adjustable temperature.

\({\mathbb{T}}_{0}\) Highest adjustable temperature.

\(\zeta\) Auxiliary energy consumption.

\(\eta\) Cost coefficient of temperature control.

\(\mathcal{Q}\left({T}_{t}\right)\) Quality of perishable foods at the terminal time \({T}_{t}\)

\(H\) Hamiltonian function.

\(\mu \left(\theta \right)\) Costate variable.

\({\psi }^{*}\) Optimal temperature control.

\(k\) Number of centroids.

\({y}_{i}\) i th sensor-measured refrigerated perishable foods storage temperature data points of the \(k\) cluster \(({\mathcal{C}}_{k})\)

\({\varphi }_{k}\) Mean storage temperature value of the points in \({\mathcal{C}}_{k}\)

Assumptions

The proposed optimal control model is developed under the following assumptions:

  1. a)

    Only a set of similar perishable foods are stored in the refrigerator within a given period \(\left[0, {T}_{t}\right]\).

  2. b)

    The inventory system involves only items that are both substitutable and prone to deterioration.

Modelling optimal temperature control

To ensure mathematical tractability, the mathematical model under consideration in this study is a simple case with the assumption that only a set of similar perishables are stored in the refrigerator within a given period \(\left[0, {T}_{t}\right]\). The quality deterioration of most perishable products can be modelled using a mathematical equation35 shown below as

$$\mathcal{Q}\left(\theta \right)=\psi {\mathcal{Q}}^{n}\left(\theta \right)$$
(1)

where \(\mathcal{Q}\left(\theta \right)\) represents the quality factor of the perishable food measured at time \(\theta\), while \(\psi\) is the quality decay coefficient which largely depends on the perishable food’s storage temperature, and \(n\) denotes the power factor referred to as the order of the reaction, which defines whether the reaction rate is independent of the amount of the perishable food’s quality remaining. Therefore, the initial quality of the perishable food measured at \(\theta =0\) can be expressed as \(\mathcal{Q}0\), such that \(\mathcal{Q}\left(\theta \right)=\mathcal{Q}0\). From a data pre-processing standpoint, most literature datasets for change in the quality of perishable foods, (which depends either on microbial growth, chemical reaction, or sensory value), follow a zero-order reaction model with \(n=0\) or a first-order reaction model with \(n=0\). With Eq. (1), in most situations, the order of reaction \(n\) takes either zero-order (0) or first-order reactions (1), which will result in either a linear or exponential quality deterioration. This study considers the first-order reaction, \(n=1\) which will lead to exponential quality deterioration.

Several studies have investigated the effects of temperature on the increase in chemical reaction rate, but Arrhenius model, in which the effect of temperature is incorporated into an exponential model of the rate constant is the most widely accepted32,33,34. Based on the Arrhenius model which is an equation for the temperature-dependent of a chemical reaction rate, the general form of perishable food quality decay coefficient \(\psi\) can be expressed as

$$\psi ={\psi }_{0}\text{exp}\left(\frac{-{A}_{0}}{RT\left(\theta \right)}\right)$$
(2)

where \({\psi }_{0}\) denotes the pre-exponential factor for the reaction, \({A}_{0}\) represents the activation energy for the reaction measured in cal/mole, \(R\) denotes the ideal gas constant = 1.987 cal/K mole, and \(T\left(\theta \right)\) is the absolute perishable food storage temperature which can be adjusted continuously at any time \(\theta\). Let \(\left(\widetilde{\mathbb{T}}\right.\left.,{\mathbb{T}}_{0}\right)\) be the interval of controllable temperature, with \(\widetilde{\mathbb{T}}\) and \({\mathbb{T}}_{0}\) as the lowest and highest adjustable temperature, respectively. In practice, the highest controllable temperature \({\mathbb{T}}_{0}\) is normally adjusted to the prevailing natural environmental temperature. Perishable food’s quality level can be determined if the loss coefficient, storage time, and initial quality are known10,15.

According to Zanoni and Zavanella37, the use of different range of temperatures during storage time for preserving perishable foods will imply different operational cost of maintaining the storage. In a general sense, the use of a lower temperatures during storage time for preserving perishable foods implies a better food storage condition and slows down the overall rate of quality deterioration as expressed in eqn \(\left(1\right)\) and \(\left(2\right)\), but also implies a higher implementation cost. In the contrary, with temperature control, the loss in value of perishable foods may increase if a higher temperature set is adopted during storage in pursuit of lower implementation cost due to rapid quality deterioration which is usually associated with increased storage temperature.

Categorically, the cost of implementing temperature control during the storage of perishable foods can be expressed as39,40

$$C\left(\tau \right)=\underset{0}{\overset{{T}_{t}}{\int }}\left\{\zeta +\eta {\left(T\left(\theta \right) - {T}_{0}\right)}^{4}\right\}\partial t$$
(3)

where \(\zeta\) is the auxiliary energy consumption, \(\eta\) represents the cost coefficient of temperature control, and \({\left(T\left(\theta \right) - {T}_{0}\right)}^{4}\) denotes the penalty for deviation from the ambient temperature. In practice, the cost of temperature control monotonically increases with the increase of the deviation between \(T\) and \({T}_{0}\).

Generally speaking, all time-sensitive perishable products are usually incline towards quality deterioration over time irrespective of whether they are properly stored or not. Therefore, there is generally a level of loss in value of the perishables that is normally induced by the quality deterioration. The quality of perishable foods \(\mathcal{Q}\left({T}_{t}\right)\) at the terminal time \({T}_{t}\) is subject to an induced degradation denoted by \(h\left\{\mathcal{Q}\left({T}_{t}\right)\right\}\). Hence, during the period \(\left[0,{T}_{t}\right]\), the penalty of perishable food spoilage can be regarded as \(h\left\{\mathcal{Q}\left({T}_{t}\right)\right\}\). In other words, higher spoilage connotes higher penalty. Therefore, it is logical to assume that

$$\frac{\partial h}{\partial \mathcal{Q}}>0, \frac{{\partial }^{2}h}{\partial {\mathcal{Q}}^{2}}>0$$
(4)

Thus, the total cost which comprises of the cost of controlling ambient temperature to the desired temperature and the loss incurred by spoilage can be expressed as

$${C}_{t}=h\left\{\mathcal{Q}\left({T}_{t}\right)\right\}+\underset{0}{\overset{{T}_{t}}{\int }}\left\{\zeta +\eta {\left(T\left(\theta \right) - {T}_{0}\right)}^{4}\right\}\partial t$$
(5)

The storage temperature \(T\left(\theta \right)\) of a perishable food can be regarded as the control variable of the dynamic system and the perishable quality \(\mathcal{Q}\left(\theta \right)\) as the state variable of the dynamic system. Therefore, the optimal storage temperature control model that can minimise the total cost \({C}_{t}\) can be expressed as

$$\left\{\begin{array}{l}\underset{\tau \left(.\right)}{\text{min}}{ C}_{t}=h\left\{\mathcal{Q}\left({T}_{t}\right)\right\}+\underset{0}{\overset{{T}_{t}}{\int }}\left\{\zeta +\eta {\left(T\left(\theta \right) - {T}_{0}\right)}^{4}\right\}\partial t \\ s.t. \dot{\mathcal{Q}}\left(\theta \right)={\psi }_{0}\text{exp}\left(\frac{-{A}_{0}}{RT\left(\theta \right)}\right)Q\left(\theta \right), Q\left(\theta \right)={\mathcal{Q}}_{0}, \\ \underline{T}\le T\left(\theta \right)\le {T}_{0}.\end{array}\right.$$
(6)

The optimal storage temperature control model presented in eqn \((6)\) is a complex optimal temperature control problem of non-linear dynamic system associated with an objective function in the form of a quartic equation (equation of the fourth degree). In other words, this makes it rather difficult to directly obtain the optimal storage temperature control. Thus, let \(\beta \left(\theta \right)=\text{ln}\mathcal{Q}\left(\theta \right)\), so that the state equation in \((6)\) can be transformed into

$$\dot{ \beta }\left(\theta \right)=\psi \left(\theta \right),$$
(7)
$$\beta (0)=\text{ln}{\mathcal{Q}}_{0}.$$
(8)

The perishable food quality decay coefficient \(\psi (\theta )\) can be directly determined from eqn \(\left(2\right)\) once the \(T\left(\theta \right)\) is known, and vice versa. Therefore, \(\psi (\cdot )\) can be re-set as the control variable, so that by the reason of eqn \(\left(2\right)\), the optimal storage temperature control model presented in eqn \((6)\) can be re-written as

$$\left\{\begin{array}{l}\underset{\mathcal{k}\left(.\right)}{\text{min}}{ C}_{t}\left(\psi \right)=h\left\{exp\left\{\beta \left({T}_{t}\right)\right\}\right\}+\underset{0}{\overset{{T}_{t}}{\int }}\left\{\zeta +\eta {\left(\frac{{A}_{0}}{R\left(\text{ln}{\psi }_{0}-\text{ln}\psi \left(\theta \right)\right)} - \frac{{A}_{0}}{R\left(\text{ln}{\psi }_{0}-\text{ln}{R}_{0}\right)}\right)}^{4}\right\}\partial t \\ s.t. \dot{\beta }\left(\theta \right)=\psi \left(\theta \right), \beta (0)=\text{ln}{\mathcal{Q}}_{0}, \\ {\psi }_{0}exp\left(\frac{-{A}_{0}}{R\underline{T}}\right)\le \psi \left(\theta \right)\le {R}_{0}.\end{array}\right.$$
(9)

where \({R}_{0}={\psi }_{0} exp\left(-{A}_{0}/{R}_{0}T\right)\). Thus, the model presented in eqn \((9)\) is an optimal storage temperature control problem for a linear system associated with a non-linear objective function.

Optimal storage temperature

In order to solve the optimal storage temperature control problem presented in eqn \((8)\), this study adopted the Pontryagin's maximum principle41. For the simplification of the notation, let \(\mathcal{F}\left(\beta \right)=1/\left(\text{ln}{\psi }_{0}-\text{ln}\beta \right)\). Then, the Hamiltonian function \(H\), and the costate variable \(\mu \left(\theta \right)\) are introduced as follows

$$H\left(\beta ,\psi ,\mu ,\theta \right)=\left\{\zeta +\eta {\left(\frac{{A}_{0}}{R\left(\text{ln}{\psi }_{0}-\text{ln}\psi \left(\theta \right)\right)} - \frac{{A}_{0}}{R\left(\text{ln}{\psi }_{0}-\text{ln}{R}_{0}\right)}\right)}^{4}\right\}+\mu \left(\theta \right)$$
$$=\zeta +\eta \left(\frac{{A}_{0}^{4}}{{R}^{4}}\right){\left(\mathcal{F}\left(\psi \right)-\mathcal{F}\left({R}_{0}\right)\right)}^{4}+\mu \left(\theta \right)$$
(10)

The canonical equations presented in eqn \(\left(11\right)\) and \((12)\) are satisfied by both the costate variables and optimal state as shown below

$$\dot{\beta }=\frac{\partial H}{\partial \mu },$$
(11)
$$\dot{\mu }=-\frac{\partial H}{\partial \beta }.$$
(12)

Given that the terminal value of state variable \(\beta \left({T}_{t}\right)\) is free, and the terminal time \({T}_{t}\) is fixed, then the transversal condition becomes

$$\mu \left({T}_{t}\right)=\frac{\partial h}{\partial \beta \left({T}_{t}\right)}.$$
(13)

Note from eqn \((12)\) with \(\dot{\mu }=0\), that \(\mu\) is a constant. Therefore, \(\mu\) can be obtained from eqn \((13)\) as shown below

$$\mu =\frac{\partial h}{\partial \beta \left({T}_{t}\right)}.$$
(14)

According to Kopp41, the Hamiltonian function can be minimized by the optimal control \(\mathcalligra{k}\) * with the constraint \({\psi }_{0} exp\left(-{A}_{0}/{R}_{0}T\right)\le \psi \le {R}_{0}\). Thus, the first-order condition wrt \(\psi\) that is necessary for the Hamiltonian function to be minimized, if it holds, can be expressed as

$$\frac{\partial H}{\partial \beta }=0,$$
(15)

so that on account of eqn \((14)\) can be given as

$$\frac{\partial h}{\partial \beta \left({T}_{t}\right)}+\frac{4\left({A}_{0}^{4}\right)\eta {\left(\frac{1}{\text{ln}{\psi }_{0}-\text{ln}\psi } - \frac{1}{\left(\text{ln}{\psi }_{0}-\text{ln}{R}_{0}\right)}\right)}^{3}}{{R}^{4}\psi {\left(\text{ln}{\psi }_{0}-\text{ln}\psi \right)}^{2}}=0,$$

which becomes,

$$\frac{\partial h}{\partial \beta \left({T}_{t}\right)}+\frac{4\left({A}_{0}^{4}\right)\eta {\cdot \mathcal{F}}^{2}\left(\psi \right){\left(\mathcal{F}\left(\psi \right)-\mathcal{F}\left({R}_{0}\right)\right)}^{3}}{{R}^{4}\psi {\left(\text{ln}{\psi }_{0}-\text{ln}\psi \right)}^{2}}=0.$$
(16)

Note that an algebraic equation is presented eqn \((16)\) above that is independent of \(\theta\). Thus, the optimal temperature control \({\psi }^{*}\) is a constant. Now, let \(\underset{\_}{\beta }={\psi }_{0} exp\left(-{A}_{0}/{R}_{0}\underline{T}\right){T}_{t}+{ \text{ln}\mathcal{Q}}_{0},\) \(\beta ={R}_{0}{T}_{t}+{ \text{ln}\mathcal{Q}}_{0}\), so that based on the analysis given above, the main results of this study are as follow:

Theorem 1

The optimal temperature control \({\psi }^{*}\in \left({\psi }_{0} exp\left(-{A}_{0}/{R}_{0}\underline{T}\right), {R}_{0}\right)\) asymmetrically satisfies.

$${\left.\frac{\partial h}{\partial \beta \left({T}_{t}\right)}\right|}_{\beta \left({T}_{t}\right)=\left(\psi {T}_{t}+{ \text{ln}\mathcal{Q}}_{0}\right)}+\frac{4\left({A}_{0}^{4}\right)\eta {\cdot \mathcal{F}}^{2}\left(\psi \right){\left(\mathcal{F}\left(\psi \right)-\mathcal{F}\left({R}_{0}\right)\right)}^{3}}{{R}^{4}\psi }=0,$$
(17)

when

$${\left.\frac{\partial h}{\partial \beta \left({T}_{t}\right)}\right|}_{\beta \left({T}_{t}\right)=\underset{\_}{\beta }}<\frac{4\psi \eta {\underline{T}}^{2}exp\left(\frac{{A}_{0}}{R\underline{T}}\right){\left({T}_{0}-\underline{T}\right)}^{3}}{{\psi }_{0}{A}_{0}}=0.$$
(18)

Proof

Let the LHS of eqn \((16)\) be expressed.

$$\mathcal{F}\left(\psi \right)=\frac{\partial h}{\partial \beta \left({T}_{t}\right)}+\frac{4\left({A}_{0}^{4}\right)\eta {\cdot \mathcal{F}}^{2}\left(\psi \right){\left(\mathcal{F}\left(\psi \right)-\mathcal{F}\left({R}_{0}\right)\right)}^{3}}{{R}^{4}\psi }.$$
(19)

The differential equation presented in eqn \((11)\) can be solved to find the state variable at the optimal control as shown below in eqn \((20)\)

$$\beta \left(\theta \right)=\psi \theta +\text{ln}{\mathcal{Q}}_{0},$$
(20)

so that by the substitution of the state equation presented in eqn \((20)\) into eqn \((19)\), the derivative of \({\mathbbm{f}}\left(\psi \right)\) wrt \(\psi\) can be obtained as follows

$$\dot{\mathbbm{f}} =\frac{{\partial }^{2}h}{\partial {\beta }^{2}\left({T}_{t}\right)}{T}_{t}+\frac{4\left({A}_{0}^{4}\right)\eta {\left(\frac{1}{\text{ln}{\psi }_{0}-\text{ln}\psi } - \frac{1}{\left(\text{ln}{\psi }_{0}-\text{ln}{R}_{0}\right)}\right)}^{2}\left(\frac{R{T}_{0}}{{A}_{0}}{\left(\text{ln}\frac{{\psi }_{0}}{\psi }\right)}^{2}-\left(1+\frac{2R{T}_{0}}{{A}_{0}}\right)\left(\text{ln}\frac{{\psi }_{0}}{\psi }\right)+5\right)}{{R}^{4}{\psi }^{2}{\left(\text{ln}{\psi }_{0}-\text{ln}\psi \right)}^{4}}$$
$$=\frac{{\partial }^{2}h}{\partial {\beta }^{2}\left({T}_{t}\right)}{T}_{t}+\frac{4\left({A}_{0}^{4}\right)\eta {\cdot \mathcal{F}}^{4}\left(\psi \right){\left(\mathcal{F}\left(\psi \right)-\mathcal{F}\left({R}_{0}\right)\right)}^{2}\left(\frac{R{T}_{0}}{{A}_{0}}{\left(\text{ln}\frac{{\psi }_{0}}{\psi }\right)}^{2}-\left(1+\frac{2R{T}_{0}}{{A}_{0}}\right)\left(\text{ln}\frac{{\psi }_{0}}{\psi }\right)+5\right)}{{R}^{4}\psi }.$$
(21)

Now, let \(\gamma \left(\psi \right)=\frac{R{T}_{0}}{{A}_{0}}{\left(\text{ln}\frac{{\psi }_{0}}{\psi }\right)}^{2}-\left(1+\frac{2R{T}_{0}}{{A}_{0}}\right)\left(\text{ln}\frac{{\psi }_{0}}{\psi }\right)+5\), with \(\psi \in {\psi }_{0} \left[exp\left(-{A}_{0}/R\underline{T}\right),{R}_{0}\right]\), so that \(\text{ln}{\psi }_{0}/\psi =\left[{A}_{0}/R{T}_{0},{A}_{0}/R\underline{T}\right]\). Then, let \(\zeta =\text{ln}{\psi }_{0}/\psi\) so that a function \(\overline{\gamma }\left(\zeta \right)\) can be introduced as

$$\overline{\gamma }\left(\zeta \right)={\zeta }^{2}\left(\frac{R{T}_{0}}{{A}_{0}}\right)-\zeta \left(1+\frac{2R{T}_{0}}{{A}_{0}}\right)+5,$$
(22)

with \(\zeta \in \left[{A}_{0}/R{T}_{0},{A}_{0}/R\underline{T}\right]\). In practice40, \(R\cong 8.3,\) \({A}_{0}\cong 85613.4\), and is the ambient storage temperature. Therefore, \({A}_{0}/2R{T}_{0}\gg 1\), and at \(\zeta ={A}_{0}/R{T}_{0}\) (corresponding to \(\psi ={T}_{0}\)), the function presented in eqn \((22)\), that is \(\overline{\gamma }\left(\zeta \right)\) approaches its minimum value (i.e., 3). Similarly, \(\gamma \left(\psi \right)\) approaches its minimum value when \({\gamma }_{min}\left({R}_{0}\right)=3\) with \(\gamma \left(\psi \right)>0\) \(\forall\) \(\psi \in \left[{\psi }_{0} exp\left(-{A}_{0}/R{T}_{0}\right),{R}_{0}\right]\). It is also notewothy to state that \({\partial }^{2}h/\partial {\beta }^{2}\left({T}_{t}\right)>0\), and \(\dot{\mathbbm{f}}>0\), that is, \({\mathbbm{f}}\) increases wrt \(\psi\) \(\forall\) \(\psi \in \left[{\psi }_{0} exp\left(-{A}_{0}/R\underline{T}\right),{R}_{0}\right]\). Additionally, it can be further obtained that

$${\mathbbm{f}}\left({\psi }_{0} exp\left(\frac{-{A}_{0}}{R\underline{T}}\right)\right)={\left.\frac{\partial h}{\partial \beta \left({T}_{t}\right)}\right|}_{\beta \left({T}_{t}\right)=\underset{\_}{\beta }}+\frac{4R\eta {\underline{T}}^{2}exp\left(\frac{{A}_{0}}{R\underline{T}}\right){\left(\underline{T}-{T}_{0}\right)}^{3}}{{\psi }_{0}{A}_{0}},$$
(23)

and

$${\mathbbm{f}} \left({R}_{0}\right)={\left.\frac{\partial h}{\partial \beta \left({T}_{t}\right)}\right|}_{\beta \left({T}_{t}\right)=\overline{\beta }}.$$
(24)

Furthermore, note that \({\mathbbm{f}}\left({R}_{0}\right)>0\), and consequently, as shown in eqn \((18)\), there exists a unique \({\psi }^{*}\in \left[{\psi }_{0} exp\left(-{A}_{0}/R\underline{T}\right),{R}_{0}\right]\) which satisfies \(\partial H/\partial \psi =0\) as shown in eqn \((16)\). Finally, by substituting the state variable’s terminal value \(\beta \left({T}_{t}\right)={ \text{ln}\mathcal{Q}}_{0}+\psi {T}_{t}\) into eqn \((16)\), then, eqn \((17)\) can be obtained. The proof of Theorem 1 is complete.

Theorem 2

The optimal temperature control \({\psi }^{*}=\left({\psi }_{0} exp\left(-{A}_{0}/R\underline{T}\right)\right)\) when.

$${\left.\frac{\partial h}{\partial \beta \left({T}_{t}\right)}\right|}_{\beta \left({T}_{t}\right)=\underset{\_}{\beta }}\ge \frac{4R\eta {\underline{T}}^{2}exp\left(\frac{{A}_{0}}{R\underline{T}}\right){\left(\underline{T}-{T}_{0}\right)}^{3}}{{\psi }_{0}{A}_{0}}.$$
(25)

Proof

Recall that \({\mathbbm{f}}(\psi )\) increases wrt \(\psi\) \(\forall\) \(\psi \in \left[{\psi }_{0} exp\left(-{A}_{0}/R\underline{T}\right),{R}_{0}\right]\). Similarly, the Hamiltonian function increases wrt \(\psi\) by virtue of eqn \((23)\) when \({\mathbbm{f}}\left({\psi }_{0} exp\left(-{A}_{0}/R\underline{T}\right)\right)\ge 0\), which means that eqn \((25)\) holds. Therefore, the lower bound of \(\psi\) which minimizes the Hamiltonian function is the optimal control \({\psi }^{*}\), that is, \({{\psi }^{*}=\psi }_{0} exp\left(-{A}_{0}/R\underline{T}\right)\). The proof of Theorem 2 is complete.

Thus, from eqn \((2)\), with \({\psi }^{*}\) known, the optimal perishable foods storage temperature can be determined as

$${T}^{*}=\frac{{A}_{0}}{R\left(\text{ln}{\psi }_{0}-\text{ln}{\psi }^{*}\right)}.$$
(26)

Therefore, eqn \((26)\), Theorem 1, and Theorem 2 have shown that the optimal perishable foods storage temperature is a constant value (i.e., the change in perishable foods storage temperature is always zero). This means that the isotherm processes and conditions of perishable foods storage are optimal, and can be conveniently implemented for efficient supply chain storage temperature management and quality control of time-sensitive perishable foods. In this Section, the mathematical model to obtain the optimal perishable food storage temperature is established. However, perishable foods that require refrigerated storage usually have a specific temperature point or range of designated optimal storage temperature. This means that the target optimal storage temperature determined for a particular perishable product may not likely be applicable for other products if they are kept or transported using the same refrigerated storage facility. Hence, for multi-temperature commodities supply chain, a hybrid approach is applied by using k-means clustering technique (see Section "k-Means clustering technique for temperature control") to determine the temperature clusters for a range of perishables.

k-Means clustering technique for temperature control

As dicussed in Section "Optimal target temperature", there are diverse time-sensitive perishable foods that require chilled storage temperature conditions, and the management of these storage temperature conditions is usually more complex and sophisticated as opposed to straight-foreward frozen perishable foods. Therefore, it is almost impractical to operate a single refrigeratered storage facility that can have an optimal storage temperature which will satisfy all the temperature requirements of various range of perishable foods. In other words, satisfying the temperature requirement of perishable foods with different temperature zones requires two or more cold storage areas. One of the unsuppervised ML techniques that is aptly suitable for this purpose is the widely used clustering technique43,44,45.

In this Section, k-means clustering technique for perishable foods storage temperature control is investigated. The fundamental principle is that the range of the optimal refrigerated storage temperatures of the various perishable foods are considered as coordinate points \((i, j)\) in a plane. The major objective of clustering algorithm is to group similar data-points (i.e., storage temperature of each perishable foods) together with the aim of discovering the underlying patterns. k-means clustering algorithms need a fixed number of clusters \((k)\) in order to achieve the goal of efficiently grouping similar data-points together prior to finding the required underlying patterns. The target number \(k\) refers to the number of centroids, which is widely used method in facility location problems44, and can be applied to determine the optimal target storage temperature of perishable foods.

The centroid \(W({\mathcal{C}}_{k})\) is expressed as follows

$$W({\mathcal{C}}_{k})=\sum_{{y}_{i}\in {\mathcal{C}}_{k}}{\left({y}_{i}-{\varphi }_{k}\right)}^{2},$$
(27)

where \({y}_{i}\) denotes the \({\text{i}}^{\text{th}}\) sensor-measured refrigerated perishable foods storage temperature data points of the \(k\) cluster \(({\mathcal{C}}_{k})\), and \({\varphi }_{k}\) is the mean storage temperature value of the points in \({\mathcal{C}}_{k}\). The total within-cluster variation \({\mathcal{C}}_{Total}\) in k-means clustering technique is generally expressed as the sum of squared distances of the Euclidean distances between the data points and their corresponding \(W({\mathcal{C}}_{k})\) as shown below

$${\mathcal{C}}_{Total}=\sum_{k=1}^{k}W({\mathcal{C}}_{k}),=\sum_{k=1}^{k}\sum_{{y}_{i}\in {\mathcal{C}}_{k}}{\left({y}_{i}-{\varphi }_{k}\right)}^{2}.$$
(28)

The k-means algorithm presented in Algorithm 1 below demonstrates the procedures and the working principles of k-means clustering technique as follows:

  1. i.

    Set the number of \(k\) clusters \(\left({\mathcal{C}}_{k}\right)\);

  2. ii.

    Randomly select \(k\) sensor-measured storage temperature data points as the initial \(W({\mathcal{C}}_{k})\);

  3. iii.

    Assign the remaining sensor-measured storage temperature data points to their closest \(W({\mathcal{C}}_{k})\) according to the Euclidean distance function;

  4. iv.

    Recompute the mean (i.e., new \(W({\mathcal{C}}_{k})\));

  5. v.

    Repeate steps (iii) and (iv) until there are no changes in \(W({\mathcal{C}}_{k})\).

Algorithm 1
figure a

\({\varvec{k}}\)-means algorithm.

Results and discussion

The Algorithm 1 is used to determine the optimal number of \(k\) clusters \({\mathcal{C}}_{k}\). To achieve that, this study applied the elbow plot method46. Firstly, clustering is conducted using different numbers of \(k\) clusters before computing the total sum of squares for all the \(k\) values and plotted the results against \(k\). Then, the \(k\) value at the elbow joint (i.e., the location of bend) in the plot depicted in Fig. 1 below is regarded as the optimal number of clusters. It can be noted that in Fig. 1 (i.e., the result of an elbow plot), an increase in \(k\) leads to decrease in the total sum of squares distance. Similarly, in Fig. 1, there is a noticeable sharp bend in the graph at \(k=2\). The result in Fig. 1 further demonstrates that having set of additional clusters will result in a reduction of the sum of squares.

Fig. 1
figure 1

Elbow plot to check optimal number of \(k\) clusters.

Through the application of the \(k\)-means clustering technique, the time-sensitive perishable foods were classified and categorized into a given set of clusters with different but manageable refrigerated storage temperature zones. The optimal target refrigerated storage temperature is determined based on the centroid approach. The sample storage temperature dataset used includes perishable foods with varying storage temperatures which ranged from − 4 °C to 20 °C. The outcome is a set of optimal target storage temperatures with their corresponding target humidity ranges for dissimilar scenarios such as cluster 1, cluster 2, cluster 3, and cluster 4 as illustrated in Fig. 2 and tabulated in Table 2 above.

Fig. 2
figure 2

Results of the application of \(k\)-means clustering algorithm.

Table 2 Optimal storage temperatures for dissimilar scenarios.

In Section "Optimal target temperature", the different categories of perishable food groups with different ideal storage temperature levels were discussed such as cold chill, exotic chill, medium chill, and frozen storage temperature levels. Therefore, specific optimal storage temperature of a set of similar perishable foods must be as close to the target optimal temperature level as possible to ensure that the products quality deterioration is minimized. From that perspective, it can be inferred that out of the four (4) clusters (i.e., cluster 1, cluster 2, cluster 3, and cluster 4), the cluster 2 solution \(\left(k=2\right)\) remains the best amongst the four solutions contained in Table 2, as it has storage temperature levels with the smallest range of (− 0.87 °C, 3.31 °C). Furthermore, with a limited refrigerated storage space, the closest two (2) cluster solutions (i.e., \(\left(k=2\right)\) and \(\left(k=3\right)\)) with minimal storage temperature levels ranging from (-0.87, 3.31) to (4.02, 5.93) can be safely combined into one target optimal storage temperature level. This temperature zone will become the most suitable as it will accommodate a wider range of products and still reduce their deterioration and maintain the products quality.

Managerial insights

This study has shown that effective management of temperature-sensitive perishable food supply chains is critical to minimizing food waste, ensuring product quality, and safeguarding consumer health. The integration of mathematical optimal control models and ML techniques, such as the proposed ML-based optimal temperature management model in this study, provides valuable tools for decision-makers to achieve these goals. Adopting and implementing the proposed hybrid mathematical optimal control model, decision-makers and perishable foods supply chain managers can determine the precise storage temperature that minimizes quality deterioration for specific types of perishable foods. This targeted approach can significantly reduce food waste and ensure that products reach consumers in optimal condition, thereby enhancing customer satisfaction and reducing costs associated with spoilage. This study further highlights that maintaining lower temperatures can slow down the quality deterioration process, but it also involves higher operational costs. Managers need to balance the cost of maintaining optimal storage temperatures with the benefits of reduced spoilage. The provided cost functions expressed in eqn \((3)\), and eqn \((5)\) can help decision-makers and perishable foods supply chain managers to quantify this trade-off and make informed decisions.

Additionally, as illustrated in Figure 1 under Section "Results and discussion", the use of the elbow method for determining the optimal number of temperature clusters provides a data-driven approach to designing storage facilities. This method ensures that resources are allocated efficiently, with minimal overlap and maximum coverage of different temperature requirements, thereby optimizing storage operations. Furthermore, the application of k-means clustering allows for the segmentation of storage facilities into different temperature zones, each optimized for a range of perishable products. This approach is particularly useful for multi-temperature commodity supply chains. Perishable foods supply chain managers can use the clustering based proposed model to identify the optimal number of storage zones and their respective temperatures, ensuring that each type of perishable food is stored under ideal conditions without the need for excessive infrastructure. Similarly, continuous collection and analysis of data from storage conditions and quality assessments, perishable foods supply chain managers can refine their temperature control strategies, with the insights gained from used for incremental improvements in storage practices, further reducing waste and enhancing product quality. Finally, with the insights gained from this study, decision-makers and managers in the perishable food supply chain industry can develop robust strategies to maintain product quality, reduce waste, and optimize operational costs, ultimately leading to improved profitability and consumer satisfaction.

Conclusions

Proper management of the storage temperature in food supply chain is a crucial factor necessary for reducing the quality deterioration of chill-sensitive and chilled perishable foods. This paper studied two unique approaches of storage temperature control for efficient food supply chain management and reduction of the quality deterioration of perishable foods. Firstly, a mathematical optimal control model for storage temperature control of perishable food is proposed. With the proposed optimal control model, the storage temperature is regarded as the control variable where the quality deterioration of the perishable food follows the first-order reaction. The paper adopted the Pontryagin's maximum principle to solve the optimal control model problem which is used to determine the optimal storage temperature for a set of similar perishable foods in cold chain. For the storage of any set of perishable foods whose quality deterioration rate follows the first-order reaction, this study has strictly proofed the optimality of the isotherm condition of cold chain storage. Secondly, to accommodate multi-temperature commodities supply chain, this study applied the k-means clustering technique (an unsupervised ML method) to determine the temperature clusters for a range of perishable foods in cold chain. Based on the descriptive analysis of the outcomes, it could be inferred that adopting a constant optimal storage temperature for a set of similar perishable foods in cold chain can be highly profitable for decision-makers in supply chain management.

The evolving landscape of perishable food supply chain management presents numerous opportunities for future research and practical advancements. Some realistic future scopes that can build on the current study include; i) Integration with internet of things (IoT): The adoption of the proposed hybrid ML-based optimal control model with IoT-enabled smart sensors can provide real-time data on temperature, humidity, and other critical factors. Future research could focus on developing IoT frameworks that integrate with the optimal control models to offer automated, real-time adjustments to storage conditions, enhancing the overall efficiency and responsiveness of the supply chain, ii) Artificial intelligence (AI) and predictive analytics47: Advanced AI and ML algorithms can be employed to predict quality deterioration patterns and optimize storage conditions dynamically. Future studies can explore the development of AI-driven predictive models that account for a wider range of variables, including external environmental conditions, to further refine temperature control strategies, and iii) Blockchain for transparency and traceability: Implementing blockchain technology can ensure transparency and traceability throughout the supply chain. Research can focus on how blockchain can be integrated with temperature monitoring systems to create immutable records of storage conditions, thus enhancing trust and accountability. By exploring these future scopes, researchers and practitioners can continue to innovate and improve the management of temperature-sensitive perishable food supply chains, ensuring higher efficiency, reduced waste, and enhanced food quality and safety.