1 Introduction

Commercial food processing operations are complex industrial production systems, often involving multiple processes and entities. One of the most critical processes, from a consumer health perspective, is the inspection of the food products for quality control. The purpose of inspection is to separate the products into two groups; those of good quality and those of poorer quality. However, in reality, inspection processes are not error-free, and therefore, it is possible for food products to be incorrectly classified at the inspection stage. In other words, poorer quality processed inventory might be mistakenly classified as being of good quality resulting in a type I inspection error. Conversely, a type II error might occur, whereby good quality processed inventory is classified as being of poorer quality.

Most processed food products are primarily sourced from growing items such as livestock. The defining feature of growing items is their ability to increase in weight over time. Recently, these items have been receiving attention from researchers seeking to optimise inventory management policies for these items. Consequently, a number of inventory models have been developed specifically for growing items, ranging from simple company-level models (Rezaei, 2014; Nobil et al., 2019; Khalilpourazari and Pasandideh, 2019; Sebatjane and Adetunji, 2019a, b; Gharaei and Almehdawe, 2020) to complex multi-echelon supply chain models (Sebatjane and Adetunji, 2020a, c). However, the impact of inspection errors on the inventory management policies of growing items have never been studied despite the potential risks that these errors pose to the consumers’ health.

This study is aimed at formulating a model for inventory management in a multi-echelon supply chain for growing items. The proposed supply chain has three members (namely, a single farmer, a single processor and a single retailer) and four echelons (namely, the farmer’s growing facility, the processor’s processing facility, the processor’s inspection facility and the retailer’s selling facility). At the farming echelon, the farmer rears live newborn items until maturity, with the proviso that some of the items might die throughout the growing cycle as a result of predators and illnesses. At the end of each growing period, the farmer sends a batch of mature items to the processor. The processor operates two facilities, corresponding to two echelons (i.e. processing and inspection). At the processing echelon, the live inventory received from the farmer is transformed into a form that is consumable (and saleable). A given fraction of the processed inventory is of poorer quality. During a single processing cycle, the processor ships an integer number of batches of processed inventory from the processing facility to the inspection facility. At the inspection echelon, the processed inventory is classified into one of two classes, namely, good and poorer quality processed inventory, with possible misclassification of some of the items. Also, during the course of a single inspection cycle, the processor ships an integer number of good quality processed inventory, as classified according to the inspection process, from the inspection facility to the retailer’s selling facility. The processor sells the poorer quality processed inventory to secondary markets at a discounted price. At the retail echelon, good quality processed inventory is used to meet consumer demand. Since some of the inventory is incorrectly classified, a fraction of the poorer quality processed may be used to meet consumer demand at the retail echelon. When consumers mistakenly receive poorer quality processed inventory as a result of errors in inspection, they return it to the retailer who sells it at a discounted price to secondary markets. On the other hand, when good quality processed inventory is mistakenly salvaged via secondary markets due to inspection errors, potential sales of good quality inventory (sold at much higher prices) are lost. There are penalty costs associated with committing any of the two types of errors.

This study accounts for a number of pertinent issues related to inventory management in food processing systems. These issues include the possibility of mortality at the farming echelon, the shipments policies adopted among the echelons, the quality inspection at the inspection echelon and the possibility of committing type I and type II errors at the inspection echelon. Because all these issues might be inherent in real life food processing operations, the results from this study can be used by production and operations managers as a guideline when making procurement and shipment decisions at different stages (or echelons) of the broader food processing value chain.

Other than the introduction, this paper has six additional sections. The introduction is followed by a survey of related studies in the literature and a brief overview of the problem at hand in Sects. 2 and 3, respectively. In Sect. 4, a model representing the proposed inventory system is developed. A special case of the model that does not account for errors in quality inspection and that makes use of a different shipment policy is derived in Sect. 5. Numerical results showing the potential practical applications of the model are provided in Sect. 6 prior to concluding the paper in Sect. 7.

2 Literature review

The literature study not only provides a brief overview of previously published related papers available in the literature but it also provides an analysis of the research gap identified and complements the gap by highlighting the unique contributions made by the current paper.

2.1 Related models in the literature

The mathematical development of the proposed model is primarily derived from two streams of research on inventory systems modelling, namely, systems with imperfect quality and inspection errors and systems comprising of growing inventory items.

2.1.1 Inventory models for items with imperfect quality and errors in quality inspection

Salameh and Jaber (2000) introduced the economic order quantity (EOQ) model for items with imperfect quality. This model was essentially an extension of classic EOQ model, formulated by Harris (1913), which relaxed the implicit assumption that the entire lot size is of perfect quality. Salameh and Jaber (2000) theorised an inventory situation where by the quality of a random fraction of the ordered items is of unacceptable to end users. The model assumed that the fraction of imperfect quality items is removed from the lot through a screening (or inspection) process and sold as a single batch at a discounted price when the inspection process ends. Goyal and Cardenas-Barron (2002) corrected minor computation errors in Salameh and Jaber (2000)’s model. Recently, Salameh and Jaber (2000)’s model has been extended to suit different practical situations such as scenarios with two warehouses (Jaggi et al., 2017; Aastha et al., 2020), non-linear and price-dependent demand (Cardenas-Barron et al., 2021, 2022), two-level trade credit financing (Rini and Cardenas-Barron, 2022; Tiwari et al., 2022), reorder point replenishment policy (Nobil et al., 2020b), innovative maintenance (Su et al., 2020) and complex supply chains (Almaraj and Trafalis, 2021; Malik and Kim, 2021; Ahmed et al., 2022).

An implicit assumption of this particular model was that the inspection process is 100% effective at separating the good quality items from the poorer quality items. Khan et al. (2011) recognised that this assumption seldom holds for most production systems. Consequently, Khan et al. (2011) developed an extension to Salameh and Jaber (2000)’s work which accounted for an inspection process that is prone to errors. In their model, Khan et al. (2011) assumed that the inspection is subject to two types of errors, namely, type I and type II errors, representing situations where poorer quality items are classified as good quality items and where good quality items are classified as poorer quality items, respectively. Similar to the model by Salameh and Jaber (2000), it was assumed that the good quality items are sold throughout the replenishment cycle at a given price while the items of poorer quality are sold as a single batch once the inspection process ends at a discounted price. Furthermore, Khan et al. (2011) assumed that the incorrectly classified items of poorer quality (sold to consumer as good quality items) are returned throughout the cycle and incur penalty costs.

Given the relevance of the model to real life production system that have imperfect inspection processes, Khan et al. (2011)’s model has received considerable attention from various researchers. For instance, Hsu and Hsu (2013) developed an extension of the model that accounted for shortages by assuming that the inventory system under study permits shortages which are fully backordered. Khan et al. (2014) extended the concept of inspection errors to an inventory system in a two-echelon supply chain with a single buyer and a single vendor. This particular model assumed that some of the items manufactured by the vendor are of unacceptable quality. With this in mind, the buyer inspects the items prior to selling them to consumers but the inspection process is subject to type I and type II errors. The wrongfully classified items are returned by consumers. Chang et al. (2016) formulated an EOQ model for an inventory system in which a percentage of the items the seller receives is of imperfect quality and the seller has an imperfect inspection process which is not capable of correctly classifying all the items. Furthermore, the supplier of the items offers the seller trade credit financing whereby the seller is allowed a specified grace period to settle the bill for the items. Trade credit financing was the subject of another extension to Khan et al. (2011)’s model, this time by Zhou et al. (2016). Rout et al. (2019) extended the concept of inspection errors in an imperfect production process to an economic production quantity (EPQ) model for deteriorating items whose rate of decay is assumed to be a fuzzy random variable. Cheikhrouhou et al. (2018) developed a model for jointly optimising the order quantity and the inspection sample size for an inventory system with imperfect quality items and an imperfect inspection process provided that not all the items are inspected for quality (i.e. there is a sampling plan for the inspection process). Owing to stringent regulations on carbon emissions, Yassine (2020) incorporated environmental sustainability by accounting for emissions taxes incurred for transporting the items to customers. Late extensions include works such as Dey and Giri (2019), Nobil et al. (2020a) and Taleizadeh et al. (2020). Dey and Giri (2019) developed an inventory control model for a two-member supply chain, with a single vendor and a single buyer, where the vendor’s production process is imperfect and consequently, a percentage of the items sent to the buyer, who inspect them for quality, is of unacceptable quality. Furthermore, the buyer’s inspection process is assumed to be subject to both errors and learning. For the errors aspect, Dey and Giri (2019) assumed that the buyer’s inspection process can make type I and type II errors and for the learning aspect, the authors assumed that the buyer’s inspection process improves, in terms of correctly classifying the items, with every batch inspected. Taleizadeh et al. (2020) extended Khan et al. (2011)’s model by considering a novel payment plan (offered by the supplier of the items) that combines trade-credit financing with a pre-payment plan.

2.1.2 Inventory models for growing items in multi-echelon supply chains

Rezaei (2014) introduced the EOQ model for growing items such as fish, livestock and grains, to name a few. These items are not suitable for consumption at the time they are procured, and thus, before they are used to meet demand (i.e. consumed), they are fed so as to enable growth. Of late, Rezaei (2014)’s model has been extended by accounting for some of the most popular features of EOQ extensions such as quantity discounts, shortages and multiple-items, to name a few. For instance, Nobil et al. (2019), Sebatjane and Adetunji (2019a), Khalilpourazari and Pasandideh (2019), Sebatjane and Adetunji (2019b), and Pourmohammad-Zia and Karimi (2020) extended the Rezaei (2014)’s work to inventory systems for growing items with shortages, imperfect quality, multiple items, quantity discounts and deterioration, respectively. Another important extension was presented by Gharaei and Almehdawe (2020) through the incorporation of item mortality. Gharaei and Almehdawe (2020) achieved this by considering probability density functions for survival and mortality throughout the replenishment cycle. The theory behind Nobil et al. (2019) and Sebatjane and Adetunji (2019a)’s models has also been used to develop new extensions, most notably by Alfares and Afzal (2021) and De-La-Cruz-Marquez and Cardenas-Barron (2021). Alfares and Afzal (2021) developed an extension that incorporates both imperfect quality and shortages while De-La-Cruz-Marquez and Cardenas-Barron (2021)’s model incorporated both imperfect quality and shortages in addition to carbon emissions and price-dependent demand.

Furthermore, the logic behind Rezaei (2014)’s seminal model for growing items has been extended to supply chains that have multiple echelons. These types of supply chain setups are reminiscent of actual food production systems that involve activities and supply chain members. Case in point, Malekitabar et al. (2019) developed a model for inventory management, through a case study for a specific species of fish, in a two-echelon supply chain with a single farmer and a single supplier, who are responsible for growing the fish and for selling the fish, respectively. The model was formulated under the assumption that the two supply chain members have a revenue-sharing contract in place. Sebatjane and Adetunji (2020c) formulated a model for managing inventory in a three-echelon supply chain for growing items with separate farming, processing and retail levels. The nature of the demand rate has also been exploited in efforts to develop new extensions, for instance, Sebatjane and Adetunji (2020b) developed an inventory model for growing items in a three-echelon supply chain setting under the assumption that the demand is dependent on both the selling price and the expiration date. Similarly, Pourmohammad-Zia et al. (2021a) studied a two-echelon supply chain for growing items whose demand is a function of the items’ dynamic selling price while Sebatjane and Adetunji (2021) studied a three-echelon supply chain for growing items whose demand is a function of the items’ expiration date and on-hand inventory level. Other notable multi-echelon extensions include those that incorporate imperfect quality in a four-echelon supply chain setting (Sebatjane and Adetunji, 2020a); vendor managed inventory with a cost-sharing agreement in a three-echelon supply chain setting (Pourmohammad-Zia et al., 2021b); preservation technology investments in a three-echelon supply chain for growing and deteriorating items (Sebatjane, 2022); and age-dependent deterioration in a three-ehelon setting (Sebatjane and Adetunji, 2022).

2.2 Analysis

The purpose of Table 1 is two-fold, firstly, to contextualise the proposed model in the current literature on growing items in an effort to identify research gaps and secondly, to highlight the major contributions made by the proposed model to the literature.

2.2.1 Research gap identification

From the literature review, summarised in Table 1, it is evident that there is currently no published inventory model for growing items in a multi-echelon supply chain setting that accounts for the possibilities of mortality, imperfect quality and errors in quality inspection simultaneously. This represents a significant gap in the literature because mortality, quality control and inspection errors are important factors in food production systems where consumers’ livelihoods are at risk if inventory of poorer quality is sold. This study is aimed at closing this gap and by so doing, highlighting the importance of factors such as mortality, quality control and inspection errors to supply chain management practitioners in food processing and retail industries.

2.2.2 Contribution

The novelty of this model is due to the explicit consideration of the following factors simultaneously:

  • Separate farming, processing, inspection and retail echelons with the aim of maximising the joint supply chain profit.

  • At the farming echelon, survival rates for the live items are not 100%.

  • At the processing echelon, the processed inventory that is of good quality is not 100% of the initially received order.

  • The inspection process at the inspection echelon is not 100% effective and thus makes some classification errors.

  • Poorer quality processed inventory sold to consumers (as a result of inspection errors) is returned to the retail echelon for replacement with good quality processed inventory.

Table 1 Summary of the major contributions made by closely related works on growing items in the current literature

3 Problem description

The business dynamics of the current study are represented by Fig. 1 depicting the proposed four-echelon supply chain system. At the farming echelon, the farmer procures live newborn items (with the items having the capability to grow). The farmer rears the items until such a time that their weight has reached a specified target, at which point the items are deemed mature. The farmer then delivers the mature items to the next echelon, which is the processing facility where the live inventory is transformed into processed inventory. Following processing operations, the now processed inventory is delivered to the next echelon, which is the inspection facility where the quality control measures are in place. The processor sends an integer number of shipments of processed inventory from the processing facility to the inspection facility during a single processing cycle. This is different from the shipment policy between the farming facility and the processing facility whereby the farmer delivers a single shipment of mature live inventory to the processing facility per farming cycle. This is because the process of growing live items takes a relatively longer period of time. At the inspection facility, the processed inventory is classified into two groups, namely, good and poorer quality processed inventory. However, the inspection process is subject to errors and therefore, some of the processed inventory is incorrectly classified. The processed inventory that is classified as being of poorer quality (including the incorrectly classified good quality inventory) is sold as a single batch to secondary markets at a discounted price. The processed inventory that is classified as being of good quality (including the incorrectly classified poorer quality inventory) is shipped to the final echelon which is the retail echelon where consumer demand for good quality processed inventory is met. Since some of the inventory that is sold to consumers would have been incorrectly classified, it is returned to the retailer and replaced with good quality processed inventory. The returned inventory is then sold to secondary markets at a discounted price.

Fig. 1
figure 1

Inventory system profile for a farmer, a processor and a retailer in a supply chain for growing items with imperfect quality and errors in the inspection process

The proposed supply chain system is studied as a profit maximisation problem. The objective function of the problem is the total profit generated across the supply chain and problem’s decision variables are the order quantity for live inventory items, the number of shipments of processed inventory delivered from the processing facility to the inspection facility per processing cycle and the number of shipments of processed inventory delivered from the inspection facility to the retail facility per inspection cycle.

3.1 Assumptions

The following assumption are employed when modelling the proposed four-echelon supply chain inventory system:

  • The supply chain is comprised of a single farmer, a single processor and a single retailer involved in the growing, processing and retailing of a single type of growing item.

  • A fraction of the ordered live items dies at the farmer’s growing facility before reaching the maturity weight.

  • The processing rate at the processor’s processing facility is greater than the demand rate at the retailer’s retail facility and both rates are deterministic constants.

  • A fraction of the processed inventory is of poorer quality (i.e. it does not meet the required quality standard).

  • Throughout the course of a single processing cycle, the processor transfers an integer number of shipments of processed inventory to the inspection facility where a 100% inspection process takes place whereby the processed inventory is classified into two groups, namely, good quality and poorer quality processed inventory.

  • The inspection process is not perfect and is thus, prone to errors.

  • Two types of errors can occur, namely; type I (whereby poorer quality processed inventory is incorrectly classified as being of good quality); and type II errors (whereby good quality processed inventory is incorrectly classified as being of poorer quality).

  • During the inspection process, the processor transfers equally-sized shipments of processed inventory classified as being of good quality after the inspection process from the inspection facility to the retailer’s selling facility.

  • Throughout the inspection process, the processor allows processed inventory classified as being of poorer quality to accumulate at inspection facility.

  • At the end of each inspection run, the poorer quality processed inventory (as classified by the inspection process which is prone to errors) is sold as a single batch to secondary markets at a discounted price.

  • Since the inspection process is prone to errors, some of the items classified to be of poorer quality are, in fact, of good quality, but have been sold to the secondary markets. The processor incurs a penalty cost for selling incorrectly classified processed inventory.

  • The retailer uses the good quality processed inventory (as classified by the inspection process which is prone to errors) to meet consumer demand as soon as the first shipment is delivered by the processor (from the inspection facility).

  • Since the inspection process is prone to errors, some of the good quality processed inventory that the retailer sells to end consumers is in fact poorer quality processed inventory (that was incorrectly classified by the inspection process). The retailer incurs a penalty cost for selling incorrectly classified processed inventory.

  • Consumers who received poorer quality processed inventory that was incorrectly classified as good quality inventory can return the inventory to the retailer who will replace their order with a new order for good quality processed inventory.

  • The live inventory incurs feeding costs (during the growth cycle) while the processed inventory incurs holding costs (during the processing, inspection and selling cycles).

  • The probabilities of survival, type I errors and type II errors and the fraction of poorer quality processed inventory are assumed to be random variables with known probability density functions.

3.2 Notations

The following notations were adopted when developing the model:

\(b^{''}\):

The weight of poorer quality processed inventory that was incorrectly classified (as good quality processed inventory by the inspection process) received by the retailer per retail cycle

\(c_f\):

The farmer’s feeding cost per weight unit of live inventory per unit time

D:

The demand rate, in weight units per unit time, for processed items of good quality

\(h_r\):

The retailer’s holding cost per weight unit per unit time

\(h_p\):

The processor’s processing facility holding cost per weight unit per unit time

\(h_s\):

The processor’s inspection facility holding cost per weight unit per unit time

\(K_f\):

The farmer’s setup cost per cycle

\(K_p\):

The processor’s processing facility setup cost per cycle

\(K_s\):

The processor’s quality inspection setup cost

\(K_r\):

The retailer’s ordering cost per cycle

\(l_r\):

The cost (per weight unit) of accepting poorer quality processed inventory

\(l_s\):

The cost (per weight unit) of rejecting good quality processed inventory

\(m_f\):

The farmer’s mortality cost per weight unit of mortal inventory per unit time

\(n_p\):

The number of batches of processed inventory sent by the processor from the processing facility to the inspection facility per unit cycle of the processing cycle

\(n_s\):

The number of batches of good quality processed inventory delivered to the retailer (by the processor from the inspection facility) during a single inspection run

\(p_f\):

The farmer’s selling price per weight unit of live items

\(p_p\):

The processor’s selling price per weight unit of processed inventory

\(p_q\):

The processor’s selling price per weight unit of processed inventory classified as being of poorer quality after the inspection process

\(p_r\):

The retailer’s selling price per weight unit of processed inventory classified as being of good quality after the inspection process

\(p_v\):

The purchasing cost per weight unit of live newborn item

\(Q_1\):

The weight of the items in the retailer’s lot

R:

The processing rate, in weight units per unit time

\(s^{'}\):

The weight of each batch of good quality processed inventory delivered from the processor’s inspection facility to the retailer per inspection cycle

\(s^{''}\):

The weight of poorer quality processed inventory allowed to accumulate at the processor’s inspection facility per inspection cycle

T:

The retailer’s cycle time

\(T_f\):

The duration of the farmer’s growth period

\(T_p\):

The processor’s cycle time

\(T_s\):

The duration of time required to inspect the entire lot-size

\(u_1\):

The probability of a Type I error (i.e. classifying poorer quality processed inventory as good quality processed inventory)

\(u_2\):

The probability of a Type II error (i.e. classifying good quality processed inventory as poorer quality processed inventory)

v:

The inspection cost per weight unit

\(w_0\):

The weight of each newborn item

\(w_1\):

The target (or maturity) weight of each item

w(t):

The weight of an item at anytime t

x:

The fraction of the live items which survive throughout the growth period

y:

The (equivalent) number of items in the retailer’s lot per cycle

z:

The inspection rate in weight units per unit time

\(\alpha \):

The items’ asymptotic weight

\(\beta \):

The integration constant

\(\lambda \):

The exponential growth rate of the items

\(\tau \):

The duration of time between consecutive deliveries of good quality batches of processed inventory from the inspection facility to the retailer

4 Model development

The profit generated across the supply chain comprises of the profits generated by the farmer, the processor (encompassing both the processing and the inspection facilities) and the retailer.

4.1 Profit generated by the farmer

A replenishment cycle starts with the purchase of \(n_py\) newborn items. The weight of the each newborn item is \(w_0\). This implies that the weight of all the ordered live newborn items, \(n_pQ_0\), is given by \(n_pyw_0\). The weight of each item increases throughout the replenishment cycle until it reaches a target of \(w_1\). All the ordered newborn items grow at the same rate and when the weight of each of them reaches the target weight, of \(w_1\), the items are transferred to the processing echelon. However, not all the items survive to the end of the growth period due to illnesses and scavengers. Based on a survival rate of x, the total weight of all the ordered surviving items at the end of the growing period, \(n_pQ_1\), is given by \(xn_pyw_1\). This quantity is transferred to the processor for processing and quality control.

The general pattern of growth is similar for different items despite the fact that different items have different growth rates. Growth functions have a characteristic “S”-shaped curve, and for this reason the logistic function is used to model the growth pattern. The items’ growth function can be represented by

$$\begin{aligned} w_t=\frac{\alpha }{1+\beta e^{-\lambda t}}. \end{aligned}$$
(1)

The logistic growth function makes use of three parameters to represent item growth over time. These are \(\lambda \), \(\beta \) and \(\alpha \) which denote the exponential growth rate, the constant of integration and the items’ asymptotic weight respectively.

When the growth period concludes at \(T_f\), the farmer instantaneously delivers the surviving mature items to the processor. At this point, each item would be fully grown and its weight would have reached the target weight of \(w_1\). The duration of the growth period can be determined from Eq. (1) by replacing \(w_t\) with the specified target maturity weight (\(w_1\)) and \(T_f\) with t and the result is

$$\begin{aligned} T_f=-\frac{\ln {\Big [\frac{1}{\beta }\big (\frac{\alpha }{w_1}-1\big )}\Big ]}{\lambda }. \end{aligned}$$
(2)

Figure 2, a diagrammatic representation of the farmer’s live inventory profile over time, is used to evaluate the area under the farmer’s inventory system profile. This area represents the farmer’s average inventory level (in weight units). The area is evaluated as

$$\begin{aligned} \text {Area}_{f}=\int \limits _0^{T_f} \! n_pyw(t)\,\mathrm {}dt=n_py\bigg \{\alpha T_f+\frac{\alpha }{\lambda }\Big [\ln {\big (1+\beta e^{-\lambda T_f}\big )}-\ln {(1+\beta )}\Big ]\bigg \}. \end{aligned}$$
(3)

There is a cost associated with feeding the items (i.e the feeding cost) that the farmer incurs. The cyclic feeding cost incurred by the farmer, \(FC_f\), is computed as the product of the farmer’s average inventory level as determined in Eq. (3), the fraction of surviving items (x) and the farmer’s feeding cost per weight unit per unit time (\(c_f\)). Thus,

$$\begin{aligned} FC_f=c_fxn_py\bigg \{\alpha T_f+\frac{\alpha }{\lambda }\Big [\ln {\big (1+\beta e^{-\lambda T_f}\big )}-\ln {(1+\beta )}\Big ]\bigg \}. \end{aligned}$$
(4)
Fig. 2
figure 2

The farmer’s inventory system profile at the growing facility

In addition, the farmer incurs a cost associated with disposing the fraction of newborn items which do not survive until the end of the growing cycle. The farmer’s mortality cost per cycle, MC, is computed as the product of the farmer’s average inventory level, the fraction of items which do not not survive (\(1-x\)) and the mortality cost per weight unit per unit time (\(m_f\)). Thus,

$$\begin{aligned} MC_f=m_f(1-x)n_py\bigg \{\alpha T_f+\frac{\alpha }{\lambda }\Big [\ln {\big (1+\beta e^{-\lambda T_f}\big )}-\ln {(1+\beta )}\Big ]\bigg \}. \end{aligned}$$
(5)

The profit generated by the farmer per cycle, \(TP_f\), is calculated as the difference between their revenue and their total costs. This profit is given by

$$\begin{aligned} TP_f= & {} p_fn_pxyw_1-p_vn_pyw_0-K_f\nonumber \\{} & {} -n_py\bigg \{\alpha T_f+\frac{\alpha }{\lambda }\Big [\ln {\big (1+\beta e^{-\lambda T_f}\big )}-\ln {(1+\beta )}\Big ]\bigg \}\big [c_fx+m_f(1-x)\big ]. \end{aligned}$$
(6)

The first term in Eq. (6) represents the revenue generated by the farmer per cycle and it is computed as the product of the price that the farmer charges the processor for mature live inventory (\(p_f\)) and the quantity, in weight units, of live inventory that the farmer sells to the processor per cycle (\(n_pxyw_1\)). The next term is the farmer’s procurement cost per cycle and it is calculated by multiplying the procurement cost that the farmer gets charged for the newborn inventory (\(p_v\)) and the total weight of newborn inventory that the farmer procures per cycle (\(n_pyw_0\)). The third term is the fixed setup cost incurred at the beginning of each cycle for preparing the growing facility (\(K_f\)) while the last term represents the sum of the feeding costs and the mortality costs, as defined in Eqs. (4) and (5), respectively.

The duration of the farmer’s growing period is dependent on the specified maturity weight of the items. Since the farmer delivers a single shipment of live items to the processing facility per processing cycle, it is imperative that the two cycles (i.e. the farming and processing cycles) are synchronised for better planning. In order to ensure the proposed synchronisation, it is assumed that the farmer’s replenishment frequency is equal to that of the processor. Therefore, the farmer’ total profit per unit time, \(TPU_f\), is computed by dividing the farmer’s total profit per cycle, as given in Eq. (6), by the duration of the processor’s replenishment cycle (i.e. \(n_pT\)) and hence,

$$\begin{aligned} TPU_f= & {} \frac{p_fxyw_1}{T}-\frac{p_vyw_0}{T}-\frac{K_f}{n_pT}\nonumber \\{} & {} -\frac{y}{n_pT}\bigg \{\alpha T_f+\frac{\alpha }{\lambda }\Big [\ln {\big (1+\beta e^{-\lambda T_f}\big )}-\ln {(1+\beta )}\Big ]\bigg \}\big [c_fx+m_f(1-x)\big ]. \end{aligned}$$
(7)

4.2 Profit generated by the processor

The processor operates two facilities, namely, a processing facility and an inspection facility. The processing facility is used to transform the live mature inventory items (received from the farmer) into processed inventory suitable for consumption. Prior to delivering the processed inventory to the retailer who meets end consumer demand, the processor transfers the processed inventory from the processing plant to an inspection house where quality control takes place. In the inspection facility, good quality processed inventory is separated from processed inventory of poorer quality. However, some of the good quality processed inventory is mistakenly classified as poorer quality processed inventory and vice versa.

4.2.1 Costs incurred at the processing facility

The processor receives live inventory from the farmer weighing \(n_pQ_1=n_pxyw_1\) at the beginning of each cycle. The live inventory is converted into processed inventory at a rate of R weight units per unit time. The processor sends \(n_p\) equally-sized batches of processed inventory to the inspection facility during the course of a single processing cycle (of duration \(T_p\)). Given that the batches are of equal size, this means that each batch sent to the inspection facility weighs \(xyw_1\). A profile of the processor’s processed inventory level (in the processing facility) over time is depicted in Fig. 3a.

Fig. 3
figure 3

The inventory system for processor’s processing plant

The average inventory level in the processing facility is determined by evaluating the area under the inventory profile as depicted in Fig. 3a. Given the irregular shape of Fig. 3a, it suffices to redraw that figure into Fig. 3b which makes the computation of the area much easier. This method is adapted from Yang et al. (2007). The area under the inventory profile as depicted in Fig. 3b is thus evaluated as

$$\begin{aligned} \text {Area}_p= & {} \frac{n_pQ_1^2}{2R}+Q_1^2\bigg (\frac{1}{D}-\frac{1}{R}\bigg )+2Q_1^2 \bigg (\frac{1}{D}-\frac{1}{R}\bigg )+\cdots +(n_p-1)Q_1^2\bigg (\frac{1}{D}-\frac{1}{R}\bigg ) \nonumber \\= & {} \frac{{\big (n_pQ_1\big )}^2}{2R}+\frac{n_p(n_p-1){\big (n_pQ_1\big )}^2}{2} \bigg (\frac{1}{D}-\frac{1}{R}\bigg ) \nonumber \\= & {} \frac{{\big (n_pxyw_1\big )}^2}{2R}+\frac{n_p(n_p-1){\big (n_pxyw_1\big )}^2}{2} \bigg (\frac{1}{D}-\frac{1}{R}\bigg ). \end{aligned}$$
(8)

The total cost incurred by the processor at the processing facility per cycle is the sum of the purchasing, processing setup and holding costs per cycle, given by

$$\begin{aligned} TC_p=p_fn_pxyw_1+K_p+h_p\Bigg [\frac{{\big (n_pxyw_1\big )}^2}{2R} +\frac{n_p(n_p-1){\big (n_pxyw_1\big )}^2}{2}\bigg (\frac{1}{D}-\frac{1}{R}\bigg )\Bigg ]. \end{aligned}$$
(9)

The first term in Eq. (9) is the farmer’s purchasing cost per cycle and it is calculated by multiplying the price that the processor gets charged (by the farmer) for mature live inventory (\(p_f\)) and the quantity, in weight units, of live inventory that the processor procures (from the farmer) per cycle (\(n_pxyw_1\)). The second term in Eq. (9) is the fixed setup cost incurred by the processor for preparing the processing facility (\(K_p\)) at the start of each cycle. The last term in Eq. (9) represents the holding cost incurred at the processing facility per cycle and this cost is calculated as the product of the average processed inventory level, i.e. Eq. (8), and the cost of holding a single weight unit of processed inventory at the processing facility per unit time (\(h_p\)).

4.2.2 Costs incurred at the inspection facility

The processor sends \(n_p\) batches of processed inventory from the processing facility to the inspection warehouse during the course of a single processing run. This implies that the processor has \(n_p\) inspection runs per processing cycle. Each batch has a weight of \(Q_1=xyw_1\). The inventory system profile for the processed inventory at the inspection warehouse is depicted by Fig. 4. It is assumed that a certain fraction (a) of the processed inventory received from the processing plant is of poorer quality. This means that for every batch received from the processing facility (with a weight of \(xyw_1\)), the weight of poorer quality processed inventory is \(xyw_1a\) and the good quality processed inventory weighs \(xyw_1(1-a)\). For every inspection cycle, the entire lot received from the processing facility (i.e. \(xyw_1\)) is inspected in order to separate the processed inventory of good quality from that of poorer quality at a rate of z weight units per unit time. This implies that the duration of inspection period (i.e the time required to inspect the entire lot received) is

$$\begin{aligned} T_s=\frac{xyw_1}{z}. \end{aligned}$$
(10)

During the course of a single inspection run, the processor delivers an integer number (\(n_s\)) of batches of good quality processed inventory to the retailer at regular intervals of duration \(\tau \). Given that the duration of a single inspection run is \(T_s\), the duration of \(\tau \) is computed by dividing \(T_s\) by \(n_s\). Therefore,

$$\begin{aligned} \tau =\frac{xyw_1}{n_sz}. \end{aligned}$$
(11)
Fig. 4
figure 4

The processor’s inventory system profile at the inspection facility

In an idealistic situation with a perfect inspection process (i.e. all good quality processed inventory is separated from poorer quality processed inventory), the weights of the good and poorer quality processed inventory per inspection run would be given by \(xyw_1(1-a)\) and \(xyw_1a\), respectively. In most production systems, inspection processes are seldom perfect. To account for this, probabilities of erroneously classifying good and poorer quality items are incorporated. A type I error is committed when poorer quality processed inventory is classified as good quality processed inventory following the inspection process, while a type II error is committed if, at the end of inspection, good quality processed inventory is classified as poorer quality processed inventory. The probabilities of committing type I and type II errors are given by \(u_1\) and \(u_2\), respectively. This means that the probabilities of correctly classifying good and poorer quality processed inventory are \((1-u_1)\) and \((1-u_2)\), respectively. Hence, the inspection process can lead to four possible outcomes or scenarios. These are: Scenario 1 - good quality processed inventory is classified as good quality processed inventory; Scenario 2 - good quality processed inventory is classified as poorer quality processed inventory; Scenario 3 - poorer quality processed inventory is classified as good quality processed inventory; and Scenario 4 - poorer quality processed inventory is classified as poorer quality processed inventory. Figure 5 depicts the four probabilities associated with the four different scenarios.

Fig. 5
figure 5

The probabilities correlated with each of the four possible inspection scenarios

The weights of the processed inventory for each of the four scenarios are

$$\begin{aligned} \begin{aligned} \text {Scenario 1:}&\quad xyw_1(1-a)(1-u_1)\\ \text {Scenario 2:}&\quad xyw_1(1-a)u_1\\ \text {Scenario 3:}&\quad xyw_1au_2\\ \text {Scenario 4:}&\quad xyw_1a(1-u_2) \end{aligned} \end{aligned}$$

The sum of the weights in Scenarios 1 and 3 represents the weight of the processed inventory that is classified as being of good quality in each inspection run, with Scenario 1 being correctly classified and Scenario 3 being misclassified. From this sum, the processor delivers \(n_s\) shipments to the retailer at equally-spaced time intervals of \(\tau \). This means that the weight of each batch delivered to the retailer after \(\tau \) time units, is

$$\begin{aligned} s^{'}=\frac{xyw_1(1-a)(1-u_1)+xyw_1au_2}{n_s}. \end{aligned}$$
(12)

Likewise, the sum of the weights in Scenarios 2 and 4 represents the weight of the processed inventory that is classified as being of poor quality in each inspection run, with Scenario 2 being misclassified and Scenario 4 being correctly classified. The processor lets this inventory accumulate throughout the inspection run and sells it to secondary markets (at a discounted price) at the end of each inspection run. This means that every \(\tau \) time units, the processor allows

$$\begin{aligned} s^{''}=\frac{xyw_1(1-a)u_1+xyw_1a(1-u_2)}{n_s}, \end{aligned}$$
(13)

weight units of processed inventory classified as being of poorer quality to accumulate. At the end of each inspection run, \(n_s\) batches, each of size \(s^{''}\), would have accumulated and these are sold simultaneously as a single batch at a discounted price to secondary markets. This means that the weight of each batch sold by the processor to secondary markets at the end of each inspection run is \(xyw_1(1-a)u_1+xyw_1a(1-u_2)\).

The average inventory level of processed inventory in the inspection facility is used to compute the holding costs. The average inventory level is determined by evaluating the area under the processor’s inventory system profile at the screening facility, as depicted in Fig. 4. The area under Fig. 4 is given by

$$\begin{aligned} \text {Area}_{s}=\frac{x^2y^2w_1^2}{z}-\frac{\big [(n_s-1)x^2y^2w_1^2\big ]\big [(1-a)(1-u_1)+au_2\big ]}{2n_sz}. \end{aligned}$$
(14)

The total cost incurred by the processor in each inspection run , \(TC_s\), is comprised of the inspection facility setup, inspection and holding costs and it is given by

$$\begin{aligned} TC_s= & {} n_sK_s+vxyw_1+l_sxyw_1(1-a)u_1\nonumber \\{} & {} +h_s\bigg \{\frac{x^2y^2w_1^2}{z}-\frac{\big [(n_s-1)x^2y^2w_1^2\big ]\big [(1-a)(1-u_1) +au_2\big ]}{2n_sz}\bigg \}. \end{aligned}$$
(15)

The first term in Eq. (15) represents the inspection facility setup cost. This cost is included because it is assumed that the processor sends equally-sized batches of processed inventory classified as being of good quality to the retailer at time intervals of \(\tau \) during a single inspection run, while the retailer’s cycle time (defined at successive time intervals at which the retailer’s processed inventory level reaches zero) is T. The processor does not wait for the retailer’s inventory to reach zero before sending a batch of good quality processed inventory. The processor sends \(n_s\) batches during the retailer’s cycle time of T. After sending a batch to the retailer, the processor incurs a fixed cost of, \(K_s\), for setting up the inspection facility. This means that the inspection setup cost incurred during the course of a single inspection run is computed by multiplying the number of batches sent to the retailer during the retailer’s cycle time (\(n_s\)) and the fixed cost of setting up the inspection facility for a single batch (\(K_s\)). The second term in Eq. (15) represents the inspection cost per inspection run and it is computed as the product of the cost of inspecting a single weight unit of inventory (v) and the weight of the processed inventory inspected per inspection run (\(xyw_1\)). The third term in Eq. (15) is the cost of rejecting good quality processed inventory per inspection run. This cost is determined as the product of the cost of rejecting a single weight unit (\(l_s\)) and the weight of good quality processed inventory classified as poorer quality inventory [\(xyw_1(1-a)u_1\)]. The last term in Eq. (15) is simply the holding cost per inspection run and it is the product of the holding cost per weight unit in the inspection facility (\(h_s\)) and the average inventory level in the inspection facility as given in Eq. (14).

It should be noted that the total cost in Eq. (15) is the cost incurred per inspection run. Since the processor sends \(n_p\) batches of processed inventory from the processing plant to the inspection warehouse in each processing run, the total cost incurred at the inspection facility per processing run is thus

$$\begin{aligned} TC_s= & {} n_pn_sK_s+n_pvxyw_1+n_pl_sxyw_1(1-a)u_1\nonumber \\{} & {} +n_ph_s\bigg \{\frac{x^2y^2w_1^2}{z}-\frac{\big [(n_s-1)x^2y^2w_1^2\big ]\big [(1-a)(1-u_1)+au_2\big ]}{2n_sz}\bigg \}. \end{aligned}$$
(16)

4.2.3 Profit generated by the processor

During each processing setup, the processor generates revenue from the sale of both good and poorer quality processed inventory. The revenue is given by

$$\begin{aligned} TR_p&=n_pp_pxyw_1(1-a)(1-u_1)+n_pp_pxyw_1au_2\nonumber \\ {}&\quad +n_pp_qxyw_1(1-a)u_1+n_pp_qxyw_1a(1-u_2). \end{aligned}$$
(17)

The first two terms in Eq. (17) represent the revenue from sales of processed inventory classified as good quality following the inspection process. The weights of the processed inventory for these two terms correspond to Scenarios 1 and 3. Multiplying these weights [\(xyw_1(1-a)(1-u_1)\) and \(xyw_1au_2\), respectively] by the cost that the processor charges the retailer for each weight unit of processed inventory classified as good quality (\(p_p\)) yields the revenue from good quality inventory per inspection run. Since there are \(n_p\) inspection runs in each processing run, these terms are multiplied by the number of inspection runs (or batches of processed inventory sent from the processing facility to the inspection facility). The third and the fourth terms in Eq. (17) represent the revenue from sales of processed inventory classified as being of poorer quality following the inspection process. The revenue per processing run is determined using the weights of processed inventory in Scenarios 2 and 4 and the cost that the processor charges the secondary markets for each weight unit of processed inventory classified as poorer quality (\(p_q\)) inventory.

The processor’s total profit per cycle (i.e. \(TP_p\)) is equal to the processor’s total revenue per cycle, as given in Eq. (17), less the processor’s total costs per cycle, which is the sum of Eqs. (9) and (16), and thus,

$$\begin{aligned} TP_p&=n_pp_pxyw_1(1-a)(1-u_1)+n_pp_pxyw_1au_2+n_pp_qxyw_1(1-a)u_1\nonumber \\ {}&\quad +n_pp_qxyw_1a(1-u_2)p_fn_pxyw_1-K_p\nonumber \\&\quad -h_p\Bigg [\frac{{\big (n_pxyw_1\big )}^2}{2R}-\frac{n_p(n_p-1){\big (n_pxyw_1\big )}^2}{2} \bigg (\frac{1}{D}-\frac{1}{R}\bigg )\Bigg ]\nonumber \\ {}&\quad -n_pn_sK_s-n_pvxyw_1-n_pl_sxyw_1(1-a)u_1\nonumber \\ {}&\quad -n_ph_s\bigg \{\frac{x^2y^2w_1^2}{z}-\frac{\big [(n_s-1)x^2y^2w_1^2\big ] \big [(1-a)(1-u_1)+au_2\big ]}{2n_sz}\bigg \}. \end{aligned}$$
(18)

The processor’ total profit per unit time, \(TPU_p\), is computed by dividing the processor’s total profit per cycle, as given in Eq. (18), by the duration of the processor’s replenishment cycle (i.e. \(n_pT\)) and hence,

$$\begin{aligned} TPU_p&=\frac{p_pxyw_1(1-a)(1-u_1)}{T}+\frac{p_pxyw_1au_2}{T}+\frac{p_qxyw_1(1-a)u_1}{T}\nonumber \\&\quad +\frac{p_qxyw_1a(1-u_2)}{T}-\frac{p_fxyw_1}{T}-\frac{K_p}{n_pT}\nonumber \\&\quad -\frac{h_p}{n_pT}\Bigg [\frac{{\big (n_pxyw_1\big )}^2}{2R}+\frac{n_p(n_p-1){\big (n_pxyw_1\big )}^2}{2} \bigg (\frac{1}{D}-\frac{1}{R}\bigg )\Bigg ]-\frac{n_sK_s}{T}-\frac{vxyw_1}{T}\nonumber \\&\quad -\frac{l_sxyw_1(1-a)u_1}{T}\nonumber \\ {}&\quad -\frac{h_s}{T}\bigg \{\frac{x^2y^2w_1^2}{z}-\frac{\big [(n_s-1)x^2y^2w_1^2\big ] \big [(1-a)(1-u_1)+au_2\big ]}{2n_sz}\bigg \}. \end{aligned}$$
(19)

4.3 Profit generated by the retailer

The retailer receives batches of processed inventory classified as good quality inventory from the processor’s inspection facility every \(\tau \) time units, with the weight of each of batch received given in Eq. (12). The profile for the retailer’s processed inventory is depicted by Fig. 6. The retailer receives \(n_s\) batches of processed inventory during the course of a single replenishment cycle, defined at successive time intervals at which the retailer’s processed inventory level reaches zero, of duration T. This means that the weight of processed inventory received during the retailer’s replenishment cycle, \(b^{'}\), is determined by multiplying Eq. (12) by \(n_s\). Hence,

$$\begin{aligned} b^{'}=xyw_1(1-a)(1-u_1)+xyw_1au_2. \end{aligned}$$
(20)

All the processed inventory in Eq. (20) was classified as being of good quality through the inspection process. Because it is assumed that the processor’s inspection process is prone to errors, some of the processed inventory gets misclassified. As a result, some of the processed inventory used to fulfil end consumer demand throughout the retailer’s cycle T would be of poorer quality. It is implicitly assumed that consumers are capable of judging the quality of the processed inventory and if they receive poorer quality processed inventory, they return it to the retailer who replaces it with good quality processed inventory. The poorer quality processed inventory sold to consumers that is later returned to the retailer is shown as \(b^{''}\) in Fig. 6. \(b^{''}\) is essentially the portion of processed inventory in Eq. (20) that is incorrectly classified, and thus,

$$\begin{aligned} b^{''}=xyw_1au_2. \end{aligned}$$
(21)
Fig. 6
figure 6

The retailer’s inventory system profile at the retail/consumption facility

The incorrectly classified processed inventory is returned throughout T at a rate of \(xyw_1au_2/T\). In order to avoid shortages, it is assumed that the weight of the processed inventory received by the retailer is at least equal to the adjusted demand for good quality processed inventory. The adjusted demand is the sum of the weight of the actual demand for good quality processed inventory (i.e. DT) and the weight of inventory used to replace the poorer quality inventory that is returned from the market over the internal T (i.e. \(xyw_1au_2\)). Therefore,

$$\begin{aligned}{} & {} xyw_1(1-a)(1-u_1)+xyw_1au_2 \ge DT+xyw_1au_2\\{} & {} xyw_1(1-a)(1-u_1) \ge DT \end{aligned}$$

Hence, for the limiting case, the duration of the retailer’s cycle time can be computed as

$$\begin{aligned} T=\frac{xyw_1(1-a)(1-u_1)}{D} \end{aligned}$$
(22)

In order to determine the average inventory level at the retailer’s facility, which is used to compute the retailer’s holding cost, the area under the retailer’s inventory system profile as given in Fig. 6 is evaluated. Figure 6 is redrawn into Fig. 7 (without the returned poorer quality processed inventory) for ease of computation, a method first used by Konstantaras et al. (2007), and it follows that

$$\begin{aligned} \text {Area}_r&=\big [\text {Area of triangle DEF}\big ]-\Big [\frac{n_s(n_s-1)}{2} (\text {Area of parallelogram ABCD})\Big ]\nonumber \\&=\bigg [\frac{xyw_1(1-a)(1-u_1)T}{2}\bigg ]-\bigg [\frac{n_s(n_s-1)\tau s^{'}}{2}\bigg ]\nonumber \\&=\bigg [\frac{xyw_1(1-a)(1-u_1)T}{2}-\frac{(n_s-1)x^2y^2w_1^2(1-a)(1-u_1)}{2n_sz} \nonumber \\ {}&\quad -\frac{(n_s-1)x^2y^2w_1^2au_2}{2n_sz}\bigg ]. \end{aligned}$$
(23)
Fig. 7
figure 7

A redrawn version, adapted from Konstantaras et al. (2007) for ease of computation, of the retailer’s inventory system profile

The retailer has two revenue streams in each replenishment cycle. The first one is from the sales of good quality processed inventory that was correctly classified during the inspection process. The second revenue stream is from the sales of the poorer quality processed inventory that is returned from the market because it was incorrectly classified during the inspection process. It is assumed that the retailer offers customers a full refund if incorrectly classified processed inventory of poorer quality is sold to customer as good quality processed inventory and hence, the retailer does not generate any revenue for selling the misclassified inventory. The retailer’s revenue per cycle is thus

$$\begin{aligned} TR_r=p_rxyw_1(1-a)(1-u_1)+p_qxyw_1au_2. \end{aligned}$$
(24)

The first term in Eq. (24) is the revenue from sales of correctly classified processed inventory which is sold at a price of \(p_r\) while the second term represents revenue from the sales of returned poorer quality processed inventory which is sold to secondary markets as a single batch and at a discounted price of \(p_q\).

The retailer’s profit per cycle is the revenue from the two streams less the total costs (made up of the purchasing cost, the fixed ordering cost, the cost of accepting poorer quality inventory as good quality inventory and the holding cost), and hence,

$$\begin{aligned} TP_r&=p_rxyw_1(1-a)(1-u_1)+p_qxyw_1au_2-p_pxyw_1(1-a)(1-u_1)-p_pxyw_1au_2\nonumber \\&\quad -K_r-l_rxyw_1au_2 -h_r\bigg \{\frac{xyw_1(1-a)(1-u_1)T}{2}\nonumber \\&\quad -\frac{\big [(n_s-1)x^2y^2w_1^2\big ] \big [(1-a)(1-u_1)+au_2\big ]}{2n_sz}\bigg \} \end{aligned}$$
(25)

The first two terms in Eq. (25) represent the revenue from the two streams as computed in Eq. (24). The third and the fourth terms in Eq. (25) represent the purchasing cost which is determined by multiplying the weights of the processed inventory received from the processor (i.e. both the correctly classified inventory and the incorrectly classified inventory which are \(xyw_1(1-a)(1-u_1)\) and \(xyw_1au_2\), respectively) and the purchasing cost charged by the processor (\(p_p\)). The fifth term in Eq. (25) is simply the fixed cost of placing an order at the beginning of each replenishment cycle (\(K_r\)). The sixth term in Eq. (25) is the cost of accepting poorer quality processed inventory per cycle. This cost is determined as the product of the cost of accepting a single weight unit of poorer quality inventory (\(l_r\)) and the weight of poorer quality processed inventory classified as good quality inventory [\(xyw_1au_2\)]. The last term in Eq. (25) is simply the holding cost per cycle, and it is the product of the holding cost per weight unit in the retailer’s facility (\(h_r\)) and the average inventory level in the retail outlet as determined in Eq. (23).

The retailer’ total profit per unit time, \(TPU_r\), is computed by dividing the retailer’s total profit per cycle, as given in Eq. (25), by the duration of the retailer’s replenishment cycle (i.e. T) and thus,

$$\begin{aligned}&TPU_r =p_rD+\frac{p_qau_2D}{(1-a)(1-u_1)}-p_pD-\frac{p_pau_2D}{(1-a)(1-u_1)}\nonumber \\&\quad -\frac{K_rD}{xyw_1(1-a)(1-u_1)}-\frac{l_rau_2}{(1-a)(1-u_1)}\nonumber \\&\quad -h_r\bigg \{\frac{xyw_1(1-a)(1-u_1)}{2} -\frac{\big [(n_s-1)xyw_1D\big ] \big [(1-a)(1-u_1)+au_2\big ]}{2n_sz(1-a)(1-u_1)}\bigg \} \end{aligned}$$
(26)

4.4 Profit generated across the supply chain

The total supply chain profit per unit time, \(TPU_{sc}\), is determined by summing Eqs. (26), (19) and (7). Since it is assumed that the probabilities of survival (x), type I errors (\(u_1\)) and type II errors (\(u_2\)) and the fraction of poorer quality processed inventory (a) are random variables with known probability density functions, given by f(x), \(f(u_1)\), \(f(u_2)\) and f(a), respectively, the expected value of the supply chain profit is defined as \(E[TPU_{sc}]\). The proposed four-echelon supply chain model can be represented by the following profit maximisation problem

$$\begin{aligned} \text {Maximise:}\quad E[TPU_{sc}]&=p_rD+\frac{p_qE[a]E[u_2]D}{E[1-a]E[1-u_1]}+\frac{p_qE[u_1]D}{E[1-u_1]}+\frac{p_qE[a]E[1-u_2]D}{E[1-a]E[1-u_1]}\nonumber \\&\quad -\frac{K_rD}{E[x]yw_1E[1-a]E[1-u_1]}-\frac{l_rE[a]E[u_2]}{E[1-a]E[1-u_1]}\nonumber \\&\quad -\frac{h_rD}{E[1-a]E[1-u_1]}\bigg \{\frac{E[x]yw_1}{2}\nonumber \\&\quad -\frac{\big \{(n_s-1)E[x]yw_1D\big \}\big \{E[1-a]E[1-u_1]+E[a]E[u_2]\big \}}{2n_sz}\bigg \}\nonumber \\&\quad -\frac{K_pD}{n_pE[x]yw_1E[1-a]E[1-u_1]}-\frac{n_sK_sD}{E[x]yw_1E[1-a]E[1-u_1]}\nonumber \\&\quad -\frac{h_pD}{E[1-a]E[1-u_1]}\Bigg \{\frac{n_pE[x]yw_1}{2R}+\frac{n_p(n_p-1)n_pE[x]yw_1}{2}\bigg (\frac{1}{D}-\frac{1}{R}\bigg )\Bigg \}\nonumber \\&\quad -\frac{h_sD}{E[1-a]E[1-u_1]}\bigg \{\frac{E[x]yw_1}{z}\nonumber \\&\quad -\frac{\big \{(n_s-1)E[x]yw_1D\big \}\big \{E[1-a]E[1-u_1]+E[a]E[u_2]\big \}}{2n_szE[1-a]E[1-u_1]}\bigg \}\nonumber \\&\quad -\frac{l_sE[u_1]D}{E[1-u_1]}-\frac{vD}{E[1-a]E[1-u_1]}-\frac{K_fD}{n_pE[x]yw_1E[1-a]E[1-u_1]}\nonumber \\&\quad -\frac{\big \{c_fE[x]+m_fE[1-x]\big \}D}{n_pE[x]w_1E[1-a]E[1-u_1]}\bigg \{\alpha T_f+\frac{\alpha }{\lambda }\Big [\ln {\big (1+\beta e^{-\lambda T_f}\big )}-\ln {(1+\beta )}\Big ]\bigg \}\nonumber \\&\quad -\frac{p_vw_0D}{E[x]w_1E[1-a]E[1-u_1]}\nonumber \\&\qquad \text {subject to:}\quad n_p\in \mathbb {Z},\quad n_s\in \mathbb {Z},\quad T_f\le n_pT. \end{aligned}$$
(27)

The tractability of the proposed inventory system is dependent on the imposition of two constraints while the feasibility of the system is dependent on the imposition of an additional constraint. The two constraints that ensure the tractability are that the number of shipments of processed inventory transferred from the processing facility to the inspection facility per processing cycle and the number of shipments of good quality processed inventory (as classified by the inspection process which is prone to errors) delivered from the inspection facility to the retail facility per inspection cycle should be integers (i.e. \(n_p, n_s\in \mathbb {Z}\)). These two constraints make the solution procedure tractable. The third constraint, which ensures the feasibility of the solution obtained, is that the duration of the farmer’s growth period should be less than or equal to the duration of the processor’s cycle time (i.e. \(T_f\le n_pT\)). Feasibility is ensured by guaranteeing that the live items have reached the maturity weight at the start of the processing cycle, which means that the grown items will be ready for processing at the beginning of the new production cycle.

The retailer’s lot size (y) is determined by setting the first derivative of \(E[TPU_{sc}]\), as given in Eq. (27), with respect to y to zero and solving for y and the result is

$$\begin{aligned} y=\sqrt{\frac{2D\Big (K_r+\frac{K_p}{n_p}+n_sK_s+\frac{K_f}{n_p}\Big )}{\Big [h_r(\gamma _1) +h_p(\gamma _2)+h_s(\gamma _3)\Big ]E[x^2]w_1^2}}, \end{aligned}$$
(28)

where

$$\begin{aligned} \gamma _1= & {} E{[1-a]}^2E{[1-u_1]}^2-\frac{\big [(n_s-1)D\big ]\big \{E[1-a]E[1-u_1]+E[a]E[u_2]\big \}}{n_sz},\\ \gamma _2= & {} n_p\Bigg [\frac{D}{R}+(n_p-1)\bigg (\frac{1}{D}-\frac{1}{R}\bigg )\Bigg ], \end{aligned}$$

and

$$\begin{aligned} \gamma _3=\frac{2D}{z}-\frac{\big [(n_s-1)D\big ]\big \{E[1-a]E[1-u_1]+E[a]E[u_2]\big \}}{n_sz}. \end{aligned}$$

4.5 Optimisation and solution procedure

The proposed four-echelon supply chain model is optimised under the assumption that the supply chain is centralised. This implies that ordering and shipment decisions are made with the aim of maximising the entire supply chain’s profit (as opposed to optimising the individual echelon profits). An iterative procedure is used to compute the optimal values of y, \(n_p\) and \(n_s\) that maximise \(E[TPU_{sc}]\). The procedure is made up of two sub-routines, namely Sub-routines 1 and 2. Sub-routine 1 is aimed at finding the optimal value of \(n_p\) while Sub-routine is aimed at optimising y and \(n_s\). The procedure is based on \(E[TPU_{sc}]\) being a concave function of y, \(n_p\) and \(n_s\), with a proof provided in Appendix A. The procedure is as follows:

Sub-routine 1:

Set \(n_s\) to 1.

1.1:

Set \(n_p\) to 1.

1.2:

Compute the values of y and \(E[TPU_{sc}]\) using Eqs. (28) and (27), respectively.

1.3:

Increase \(n_p\) by 1 and values of y and \(E[TPU_{sc}]\) using Eqs. (28) and (27), respectively. Carry on to 1.4.

1.4:

If the latest value of \(E[TPU_{sc}]\) increases, go back to 1.3. If the value of \(E[TPU_{sc}]\) decreases, then the previously calculated value of \(E[TPU_{sc}\) (along with corresponding y and \(n_p\) values) is the best solution so far and if this is the case, carry on to Sub-routine 2. The corresponding \(n_p\) value is the optimal value.

Sub-routine 2:

Set \(n_s\) to 2.

2.1:

Compute the values of y and \(E[TPU_{sc}]\) using Eqs. (28) and (27), respectively.

2.2:

Increase \(n_s\) by 1 and calculate the values of y and \(E[TPU_{sc}]\) using Eqs. (28) and (27), respectively. Carry on to 2.3.

2.3:

If the latest value of \(E[TPU_{sc}]\) increases, go back to 2.2. If the value of \(E[TPU_{sc}]\) decreases, then the previously calculated value of \(E[TPU_{sc}\) (along with corresponding y and \(n_s\) values) is the best solution so far and if this is the case, carry on to 2.4.

2.4:

Verify the solution’s feasibility with regard to the feasibility constraint \(T_f\le n_pT\). If the solution is feasible, those values of y and \(n_s\) are optimal and if this is the case, carry on to 2.6. If the solution is not feasible, carry on to 2.5.

2.5:

If the constraint is violated, set T to \(T_f/n_p\) and use that T value to calculate new y and \(E[TCU_{sc}]\) values using Eqs. (22) and (27), respectively, and then carry on to 2.6.

2.6:

End.

5 Special case

A special case of the proposed inventory system is derived by considering a situation where:

  • The inspection process is 100% effective at separating the good quality processed inventory from that of poorer quality (in other words, the probabilities of committing type I and type II errors are zero, i.e. \(u_1=0\) and \(u_2=0\)).

  • The processor sends a single batch of processed inventory from the processing facility to the inspection facility per processing cycle (instead of multiple batches, i.e. \(n_p=1\)).

For this special case, the retailer’s lot size becomes

$$\begin{aligned} y=\sqrt{\frac{2D\Big (K_r+K_p+n_sK_s+K_f\Big )}{\bigg \{h_r\Big [E[1-a]^2 -\frac{(n_s-1)DE[1-a]}{n_sz}\Big ]+h_p\Big (\frac{D}{R}\Big )+h_s\Big [\frac{2D}{z} -\frac{(n_s-1)DE[1-a]}{n_sz}\Big ]\bigg \}E[x^2]w_1^2}}.\nonumber \\ \end{aligned}$$
(29)

The result in Eq. (29) is the same as that from Sebatjane and Adetunji Sebatjane and Adetunji (2020a). In that particular model, the authors optimised inventory replenishment decisions in a four-level supply chain for growing items with imperfect quality under the assumption that the processor delivers one batch of processed inventory to the inspection warehouse and that the inspection process is not prone to errors (i.e. inspection is perfect).

6 Numerical results

6.1 Base example

As a way of demonstrating the potential practical applications of the proposed inventory management policy, an example considering the entire mutton production value chain with a farming facility, a processing facility, an inspection facility and a retail facility is solved. The retailer meets the consumer demand for good quality processed mutton. The example considers the following input parameters:D=250 kg/week; R=300 kg/week; \(w_0\)= 8.5 kg; \(w_1\)=30 kg; \(K_r\)=2 500 ZAR; \(h_r\)=1 ZAR/kg/week; \(p_r\)=60 ZAR/kg; \(l_r\)=500 ZAR/kg; \(K_p\)=20 000 ZAR; \(h_p\)=0.2 ZAR/kg/week; \(p_p\)=55 ZAR/kg; \(K_s\)=10 000 ZAR; \(h_s\)=0.25 ZAR/kg/week; \(p_q\)=20 ZAR/kg; v=0.5 ZAR/kg; z=1 000 kg/week; \(l_s\)=200 ZAR/kg; \(K_f\)=30 000 ZAR; \(p_f\)=15 ZAR/kg; \(c_f\)=0.1 ZAR/kg/week; \(m_f\)=0.2 ZAR/kg/week; \(p_v\)=5 ZAR/kg; \(\alpha \)=51 kg; \(\beta \)=5; \(\lambda \)=0.12 /week. x, \(u_1\), \(u_2\) and a are assumed to be random variables uniformly distributed over [0.8, 1], [0, 0.05], [0, 0.05] and [0, 0.05], respectively. Their probability density functions are given by

$$\begin{aligned} f(x)= & {} {\left\{ \begin{array}{ll} 5, &{} 0.8\le x \le 1\\ 1, &{} \text {otherwise}. \end{array}\right. }\\ f(a)= & {} {\left\{ \begin{array}{ll} 32, &{} 0\le a \le 0.05\\ 0, &{} \text {otherwise}. \end{array}\right. }\\ f(u_1)= & {} {\left\{ \begin{array}{ll} 32, &{} 0\le u_1 \le 0.05\\ 0, &{} \text {otherwise}. \end{array}\right. }\\ f(u_2)= & {} {\left\{ \begin{array}{ll} 32, &{} 0\le u_2 \le 0.05\\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

This implies that

$$\begin{aligned} E[x]=\int \limits _{0.8}^{1}5x\quad dx=5\bigg [\frac{(1^2-0.8^2)}{2}\bigg ]=0.9 \end{aligned}$$

Likewise,

$$\begin{aligned} E[a]=E[u_1]=E[u_2]=32\bigg [\frac{(0.05^2-0^2)}{2}\bigg ]=0.04 \end{aligned}$$

The results from the example, solved using the Microsoft Excel add-in Solver, are presented in Table 2. From the results, in order to maximise the expected total supply chain profit, the farmer should place an order for (\(n_py\approx \)) 297 live newborn lambs at the beginning of each growing cycle. The total weight of the live newborn inventory items (\(n_pQ_0=n_pyw_0\)) would be roughly 2 527 kg at the time of purchase. Once items mature (i.e. the weight of each item reaches \(w_1=\) 30 kg), the farmer should ship them to the processor for processing and inspection. About (\(E[x]=\)) 90% of the initially ordered orders survive until the end of the growth cycle. This means that by the time the farmer ships the items to the processing facility, the total weight of the live inventory (\(n_pQ_1=n_pxyw_1\)) would be roughly 8 028 kg. After the entire lot is processed, the processor transfers it to the inspection facility, in (\(n_p\)=) 2 batches per processing cycle, where the processed inventory is inspected for quality and separated into good and poorer quality classes. Throughout the inspection process, the processor should deliver (\(n_s\)=) 2 batches of good quality inventory from the inspection facility to the retail facility, each weighing (\(s^{'}\)=) 1 853 kg. The poorer quality processed inventory in each processing cycle (\(n_ss^{''}\)) amounts to 308 kg, with \(s^{''}\approx \) 154 kg being accumulated in each inspection cycle. The processor should deliver good quality processed inventory from the inspection facility to the retailer every \(\tau \)= 2.01 weeks. The retailer’s inventory level will reach zero every (T=) 14.79 weeks. If this order replenishment and shipment policy is followed, the supply chain should expect to make a profit of about (\(E[TPU_{sc}]=\)) 19 312.60 ZAR/week.

Table 2 Optimal results from the numerical example

6.2 Centralised versus decentralised supply chain structures

The proposed model was solved under the assumption that all members of the supply chain cooperate in an effort to maximise the supply chain’s profit, with the results provided in Table 2. In other words, a centralised optimisation approach was followed. In general, centralised supply chain structures perform better (in terms of profit or cost optimisation) than their decentralised counterparts.

Despite the superior performance of centralised supply chains, it’s still possible for decentralised supply chains to be beneficial to certain individual supply chain members. This implies that some supply chain members might optimise their individual profits at the expense of the entire supply chain’s profit. To discourage this, it might be beneficial to introduce profit-sharing agreements designed to incentivise individual supply chain members to work together and optimise the entire supply chain’s profit.

6.2.1 Decentralised supply chain

Under a decentralised supply chain structure, each member of the supply chain acts individually in order to maximise their own profit. For the decentralised structure, by virtue of the retailer responding directly to customer demand for good quality processed inventory, it is assumed that the retailer is the leader of the supply chain, with the processor and the farmer being followers. The retailer, as the leader, determines optimal values of y and \(n_s\) that maximise Eq. (26). These optimal values are then passed on to the followers (i.e. the processor and the farmer). The processor then uses these optimal y and \(n_s\) values, along with a newly determined optimal value of \(n_p\), to maximise Eq. (19). Finally, the farmer uses these optimal values to maximise Eq. (7). Table 3 represents shows the individual profits that each supply chain should expect to make when following a decentralised policy.

Table 3 Profits realised by each supply chain member and the entire supply chain under a decentralised chain structure

6.2.2 Centralised supply chain with a profit-sharing agreement

The supply chain profit generated under a decentralised policy is less than that generated under a centralised policy (15,240.96 vs 19,312.60 ZAR/week). However, this will not deter some members of the supply chain to work individually (i.e. under a decentralised policy) because their individual profits might decrease under a centralised policy despite the profit for entire supply chain being higher. Hence, a profit-sharing agreement is introduced to encourage all supply chain members to work together under a centralised policy. Under this agreement, the centralised supply chain’s profit is divided among all the supply chain members according to percentage contributions made by each member to the decentralised supply chain profit. In order words, profit-sharing ratios for the retailer (\(\mu _r\)), the processor (\(\mu _p\)) and the farmer (\(\mu _f\)) are defined as

$$\begin{aligned} \mu _r= & {} \frac{E[TPU_{r,dec}^*]}{E[TPU_{sc,dec}^*]},\\ \mu _p= & {} \frac{E[TPU_{p,dec}^*]}{E[TPU_{sc,dec}^*]},\\ \mu _f= & {} \frac{E[TPU_{f,dec}^*]}{E[TPU_{sc,dec}^*]}, \end{aligned}$$

where \(E[TPU_{r,dec}^*]\), \(E[TPU_{p,dec}^*]\), \(E[TPU_{f,dec}^*]\) and \(E[TPU_{f,dec}^*]\) represent the expected optimal profit for the retailer, the processor, the farmer and the entire supply chain, respectively, under the decentralised supply chain policy.

The profit-sharing ratios are then used to divide the centralised supply chain profit proportionally and the results are presented in Table 4. From the results, it is evident that not only is the profit for the entire supply chain higher for the centralised supply chain structure but the individual profit generated by each supply chain member under a centralised chain structure with a profit-sharing agreement is higher than the profit for the decentralised structure and hence, all the supply chain members are incentivised to participate in the centralised policy.

Table 4 Profits realised by each supply chain member and the entire supply chain under a centralised chain structure with a profit-sharing agreement

6.3 Sensitivity analysis and managerial insights

Owing to sensitivity analyses being performed on most of the input parameters in previous studies, a sensitivity analysis was done on only a selection of the input parameters in the current study, particularly, parameters that are unique to the current study. The impact of changes to these input parameters were tested through a sensitivity analysis, whose results are presented in Table 5. The following observations from the analysis were notable:

  • The retailer’s optimal lot size (\(y^*\)) is most sensitive to E[x]. A 50% decrease in E[x] result in a 100% increase in \(y^*\). If an increasing number of items do not survive during the farmer’s growth period, then more items would need to be ordered in order to meet the specified demand. Changes to all the other input parameters apart from \(E[u_2]\) had minimal effects on \(y^*\). All the changes to \(E[u_2]\) values tested had no effect on \(y^*\).

  • The optimal number of shipment transferred from the processing facility to the inspection facility (\(n_p^*\)) and the optimal number of shipments of good quality processed inventory delivered from the inspection facility to the retail facility (\(n_s^*\)) remained the same when testing \(E[u_2]\), but these changed when \(E[u_1]\), E[a] and E[x] were tested. All changes were quite minimal and limited to 50%.

  • The expected value of the optimal total supply chain profit, \(E[TPU_{sc}^*]\), was affected by changes to all the input parameters. However, the severity of the impact was different across the parameters. \(E[u_1]\) had the greatest effect while E[a] had the least. A 50% decrease in \(E[u_1]\) and E[a] resulted in a 5.4% increase in \(E[TPU_{sc}^*]\) and a 0.1% decrease in \(E[TPU_{sc}^*]\), respectively. Moreover, changes to \(E[u_1]\) had no effect on \(E[TPU_{sc}^*]\).

Table 5 Sensitivity analysis of select input parameters

The sensitivity analysis provided some interesting results, particularly when the type I and II error probabilities and survival rates were changed. These specific results provide operations and supply chain management practitioners with some insights that can be used to better manage inventory in multi-echelon supply chains for growing items with quality inspection errors. Some of these managerial insights include:

  • Fig. 8 depicts the impact of inspection errors on the expected total profit generated across the supply chain. The impact of incorrectly classifying poorer quality processed inventory as good quality inventory (i.e. type I error) on the profit is severely negative. As the probability of committing a type I error increases, the supply chain profit decreases significantly. On the other hand, the impact of incorrectly classifying good quality processed inventory as poorer quality inventory (i.e. type II error) is negligible. This observation is most likely to the fact that if a type I error is committed, then the incorrectly classified inventory sold to customers has to be returned and replaced with good quality inventory and consequently, additional costs are incurred. In practical terms, managers can take advantage of this observation to improve their operations by utilising statistical quality control tools aimed primarily at improving lot disposition decisions such as acceptance sampling.

  • Fig. 9 shows the financial repercussions of improving the survival rate of the items. Evidently, as the survival rate of the items increases, so does the expected supply chain profit. In practical terms, managers can improve survival rates by investing in vaccination programmes that will ensure that the items are protected from various illnesses and thus, improving their chances of survival throughout the growing period. Moreover, survival rates can be improved by feeding the items with more nutritious feed material.

Fig. 8
figure 8

Effect of the type I and type II inspection errors on the supply chain profit

Fig. 9
figure 9

Effect of the survival rate on the supply chain profit

7 Concluding remarks

Food production operations are complex industrial systems that involve multiple entities and processes. The entities involved range from farmers at the upstream end of the supply chain, who are responsible for rearing live items; to processors, who not only process the live items into a form that is suitable for consumption but also inspect the items for quality; and finally to retailers at the downstream end of the supply chain, who are responsible for selling the consumable food products to end consumers. Quality inspection is one of the most important processes in food production systems because consumer health is at stake. However, inspection processes are not perfect and are prone to errors. If these errors are not minimised, the repercussions are not only costly, in terms of liability and lost business, but they also place consumers’ health at risk.

This study formulated an inventory model for a multi-echelon supply chain for growing items with imperfect quality and the possibility of committing errors while inspecting the items for quality. The financial impact of committing inspection errors is quantified through numerical results. Even when the probability of committing such errors is small (i.e. for instance, 4% as is the case in the numerical example, the impact on the supply chain profit is quite sizeable. Consequently, small changes to these probabilities may lead to significant shifts in the supply chain profit. Production managers should aim to keep these errors to a minimum, not only for the sake of maximising profits, but also for protecting the health of consumers. In addition, the numerical results also demonstrated the benefits of a centralised supply chain with a profit-sharing agreement which was shown to perform better (i.e. leading to higher total profits generated across the supply chain) when compared to a decentralised supply chain.

The proposed model can be developed further in several ways. For instance, the effects of learning on both processing and inspection operations can be incorporated. Additionally, the effectiveness of adopting different shipment policies, such as power-of-two policies instead of the integer shipment policy, can be explored. The deterministic demand assumption is not realistic and thus, stochastic demand patterns represent another potential area for further exploration.