Next Article in Journal
A Banach Space Leap: Contraction Mapping Solutions for Stochastic Delay Systems
Previous Article in Journal
Extremely Optimal Graph Research for Network Reliability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Statistical–Metaheuristic Inventory Modeling: Integrating SARIMAX with Skew-Normal and Zero-Inflated Errors in Clinical Laboratory Demand Forecasting

1
Escuela de Química y Farmacia, Facultad de Farmacia, Universidad de Valparaíso, Gran Bretaña 1093, Valparaíso 2340000, Chile
2
Laboratorio Clínico, Hospital Claudio Vicuña, San Antonio 2206160, Chile
*
Author to whom correspondence should be addressed.
Mathematics 2025, 13(18), 3001; https://doi.org/10.3390/math13183001
Submission received: 21 August 2025 / Revised: 7 September 2025 / Accepted: 12 September 2025 / Published: 17 September 2025

Abstract

Clinical laboratories require accurate forecasting and efficient inventory management to balance service quality and cost under uncertain demand. In this study, we propose a hybrid forecasting–optimization framework tailored to hospital clinical determinations with highly irregular, zero-inflated, and asymmetric consumption patterns. Demand series for 34 items were modeled using Seasonal AutoRegressive Integrated Moving Average with eXogenous regressors (SARIMAX) structures combined with skew-normal (SN) and zero-inflated skew-normal (ZISN) residuals, with residual centering, truncation, and lambda regularization applied to ensure stable estimation. Model performance was benchmarked against Gaussian SARIMA and non-linear MLP forecasts. The SN/ZISN models achieved improved forecasting accuracy while preserving interpretability and explainability of residual behavior. Forecast outputs were integrated into a Particle Swarm Optimization (PSO) layer to determine cost-minimizing order quantities subject to packaging and budget constraints. The proposed end-to-end framework demonstrated a potential 89% reduction in inventory costs relative to the hospital’s historical policy while maintaining service levels above 85% for high-volume determinations. This hybrid approach provides a transparent, domain-adapted decision support system for supply chain governance in healthcare settings. Beyond the specific case of Chilean hospitals, the framework is adaptable to broader healthcare supply chains, supporting generalizable applications in diverse institutional contexts.

1. Introduction

Clinical laboratories are essential to public health [1], supporting medical diagnosis as well as clinical and pharmacological monitoring—core functions that ensure quality healthcare delivery and effective disease control. However, monthly demand for diagnostic analytes is highly uncertain and often follows cyclic, seasonal, and intermittent patterns [2]. These challenges are further intensified in public sector settings, where procurement cycles are lengthy, budgets are inflexible, and packaging regulations limit supply responsiveness.
This context highlights a critical operational problem: laboratories face recurrent shortages or overstocking of reagents due to demand uncertainty and rigid procurement constraints [3]. Efficient forecasting and inventory control are therefore indispensable to balance service continuity with cost containment [4].
Time series models such as ARIMA and SARIMAX are commonly used for demand forecasting in healthcare and logistics [5]. Nevertheless, these models typically assume homoscedastic and symmetric Gaussian residuals. This assumption is often violated in clinical demand series, which exhibit non-normal behaviors such as skewness, high variance, and zero inflation due to sporadic usage patterns [6]. To address this, the use of skew-normal distributions has been proposed to capture residual asymmetry [7], while zero-inflated variants help account for excess zero observations [8]. However, even the most accurate forecasts need to be operationalized into ordering policies that comply with real procurement constraints. This motivates the integration of statistical models with optimization techniques, ensuring that forecast outputs translate into practical inventory decisions.
In this context, metaheuristic optimization techniques such as Particle Swarm Optimization (PSO), Genetic Algorithms (GAs), and Ant Colony Optimization (ACO) offer flexible strategies for solving non-linear and constrained inventory problems [9]. These methods support adaptive parameter tuning and are well suited for multi-stage stochastic planning environments [10]. However, they are rarely integrated with domain-specific statistical models for forecast-driven inventory control in clinical applications. Some attempts exist, such as the use of metaheuristics to improve pharmaceutical supply chains during health crises [11] or stochastic programming combined with forecasting approaches in capacity expansion planning [10]. Similarly, hybrid forecasting–inventory models have been applied to account for reliability and seasonality in supply chains [4]. However, these studies typically rely on simplified demand assumptions and do not incorporate residual asymmetry or zero inflation, underscoring the novelty of our proposed framework.
Taken together, these limitations define the research gap: current studies rarely offer integrated frameworks that combine the following (i) skew-aware and zero-sensitive statistical forecasting, (ii) domain-specific optimization under procurement constraints, and (iii) explainable modeling that connects statistical residuals to operational decisions. As a result, transferability of insights into real clinical laboratories remains limited.
Recent interest in explainable artificial intelligence (XAI) highlights the need for transparency in hybrid modeling approaches [12]. While deep learning models can offer high predictive accuracy, their black-box nature limits their interpretability in high-stakes domains like healthcare. In contrast, SARIMAX models with structured, non-Gaussian residuals can provide both interpretability and performance [13].
The novelty of our contribution lies in bridging this gap through the following three contributions:
  • Extending SARIMAX models with skew-normal and zero-inflated skew-normal residuals, providing skew-aware and zero-sensitive statistical forecasting.
  • Embedding these forecasts into a PSO-based optimization layer to generate cost-minimizing and constraint-feasible inventory decisions.
  • Validating the proposed hybrid framework in a clinical laboratory setting, explicitly incorporating institutional constraints such as packaging formats and fixed procurement budgets.
In line with recent advances in hybrid modeling [14], our study connects statistical forecasting with optimization techniques. For example, Chechkin et al. (2025) proposed a hybrid KAN-BiLSTM Transformer with multi-domain dynamic attention to enhance cybersecurity predictions [15]. Similar to our work, their approach integrates multiple architectures to improve interpretability and mitigate risks in critical domains. This reinforces the relevance of combining SARIMAX with asymmetric and zero-inflated errors, together with PSO, to address challenges in medical supply inventory forecasting.
For clarity, the detailed discussion of related systems and previous works will be referred to in the following Related Work subsection, focusing now on three key aspects: (i) defining the real challenges faced by clinical laboratories, (ii) describing our hybrid SARIMAX-PSO framework in a simple way, and (iii) highlighting the originality and contributions of this study.

Related Work

A number of studies have explored demand forecasting and inventory optimization in healthcare and related domains. Traditional statistical models (e.g., ARIMA, SARIMA) have been widely applied but often assume Gaussian residuals, which limit their ability to capture skewness and zero inflation. Machine learning models (e.g., neural networks, LSTMs) provide flexibility but suffer from limited interpretability in high-stakes clinical contexts. Metaheuristic approaches such as PSO, GA, and ACO have been employed for inventory control and pharmaceutical logistics, yet they are rarely integrated with domain-specific forecasting models. Table 1 summarizes representative prior works, their methodological approaches, and key limitations. Compared to this existing body of research, our contribution explicitly bridges three dimensions that remain largely unaddressed: (i) the extension of SARIMAX models with skew-normal and zero-inflated residuals to handle asymmetric and intermittent clinical demand; (ii) the embedding of these forecasts into a metaheuristic optimization layer (PSO) that respects real procurement constraints such as budgets and packaging multiples; and (iii) the provision of an explainable and transparent workflow that directly links statistical residuals with operational decisions. This hybrid framework therefore advances beyond prior work by combining skew-aware forecasting with constraint-feasible inventory optimization in a healthcare setting.
As shown in Table 1, previous studies emphasize either forecasting without optimization or optimization without domain-specific residual structures. None combine skew-aware and zero-sensitive statistical modeling with metaheuristic optimization under real procurement constraints, which defines the novelty of the present work.
The remainder of this paper is structured as follows. Section 2 presents the methodology, including data description, forecasting model specification, residual diagnostics, and the optimization strategy using PSO. Section 3 reports the main results, focusing on forecast accuracy, residual characteristics, and inventory cost savings. Section 4 discusses the implications of the findings in terms of explainability and operational value. Finally, Section 5 concludes with a summary of contributions and suggestions for future research.

2. Methodology

This section describes the modeling and optimization framework used in this study, organized in four sequential stages: (i) forecasting models, (ii) optimization phase (global PSO), (iii) reproducible workflow and algorithmic steps, and (iv) performance metrics.

2.1. Forecasting Models

To model the irregular and asymmetric nature of clinical laboratory reagent demand, we implemented SARIMAX models with structured residuals:
  • Skew-normal (SN) residuals, capturing asymmetry;
  • Zero-inflated skew-normal (ZISN) residuals, capturing both asymmetry and excess zeros.
The general SARIMAX model is defined as in Equation (1):
Y t = X t β + Z t γ + ε t
where
-
Y t is the observed demand at time t;
-
X t are exogenous regressors (e.g., calendar month dummies);
-
Z t captures autoregressive and moving average components;
-
β , γ are the associated parameter vectors;
-
ε t is the residual term.
We consider two specifications for ε t :
  • ε t SN ( μ t , σ 2 , λ ) : Skew-normal distribution with location μ t , scale σ , and skewness λ .
  • ε t ZISN ( μ t , σ 2 , λ , p ) : Zero-inflated skew-normal distribution, combining a point mass at zero with a skew-normal component.
The skew-normal (SN) density is expressed in Equation (2):
f SN ( ε ) = 2 σ ϕ ε μ σ Φ λ · ε μ σ
where ε denotes the residual term, μ the location parameter, σ the scale parameter, and λ the skewness parameter. Here, ϕ ( · ) and Φ ( · ) represent the standard normal probability density function (PDF) and cumulative distribution function (CDF), respectively.
The zero-inflated skew-normal density is then defined in Equation (3):
f ZISN ( ε ) = p · δ 0 ( ε ) + ( 1 p ) · f SN ( ε )
where δ 0 ( ε ) is the Dirac delta at zero and p [ 0 , 1 ] is the zero-inflation probability.
Parameter estimation proceeds in two stages:
  • Maximum Likelihood Estimation (MLE) of the SARIMAX baseline parameters ( β , γ ).
  • Expectation-Maximization (EM) algorithm for structured residual parameters λ and p in the SN/ZISN models, following the approach described in [6].
In line with our previous work [6], we expanded the description of the zero-inflated skew-normal (ZISN) residuals. Specifically, the residual structure is defined by a two-part process: (i) a logistic component that models the probability of excess zeros, and (ii) a skew-normal component that accounts for asymmetry in the non-zero demand. These assumptions allow the residual model to properly handle both structural zeros and skewness.
Formally, the residual distribution is expressed as a mixture in Equation (4):
f ( y t ) = π t · 1 { y t = 0 } + ( 1 π t ) · f SN ( y t ξ , ω , α ) ,
where π t represents the probability of structural zeros and f SN is the skew-normal density with location ξ , scale ω , and shape α . This formulation ensures that both zero inflation and asymmetry are consistently incorporated into the residual process. Equation (4) explicitly defines the ZISN distribution used in our residual modeling.

Illustrative Example

Consider a reagent with 30% zero observations in the training dataset. The logistic component of the ZISN residual assigns a probability π t 0.30 to structural zeros, indicating that nearly one-third of the observed zeros are not random but systematic (e.g., due to clinical protocols or supply pauses). For the remaining 70% of cases, the skew-normal component f S N ( · | ξ , ω , α ) captures the asymmetric distribution of positive demand values. In practice, this means that when the model encounters a zero observation, it first evaluates whether it belongs to the structural zero process ( π t ) or to a stochastic fluctuation around the skew-normal mean. This distinction allows the residual model to simultaneously account for recurrent non-usage periods and irregular positive demand, thereby improving both interpretability and forecasting accuracy.
Parameter estimation is performed using penalized maximum likelihood as shown in Equation (5):
p ( θ ) = ( θ ) λ θ 2 ,
where ( θ ) denotes the log-likelihood of the ZISN distribution and λ θ 2 is a quadratic penalty used to regularize parameter growth and prevent overfitting. The penalty parameter λ is selected adaptively using either the Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) or cross-validation. This regularization strategy improves model stability, especially under sparse and highly asymmetric demand conditions, as expressed in Equation (5).

2.2. Multilayer Perceptron (MLP) Benchmark

As a non-linear forecasting benchmark, we trained a feed-forward MLP regressor [16]. The model maps a fixed-length input vector of lagged demand values to a single-step prediction via successive affine transformations and non-linear activations.
Let u t = [ y t 1 , y t 2 , y t 3 ] R 3 be the input vector at time t. The MLP output is computed according to Equation (6):
y ^ t = f ( 3 ) W ( 3 ) f ( 2 ) W ( 2 ) f ( 1 ) W ( 1 ) u t + b ( 1 ) + b ( 2 ) + b ( 3 )
where
-
W ( l ) R d l × d l 1 and b ( l ) R d l are the weight matrices and bias vectors for layer l = 1 , 2 , 3 ;
-
f ( 1 ) ( · ) , f ( 2 ) ( · ) are ReLU (Rectified Linear Unit) activation functions ReLU ( x ) = max ( 0 , x ) ;
-
f ( 3 ) ( · ) is the identity function (linear output);
-
y ^ t is the predicted demand at time t.
In our implementation, the hidden-layer dimensions are d 1 = 32 , d 2 = 16 , and d 3 = 1 . The model is trained to minimize the Mean Squared Error (MSE) defined in Equation (7):
L = 1 T t = 1 T ( y t y ^ t ) 2
Optimization is performed using the Adam algorithm [27] with learning rate η = 0.001 , for up to 1000 epochs. Early stopping is applied by retaining the model weights yielding the lowest validation loss.
This benchmark provides a flexible, non-parametric comparator to evaluate the predictive power of our proposed SARIMAX–SN/ZISN models, particularly in capturing non-linear dependencies in the data.

2.3. Optimization Phase (Global PSO)

The forecasted monthly demand D ^ i for each laboratory reagent was used to compute the optimal order quantities Q = ( Q 1 , , Q N ) by solving a multivariate, non-linear, and constrained inventory control problem.
The packaging constraint is formulated in Equation (8):
Q i = k i · pack i
where k i N 0 is the number of packaging units to be ordered for item i.
The procurement cost function is defined in Equation (9):
C ( k ) = i = 1 N c i Q i + I { Q i > 0 } o i + h i · ( Q i D ^ i ) + + s i · ( D ^ i Q i ) +
This is subject to the budget constraint expressed in Equation (10):
i = 1 N c i Q i B
where
-
c i is the unit cost;
-
o i is the fixed ordering cost;
-
h i is the holding cost per excess unit;
-
s i is the shortage cost per missing unit;
-
B is the total available budget.
Because the problem is combinatorial, non-linear, and non-differentiable, we apply Particle Swarm Optimization (PSO) to find a near-optimal solution k * . Each particle represents an integer vector k = ( k 1 , , k N ) , initialized randomly in [ 0 , k i max ] for each item.
To enforce the budget constraint, the penalized cost function in Equation (11) is used:
C ˜ ( k ) = C ( k ) + ρ · max 0 , i = 1 N c i Q i B
with ρ 1 being a penalty coefficient to discourage budget violations.

2.3.1. Mathematical Formulation of PSO

Particle Swarm Optimization is a population-based metaheuristic inspired by the collective behavior of swarms [9,28]. Each particle has a position k ( t ) and a velocity v ( t ) , both updated iteratively. The velocity update is defined in Equation (12), while the position update is given by Equation (13):
v ( t + 1 ) = w · v ( t ) + c 1 · r 1 · ( p ( t ) k ( t ) ) + c 2 · r 2 · ( g ( t ) k ( t ) )
k ( t + 1 ) = k ( t ) + v ( t + 1 )
where
-
w is the inertia weight (balances exploration and exploitation);
-
c 1 , c 2 are cognitive and social acceleration coefficients;
-
r 1 , r 2 U ( 0 , 1 ) are random numbers;
-
p ( t ) is the personal best position of the particle;
-
g ( t ) is the global best found by the swarm.
As our problem requires integer decisions with packaging constraints, we apply rounding after each position update and enforce Equation (8) to compute feasible order quantities.
The PSO configuration used 50 particles, 200 iterations, inertia weight w = 0.7 , and acceleration coefficients c 1 = c 2 = 1.5 . The best feasible solution k * yields final order quantities Q * = k * pack .
While the present optimization instance involves a limited number of determinations (34 items), allowing, in principle, for full discrete enumeration, the adoption of PSO offers several advantages. First, it provides a flexible and scalable framework capable of handling future extensions with larger item portfolios, multi-period planning, or more complex constraints such as supplier lead times and stochastic budget adjustments. Second, the PSO formulation seamlessly integrates discrete packaging constraints without requiring complex integer programming models. This design ensures that the optimization layer remains generalizable and readily applicable to broader health supply chain contexts beyond the scope of the present study. The choice of PSO is supported by the extensive literature illustrating its efficiency and versatility across application domains, please see [29,30].

2.3.2. Validation Against Exact Optimization

To assess the reliability of PSO, we benchmarked it against an exact branch-and-bound solver on a 10-item subset of the dataset under the same budget constraints. The results showed that PSO can reproduce or closely approximate the exact optimal cost in small-scale cases. While enumeration or Mixed Integer Linear Programming (MILP) approaches are feasible for small instances, PSO offers superior scalability as the number of items grows, which justifies its adoption in our framework.

2.4. Reproducible Workflow and Algorithmic Steps

To improve clarity and follow best practices for reproducible research, we summarize the end-to-end procedure as algorithmic steps, see Algorithm 1, and provide the flowchart Figure 1 for forecasting and residual specification workflow (SARIMAX + ZISN). The complete, reproducible Python 3.11.8 version implementation (including residual centering, outlier truncation, and λ -regularization for skew-normal parameters) is available in a public Zenodo repository [31].
Algorithm 1: Forecasting and residual specification workflow (SARIMAX + ZISN)
Mathematics 13 03001 i001
The algorithmic steps for carrying out an inventory–cost optimization with packaging multiples and budget constraint are depicted in Algorithm 2 and the flowchart in Figure 2. The full implementation of the optimization routine (including packaging multiples and budget constraint) is provided in the Zenodo repository [31].
Algorithm 2: Inventory–cost optimization with packaging multiples and budget constraint
Mathematics 13 03001 i002

2.5. Performance Metrics

Forecast accuracy was assessed using Mean Absolute Error (MAE) and Root Mean Square Error (RMSE). MAE quantifies average absolute deviation [32], while RMSE penalizes larger errors more heavily [33], thus providing complementary views of accuracy and stability.

3. Results

This section presents the performance of the forecasting models, residual diagnostics, and inventory cost optimization using the calibrated demand forecasts. We analyzed 36 months of consumption for 34 clinical determinations from a Chilean public hospital, see public repository in [31]. Data pre-processing (outlier checks, missing handling) followed the reproducible workflow in Section 2.4.

3.1. Data Description and Parameters

The dataset used in this study consists of monthly consumption data for 34 clinical laboratory items over a three-year period (January 2021–December 2023). This dataset originates from the Clinical Chemistry section of a public hospital in Chile and was approved by the Ethics Committee of the Faculty of Chemistry and Pharmacy, University of Valparaíso (Approval Code: CG-05-2024). Realistic procurement constraints, such as packaging multiples and budget limitations, were incorporated into the analysis. Realistic constraints from hospital procurement were incorporated, including mandatory ordering in packaging multiples (e.g., boxes of 12 or 24 units).
The demand data was standardized by converting laboratory reagent kits into number of determinations per month based on manufacturer specifications. This normalization ensures comparability across different kit presentations.
The following cost parameters were estimated based on hospital records:
  • Ordering cost ( o i )—average cost of issuing a purchase order, including administrative labor and shipping.
  • Holding cost ( h i )—annual cost of storing one determination unit, considering energy, losses, and space.
  • Shortage cost ( s i )—cost associated with stockouts, estimated from rescheduling procedures and patient re-attendance.
  • Procurement cost ( c i )—average unit cost of each determination, computed from historical purchasing prices.
All monetary values were adjusted to 2023 CLP using the Consumer Price Index (IPC in Spanish) inflation index. An initial inventory level I 0 was defined based on stock records from December 2023.
The demand distributions exhibited substantial variability and occasional zero inflation, with residual patterns deviating from Gaussian assumptions. These characteristics motivated the adoption of structured residual models in subsequent analyses.
While this subsection presents the specific dataset used for empirical validation, it is important to note that the proposed hybrid SARIMAX–PSO framework is not restricted to this dataset. The methodology can be applied to other healthcare institutions or logistics domains facing uncertain and asymmetric demand. This reinforces the generalizability and adaptability of the approach.

3.2. Forecast Accuracy and Parameter Estimates

To improve readability, we summarize per-item forecasting performance using only the key error metrics (MAE, RMSE) in Table 2. All fitted distribution parameters ( λ , μ , σ , p 0 ) and SARIMAX orders are now reported in the Appendix A, Table A1, together with additional diagnostics.
Only 1 analyte (Phenobarbital) exceeded the 10% zero-proportion threshold and was therefore assigned the SARIMAX–ZISN specification; the remaining 33 analytes were modeled with SARIMAX–SN. Across the cohort, the skew-aware residual modeling reduced average forecasting errors relative to a Gaussian-error baseline. For the single ZISN case, MAE improved by 14% over its SN counterpart, confirming the benefit of explicitly modeling excess zeros.
As discussed there, several SN location estimates μ are negative despite prior residual centering. This arises because centering was applied globally before truncation, while the skew-normal fit is performed on trimmed residual subsets; hence, μ reflects the location of the cleaned residual kernel rather than the raw residual mean.
The neural MLP benchmark matched the linear models on some low-variance items but underperformed for high-volume series dominated by seasonality. For the MLP benchmark (three lagged inputs), we computed permutation feature importance on the hold-out window; lags t 1 and t 2 systematically contributed >80% of the explained variance, indicating that the network mostly captures short-term autocorrelation rather than complex seasonal patterns. To complement the tabular summary, Figure 3 and Figure 4 illustrate the main findings. Figure 3 provides a heatmap of MAE and RMSE across all analytes, highlighting the heterogeneous forecasting difficulty. Figure 4 contrasts SARIMAX–SN versus the MLP benchmark on representative high-variance and low-variance series, showing the gain from skew-aware residual modeling.
The figure shows that high-volume assays such as Glucose, Creatinine, and Cholesterol exhibit the largest errors, while low-volume assays (e.g., Phenobarbital, Ammonia) have minimal error values. This heterogeneity confirms that forecasting performance is item-specific and justifies the need for a flexible hybrid model.
The largest improvements are observed in analytes with highly skewed demand (e.g., Glucose, Cholesterol, Creatinine), where SARIMAX–SN significantly reduces MAE compared to MLP. In contrast, for stable low-variance analytes (e.g., Phenobarbital, Ammonia), both models converge to similar performance, indicating that skew- and zero-sensitive extensions are most beneficial under high variability.
Table 3 summarizes the forecasting accuracy across three approaches. The proposed SARIMAX–SN/ZISN models yielded the lowest Mean Absolute Error (MAE) and Root Mean Square Error (RMSE), outperforming both the Gaussian-residual SARIMA and the non-linear MLP benchmark. To benchmark the predictive capacity of the proposed SARIMAX–SN/ZISN models, we included a non-parametric neural network benchmark using a simple multilayer perceptron (MLP). While the MLP offers flexible non-linear approximation capabilities, its black-box nature lacks interpretability, particularly regarding residual asymmetry and the explainability required in clinical forecasting contexts. The comparative analysis demonstrates that the proposed models achieve superior or comparable accuracy while retaining full traceability of forecasting errors and their statistical structure. This highlights the value of combining domain-informed parametric modeling with explainable error structures in healthcare demand forecasting. The estimated skewness parameter λ was positive for 32 / 34 laboratory reagents, confirming the right-tailed behavior highlighted by skew-normal diagnostics, whereas the only analyte with a substantial zero proportion (Phenobarbital, p 0 0.30 ) required the zero-inflated specification. These diagnostics justify the asymmetric error structures adopted.
To assess the relationship between forecasting accuracy and demand volume, analytes were categorized into three groups according to their average monthly demand during the training period: low demand (less than 100 determinations/month), medium demand (100–999 determinations/month), and high demand (1000 determinations/month or more). Table 4 presents the disaggregated MAE and RMSE values for each demand level.
As expected, absolute errors increase with demand volume. However, this reflects natural scale effects rather than model inefficiency. The forecast errors remain reasonably proportional to demand magnitude, as further explored through percentage-based metrics in subsequent sections.
Table 5 reports forecasting errors for each forecast step from one to six months ahead. Interestingly, the second forecast step exhibits the highest MAE and RMSE values, potentially reflecting short-term fluctuations or abrupt changes not fully captured by the autoregressive structure. Beyond this initial peak, errors stabilize across longer forecast horizons, suggesting that the models maintain robust performance over multiple steps ahead.
In addition to absolute error metrics, the Mean Absolute Percentage Error (MAPE) was computed to evaluate forecasting performance relative to demand volume. Table 6 summarizes the MAPE by demand level.
MAPE could not be calculated for the low-demand group due to zero-demand occurrences in the test set, which make percentage-based measures undefined. For the medium- and high-demand categories, the models achieved average MAPE values below 11%, indicating strong relative accuracy even for high-volume determinations.

3.3. Residual Diagnostics and Model Selection

After fitting each SARIMAX–SN/SARIMAX–ZISN model, we inspected the standardized residuals via Ljung–Box tests and quantile–quantile plots (QQ-plots), see results in Table A3 and Figure A1, respectively. Detailed QQ-plots and Ljung–Box test tables are reported in Appendix A. Here, we summarize that residual diagnostics confirmed the adequacy of the skew-normal and zero-inflated skew-normal specifications, with most analytes showing no significant autocorrelation and clear alignment with the assumed distributional shapes. This indicates that the adopted residual models appropriately captured asymmetry and zero inflation in clinical demand series.
To evaluate residual distributional assumptions, QQ-plots were constructed by comparing standardized residuals against the standard normal distribution. While the skew-normal specification introduces inherent asymmetry, QQ-plots remain informative to visually assess overall goodness of fit and detect residual heavy tails or misspecification. Future work could improve residual diagnostics by generating QQ-plots directly against the fitted skew-normal quantiles, providing a more precise graphical validation of the estimated shape parameters.

3.4. Optimization Outcomes

Table A2 of Appendix B summarizes the inputs used in the PSO-based optimization stage. For each determination, we report the best-fitting SARIMAX model order, the expected monthly demand (estimated as the mean forecast over a six-month horizon), and the associated cost parameters. These include the unit cost of purchase, the fixed cost of placing an order, and penalty terms for holding excess stock or facing shortages. Packaging constraints are also specified via the ‘Pack_Size’ column, which enforces that each order quantity must be an integer multiple of a fixed unit.
The illustrative figure (Figure 5) highlights the trade-off between forecasted demand and unit cost across analytes. Items such as Creatinine, Glucose, and HDL Cholesterol exhibit very high demand volumes but relatively low unit costs, which implies that they dominate overall procurement needs. In contrast, Lithium, Valproic Acid, and Ammonia have very low demand levels but extremely high unit costs, making them economically significant despite their smaller volumes. This dissociation underscores two critical aspects for optimization: (i) high-volume/low-cost items require efficient inventory management to prevent shortages, and (ii) low-volume/high-cost items impose substantial financial risk per unit and thus require careful procurement policies.
The ordering recommendations obtained with the PSO optimization layer were then fed into the inventory cost model; the resulting savings relative to the empirical hospital policy are summarized in Table 7. This end-to-end traceability—from residual shape parameters, predictive errors, and zero-inflation detection to constrained ordering policies—provides an explainable, domain-specific hybrid framework, fulfilling the design goals stated in the Introduction. The optimizer strictly satisfies the packaging constraint Q i * = k i · pack i for each item, as detailed in Table 7. The fill rate remained above 85% for all high-volume items and above 70% across the full portfolio.
To emphasize the practical impact of the optimization stage, we explicitly contrast the historical inventory costs with those achieved by the optimized models. Table 8 presents this comparison. While the empirical hospital policy led to an average monthly cost of CLP 179.5 million, the baseline SARIMA with Gaussian residuals reduced this to CLP 32.1 million. Our proposed hybrid SARIMAX–SN/ZISN with PSO achieved an even lower cost of CLP 19.6 million, yielding an overall reduction of approximately 89% relative to the historical baseline. This direct comparison validates the optimization stage as a central component of the contribution.
Future work will consider multi-objective optimization approaches to simultaneously minimize cost and maximize service levels.

3.5. PSO Sensitivity and Robustness Analysis

Since PSO performance depends on hyperparameters, we performed a sensitivity analysis, varying the number of particles (20, 50, 100), iterations (100, 300), inertia weight w (0.5, 0.7, 0.9), and acceleration coefficients c 1 = c 2 (1.2, 1.8). We compared each configuration against the exact branch-and-bound solver on the 10-item subset. Table 9 shows the top five configurations by lowest PSO cost, while Table 10 shows the top five by smallest absolute cost gap. Our original setting (50 particles, 200 iterations, w = 0.7 , c 1 = c 2 = 1.5 ) produced feasible and stable results but did not yield the closest match to the exact optimum. In contrast, alternative settings (e.g., w = 0.5 , c 1 = c 2 = 1.8 ) perfectly replicated the exact solution, confirming the robustness of PSO and the importance of calibration.
Table 9 and Table 10 provide complementary perspectives on the robustness of PSO. Table 9 highlights the top five parameter settings that achieved the lowest cost values, which were consistently below the exact solver. Although these runs appear to outperform the optimum, the negative gaps indicate that PSO can converge to infeasible cost under certain hyperparameter combinations, underscoring the need for careful calibration. In contrast, Table 10 shows configurations where PSO perfectly matched the exact branch-and-bound solution (0% gap). These results demonstrate that when inertia weight and acceleration coefficients are properly tuned (e.g., w = 0.5 , c 1 = c 2 = 1.8 ), PSO can replicate exact solutions with high reliability and minimal computational time (under 0.3 s).
Taken together, these findings suggest that PSO is not only computationally efficient but also capable of delivering exact-quality solutions when parameters are chosen appropriately. This reinforces its practical applicability in real healthcare inventory settings, where rapid and reliable optimization is crucial. The sensitivity analysis therefore validates PSO as a robust component of the proposed hybrid framework and highlights the trade-off between stability and accuracy that practitioners should consider when calibrating metaheuristic solvers.

4. Discussion

The proposed hybrid framework integrates statistical forecasting with metaheuristic optimization to address the dual challenges of demand uncertainty and procurement constraints in clinical laboratories. The results demonstrate clear advantages of extending SARIMAX models with skew-normal and zero-inflated residuals. Relative to traditional Gaussian SARIMA models, the proposed SARIMAX–SN/ZISN specification reduced forecasting errors by approximately 15% in MAE and 13% in RMSE across the analyte portfolio. In the case of Phenobarbital, where excess zeros were present, the ZISN residuals achieved a 14% improvement in MAE over the skew-normal specification, confirming the benefit of explicitly modeling structural zeros. Compared to the non-linear MLP benchmark, our models matched or exceeded accuracy for high-variance and seasonal series while preserving interpretability of residuals. These relative gains underscore that the framework not only improves predictive accuracy but also provides explainable diagnostics that are directly useful for operational decision-making in clinical laboratories. More precise anticipation of irregular or sporadic reagent use reduces the risk of stockouts or surplus inventory, which is critical for time-sensitive clinical workflows [34].
The residual diagnostics, including Ljung–Box tests and QQ plots (summarized here and detailed in Appendix A), confirmed the adequacy of the fitted models [35]. Beyond their statistical role, the skewness parameter λ offers actionable information: it signals reagents subject to unexpected spikes in demand, enabling managers to proactively allocate buffer stock and improve readiness for demand surges such as seasonal peaks or pandemics.
The optimization layer further demonstrated the operational value of the framework. By combining forecasts with Particle Swarm Optimization under budget and packaging constraints, average monthly inventory costs were reduced from CLP 179.5 million to CLP 19.6 million—an 89% savings. PSO’s computational efficiency and adaptability are well established in non-linear, stochastic contexts [11,36,37,38,39]. From an operational perspective, these savings correspond to nearly CLP 160 million (∼USD 170,000) per month. For a public hospital, this is equivalent to financing additional diagnostic capacity, reducing emergency reagent purchases, or reallocating resources to patient care. Crucially, service levels remained above 85% for high-volume determinations, confirming that financial efficiency was achieved without compromising clinical reliability. In practice, this means that procurement managers can move from reactive to proactive decision-making, balancing cost reduction with uninterrupted service provision.
Beyond numerical results, the framework addresses a well-documented disconnect between statistical forecasts and procurement processes in public health institutions. By explicitly linking predictions to feasible ordering policies, it prevents common failures such as reliance on emergency purchases or wastage from expired reagents. Its modular design allows adoption in stages: hospitals with limited capacity may implement only the forecasting or the optimization component, while larger institutions can deploy the integrated framework. Transparency and traceability further support its adoption in public healthcare, where procurement decisions are subject to strict oversight [40].

4.1. Critical Analysis of Results

The results reported in Section 3 not only quantify forecasting accuracy and inventory cost savings but also carry important implications for hospital operations and healthcare supply chain management. First, the observed 89% reduction in inventory costs relative to the empirical hospital policy is not simply a numerical gain. It indicates a reallocation of nearly CLP 160 million per month that could be redirected to patient care, laboratory staff, or diagnostic expansion. Maintaining service levels above 85% while achieving such cost efficiency demonstrates that data-driven inventory management can overcome the traditional trade-off between financial constraints and clinical reliability.
Second, our framework differs from prior studies that applied forecasting or optimization in isolation. Previous work in hospital supply chains and pharmaceutical logistics typically reports partial improvements yet often assumes Gaussian residuals or relies on black-box machine learning without constrained optimization layers. By contrast, the integration of skew-normal and zero-inflated residuals into a PSO-based optimization engine explains why our model consistently outperforms both SARIMA–Gaussian and neural baselines. This direct linkage between statistical residuals and procurement decisions is, to our knowledge, novel in the healthcare inventory literature.
Third, the dual pattern identified in the dataset—high-volume/low-cost reagents (e.g., Creatinine, Glucose) versus low-volume/high-cost reagents (e.g., Lithium, Valproic Acid)—illustrates the broader applicability of the framework. Many healthcare systems exhibit similar demand asymmetries, suggesting that the proposed hybrid approach is relevant beyond the Chilean hospital used for validation. The robustness of the PSO optimization layer further supports scalability to larger portfolios of items and adaptability to diverse budgetary and operational contexts.
Finally, several limitations must be acknowledged. The empirical validation relied on data from a single institution, procurement costs were assumed to be static, and supplier lead times were not explicitly modeled. These restrictions may limit the generalizability of the findings and potentially introduce optimistic bias. Future work should therefore extend validation to multi-institutional settings, incorporate dynamic procurement costs, and model stochastic supplier lead times to ensure broader applicability of the framework.

4.2. Limitations and Future Work

Nevertheless, several limitations condition the interpretation of these findings. The analysis was restricted to one Chilean hospital, which limits generalizability: procurement regulations, budget flexibility, and data quality vary significantly across healthcare systems [41]. For example, institutions in high-income countries often operate with shorter procurement cycles and more responsive supply chains, while resource-constrained settings may face chronic shortages not captured here. Assumptions of static parameters such as procurement costs, shortage penalties, and budgets may underestimate real-world volatility introduced by exchange rates, supplier negotiations, or policy changes. Similarly, by excluding long-term epidemiological shifts and technological transitions, the model may not fully capture structural changes in diagnostic demand. Finally, the absence of supplier lead times and stochastic delays in the optimization layer introduces an optimistic bias, since delays can generate stockouts even with accurate forecasts.
These limitations also define natural extensions for future research. Validation across hospitals of different sizes and countries would test robustness under diverse procurement practices. Incorporating dynamic procurement costs, rolling budgets, and stochastic supplier delays would increase realism and reduce optimism bias in service-level projections. Multi-period planning frameworks could capture long-term shifts in diagnostic demand, while integration with hospital Enterprise Resource Planning (ERP) systems would enable real-time re-planning. Finally, the development of decision-support dashboards tailored to non-technical managers would facilitate adoption by translating complex forecasting and optimization outputs into actionable recommendations. Beyond the residual-based transparency provided by skew-normal and zero-inflated structures, future extensions could incorporate explainable artificial intelligence (XAI) techniques, such as SHAP values, individual conditional expectation (ICE) plots, or partial dependence analysis. These approaches would allow practitioners to better understand which time series features drive forecast behavior, thereby increasing the trust and adoption of the framework in medical decision-making contexts.
Taken together, these contributions show that the proposed framework is not only statistically robust but also operationally meaningful. It improves forecasting accuracy, reduces costs, maintains service levels, and strengthens transparency in clinical supply chains while also offering a clear roadmap for extensions that address its current limitations.

5. Conclusions

This study proposed and validated a hybrid forecasting–optimization framework designed to improve inventory management in clinical laboratories operating under demand uncertainty, budget restrictions, and packaging constraints. By combining SARIMAX models with structured residuals (skew-normal and zero-inflated skew-normal) and a metaheuristic optimization layer based on Particle Swarm Optimization (PSO), the framework achieved significant advances in both predictive accuracy and cost efficiency.
The main contributions and conclusions are as follows:
  • The proposed SARIMAX–SN/ZISN models consistently outperformed standard SARIMA and neural network benchmarks in forecasting accuracy, particularly for laboratory reagents exhibiting skewed or zero-inflated demand.
  • The metaheuristic inventory optimization component effectively translated improved forecasts into procurement decisions that were budget-compliant, packaging-feasible, and highly cost-efficient, achieving up to 89% monthly cost savings compared to the hospital’s empirical policy.
  • The framework preserved high service levels across the determinations portfolio, confirming its applicability in critical clinical environments where stockouts are unacceptable.
  • The integration of explainable forecasting structures and constrained optimization enhances transparency and traceability from data to decisions—essential for implementation in public healthcare systems.
  • While the results are promising, future work should extend the approach to dynamic and multi-objective scenarios, explore its applicability across diverse institutional contexts, and develop decision-support interfaces for broader adoption.
In summary, the hybrid framework presented here offers a robust, interpretable, and operationally grounded solution for laboratory reagent inventory planning in clinical laboratories, balancing cost efficiency with clinical reliability. It should be noted, however, that the reported 89% reduction in inventory costs is specific to the dataset and historical procurement context of the studied hospital. The generalizability of this result to other healthcare systems requires further calibration and validation under their respective budgetary, regulatory, and supply chain conditions. Consequently, while the proposed framework shows promising outcomes, its transferability should be approached with caution and adapted to local institutional settings. Furthermore, multi-center validation across hospitals with different diagnostic portfolios and procurement practices would be essential to confirm robustness. Integration with hospital ERP systems could also facilitate real-time re-planning and enhance the operational value of the framework.

Author Contributions

Conceptualization, F.R. and M.C.; methodology, F.R.; software, F.R.; validation, M.C., and J.Y.; formal analysis, F.R.; investigation, J.Y.; resources, M.C.; data curation, J.Y.; writing—original draft preparation, F.R.; writing—review and editing, M.C.; visualization, J.Y.; supervision, M.C.; project administration, F.R.; funding acquisition, M.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Magíster en Análisis Clínico, Escuela de Química y Farmacia Facultad de Farmacia, Universidad de Valparaíso, Chile.

Data Availability Statement

The data can be consulted in the web repository, see [31].

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Full Tables of Model Performance

Table A1. Fitted parameters and forecasting errors (test window: six months), MAE and RMSE values.
Table A1. Fitted parameters and forecasting errors (test window: six months), MAE and RMSE values.
ItemModelOrderλμσp0 MAE SN / Z RMSE SN / Z MAE MLP
Lactic AcidSARIMAX-SN(2,1,2)3.58−66.9293.84 14.6616.9154.98
UreaSARIMAX-SN(0,1,2)5.95−155.25225.36 83.43107.38106.21
Valproic AcidSARIMAX-SN    (1,1,2)0.000.006.16 9.6711.567.05
AlbuminSARIMAX-SN(1,1,2)3.47−71.8998.90 31.8337.37110.67
AmylaseSARIMAX-SN(0,1,2)0.93−41.9477.66 14.6617.75216.82
AmmoniaSARIMAX-SN(0,1,2)1.48−10.6216.20 1.671.964.52
Direct BilirubinSARIMAX-SN(0,1,2)10.00−338.58461.86 268.53291.49279.15
Total BilirubinSARIMAX-SN(0,1,2)4.64−306.96449.56 283.80307.62302.48
CalciumSARIMAX-SN(0,1,2)2.28−105.21153.05 88.33104.99132.64
CarbamazepineSARIMAX-SN(1,1,2)−0.010.011.79 4.635.376.71
Total CKSARIMAX-SN(0,1,2)9.85−132.79181.18 51.1864.7377.04
CK-MBSARIMAX-SN(2,1,2)12.75−128.14183.53 78.9899.54118.62
HDL CholesterolSARIMAX-SN(0,1,2)5.61−358.86504.35 235.25264.34312.07
Total CholesterolSARIMAX-SN(0,1,2)4.59−370.12524.30 268.55309.61347.91
CreatinineSARIMAX-SN(0,1,2)5.11−760.151094.09 372.62445.61511.38
LDHSARIMAX-SN(2,1,2)0.82−77.34153.42 50.2463.7582.11
Plasma ElectrolytesSARIMAX-SN(0,1,2)4.00−40.0090.00 18.0022.0229.77
Rheumatoid FactorSARIMAX-SN(0,1,2)5.00−50.00100.00 25.0031.6041.92
PhenytoinSARIMAX-SN(1,1,2)2.00−5.0012.00 2.503.043.80
PhenobarbitalSARIMAX-ZISN(0,1,2)2.87−1.371.780.301.001.441.62
Alkaline PhosphataseSARIMAX-SN(0,1,2)5.15−325.43466.84 277.70303.02341.28
PhosphorusSARIMAX-SN(0,1,2)2.45−48.3967.56 72.8484.27102.13
GGTSARIMAX-SN(0,1,2)4.79−283.45411.70 190.46202.71239.66
GlucoseSARIMAX-SN(0,1,2)4.06−575.32828.00 407.48488.97566.09
LipaseSARIMAX-SN(0,1,2)1.23−52.1885.03 19.2822.8429.53
LithiumSARIMAX-SN(0,1,2)−0.401.093.69 9.8411.1313.41
MicroalbuminuriaSARIMAX-SN(0,1,2)3.32−154.08222.23 113.75145.06181.72
Urea Nitrogen (BUN)SARIMAX-SN(0,1,2)10.00−621.03850.32 243.40271.03318.18
C-Reactive Protein (CRP)SARIMAX-SN(1,1,2)4.25−258.75381.87 103.15119.44148.31
Total ProteinsSARIMAX-SN(0,1,2)2.42−130.11184.17 135.16143.88183.02
CSF ProteinsSARIMAX-SN(0,1,2)6.64−49.1765.61 33.7155.4169.88
AST (GOT)SARIMAX-SN(0,1,2)4.66−344.80498.68 308.68340.83403.24
ALT (GPT)SARIMAX-SN(0,1,2)4.61−343.91497.96 307.64338.90401.77
TriglyceridesSARIMAX-SN(0,1,2)5.40−361.29504.92 249.18280.60333.45

Appendix B. Forecasts and Cost Parameters for PSO Optimization

Table A2. Forecasts and cost parameters used in PSO optimization.
Table A2. Forecasts and cost parameters used in PSO optimization.
ItemModelOrderForecast_MeanPack_SizeUnit_CostOrder_CostHolding_CostShortage_Cost
Lactic AcidSARIMAX-SN(2,1,2)175.36220671.9179521339001
UreaSARIMAX-SN(0,1,2)786.67880318.8179521339001
Valproic AcidSARIMAX-SN(1,1,2)14.422001744.0179521339001
AlbuminSARIMAX-SN(1,1,2)403.00456091.6179521339001
AmylaseSARIMAX-SN(0,1,2)323.812201047.8179521339001
AmmoniaSARIMAX-SN(0,1,2)42.191002030.1179521339001
Direct BilirubinSARIMAX-SN(0,1,2)2120.99500586.3179521339001
Total BilirubinSARIMAX-SN(0,1,2)2124.5050491.6179521339001
CalciumSARIMAX-SN(0,1,2)598.50525243.9179521339001
CarbamazepineSARIMAX-SN(1,1,2)8.242001741.8179521339001
Total CKSARIMAX-SN(0,1,2)553.97920374.3179521339001
CK-MBSARIMAX-SN(2,1,2)479.98400860.9179521339001
HDL CholesterolSARIMAX-SN(1,1,2)3861.721000558.5179521339001
Total CholesterolSARIMAX-SN(0,1,2)2307.05732076.3179521339001
CreatinineSARIMAX-SN(0,1,2)5016.41784021.2179521339001
LDHSARIMAX-SN(2,1,2)441.44420860.9179521339001
Plasma ElectrolytesSARIMAX-SN(0,1,2)29.6640,00040.2179521339001
Rheumatoid FactorSARIMAX-SN(0,1,2)28.271000373179521339001
PhenytoinSARIMAX-SN(1,1,2)3.572001741.8179521339001
PhenobarbitalSARIMAX-ZISN(0,1,2)1.142001744.0179521339001
Alkaline PhosphataseSARIMAX-SN(0,1,2)2165.27560236.0179521339001
PhosphorusSARIMAX-SN(0,1,2)295.60628033.9179521339001
GGTSARIMAX-SN(0,1,2)1944.46540232.2179521339001
GlucoseSARIMAX-SN(0,1,2)4164.82924021.3179521339001
LipaseSARIMAX-SN(0,1,2)302.977801203.0179521339001
LithiumSARIMAX-SN(0,1,2)11.162268996.2179521339001
MicroalbuminuriaSARIMAX-SN(0,1,2)697.55960351.6179521339001
Urea Nitrogen (BUN)SARIMAX-SN(0,1,2)3797.80560026.5179521339001
C-Reactive Protein (CRP)SARIMAX-SN(1,1,2)2145.42200703.0179521339001
Total ProteinsSARIMAX-SN(0,1,2)832.00576049.4179521339001
CSF ProteinsSARIMAX-SN(0,1,2)251.83450750.2179521339001
AST (GOT)SARIMAX-SN(0,1,2)2260.78600102.0179521339001
ALT (GPT)SARIMAX-SN(0,1,2)2261.36600102.0179521339001
TriglyceridesSARIMAX-SN(0,1,2)2161.62564028.8179521339001

Appendix C. Ljung–Box Test (Lag 10) for Standardized Residuals

Table A3. Ljung–Box test (lag 10) for standardized residuals.
Table A3. Ljung–Box test (lag 10) for standardized residuals.
ItemLB_Pvalue_lag10Pass (p > 0.05)
Lactic Acid0.43Yes
Urea0.36Yes
Valproic Acid0.21Yes
Albumin0.55Yes
Amylase0.27Yes
Ammonia0.63Yes
Direct Bilirubin0.15No
Total Bilirubin0.11No
Calcium0.51Yes
Carbamazepine0.09No
Total CK0.60Yes
CK-MB0.24Yes
HDL Cholesterol0.39Yes
Total Cholesterol0.34Yes
Creatinine0.41Yes
LDH0.45Yes
Plasma Electrolytes0.28Yes
Rheumatoid Factor0.18No
Phenytoin0.58Yes
Phenobarbital0.52Yes
Alkaline Phosphatase0.46Yes
Phosphorus0.49Yes
GGT0.62Yes
Glucose0.33Yes
Lipase0.29Yes
Lithium0.61Yes
Microalbuminuria0.47Yes
Urea Nitrogen (BUN)0.37Yes
C-Reactive Protein (CRP)0.22Yes
Total Proteins0.53Yes
CSF Proteins0.57Yes
AST (GOT)0.31Yes
ALT (GPT)0.41Yes
Triglycerides0.32Yes

Appendix D. Figure QQ-Plots of Standardized Residuals After Skew-Normal/Zero-Inflated Skew-Normal Fitting (SARIMAX–SN/ZISN Models)

Figure A1. QQ-plots of standardized residuals after skew-normal/zero-inflated skew-normal fitting (SARIMAX–SN/ZISN models).
Figure A1. QQ-plots of standardized residuals after skew-normal/zero-inflated skew-normal fitting (SARIMAX–SN/ZISN models).
Mathematics 13 03001 g0a1

Appendix E. Notation and Abbreviations

Table A4. List of notation and abbreviations used in this study.
Table A4. List of notation and abbreviations used in this study.
Symbol/AbbreviationDescription
D t Demand at time t
D ^ t Forecasted demand at time t
I t Inventory level at time t
C h Holding cost per unit
C s Shortage cost per unit
C o Ordering cost per order
QOrder quantity
LLead time
ε t Error term at time t
MAEMean Absolute Error
RMSERoot Mean Square Error
SARIMAXSeasonal AutoRegressive Integrated Moving Average with eXogenous variables
SNSkew-normal distribution
ZISNZero-inflated skew-normal distribution
PSOParticle Swarm Optimization
GAGenetic Algorithm

References

  1. Perrone, L.A.; Babin, F.X.; Cognat, S.; Gebelin, J.; Boussieres, E.; Molkenthin, A.; Jaúregui, B.; Wolman-Tardy, K.; Oh, H.; Watson, A. Global laboratory systems. In Global Health Security: A Concept and Approach; Elsevier BV: Amsterdam, The Netherlands, 2024; pp. 287–305. [Google Scholar] [CrossRef]
  2. Boche, B.; Temam, S.; Kebede, O. Inventory management performance for laboratory commodities and their challenges in public health facilities of Gambella Regional State, Ethiopia: A mixed cross-sectional study. Heliyon 2022, 8, e11357. [Google Scholar] [CrossRef]
  3. Chua, M.; Kim, D.; Choi, J.; Lee, N.G.; Deshpande, V.; Schwab, J.; Lev, M.H.; Gonzalez, R.G.; Gee, M.S.; Do, S. Tackling prediction uncertainty in machine learning for healthcare. Nat. Biomed. Eng. 2023, 7, 711–718. [Google Scholar] [CrossRef]
  4. Tadayonrad, Y.; Ndiaye, A.B. A new key performance indicator model for demand forecasting in inventory management considering supply chain reliability and seasonality. Supply Chain. Anal. 2023, 3, 100026. [Google Scholar] [CrossRef]
  5. Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice; OTexts: Melbourne, Australia, 2018. [Google Scholar]
  6. Dinamarca, M.A.; Rojas, F.; Ibacache-Quiroga, C.; González-Pizarro, K. Modeling Time Series with SARIMAX and Skew-Normal and Zero-Inflated Skew-Normal Errors. Mathematics 2025, 13, 1892. [Google Scholar] [CrossRef]
  7. Gorgin, V.; Sadeghpour Gildeh, B. MAD control chart for autoregressive models with skew-normal distribution. Stochastics Qual. Control 2020, 35, 17–23. [Google Scholar] [CrossRef]
  8. Lambert, D. Zero-inflated Poisson regression, with an application to defects in manufacturing. Technometrics 1992, 34, 1–14. [Google Scholar] [CrossRef]
  9. Talbi, E.G. Metaheuristics: From Design to Implementation; John Wiley & Sons: Hoboken, NJ, USA, 2009. [Google Scholar]
  10. Basciftci, B.; Ahmed, S.; Gebraeel, N. Adaptive two-stage stochastic programming with an analysis on capacity expansion planning problem. Manuf. Serv. Oper. Manag. 2024, 26, 2121–2141. [Google Scholar] [CrossRef]
  11. Dwivedi, V. Enhancing Pharmaceutical Supply Chains in Health Crises. J. Ind. Manag. Optim. 2025, 21, 1170–1192. [Google Scholar] [CrossRef]
  12. Arrieta, A.B.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; García, S.; Gil-López, S.; Molina, D.; Benjamins, R.; et al. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Inf. Fusion 2020, 58, 82–115. [Google Scholar] [CrossRef]
  13. Urjais Gomes, R.; Soares, C.; Reis, L.P. An Empirical Evaluation of DeepAR for Univariate Time Series Forecasting. In Proceedings of the EPIA Conference on Artificial Intelligence; Springer: Cham, Switzerland, 2024; pp. 188–199. [Google Scholar] [CrossRef]
  14. Fan, G.F.; Han, Y.Y.; Li, J.W.; Peng, L.L.; Yeh, Y.H.; Hong, W.C. A hybrid model for deep learning short-term power load forecasting based on feature extraction statistics techniques. Expert Syst. Appl. 2024, 238, 122012. [Google Scholar] [CrossRef]
  15. Chechkin, A.; Pleshakova, E.; Gataullin, S. A Hybrid KAN-BiLSTM Transformer with Multi-Domain Dynamic Attention Model for Cybersecurity. Technologies 2025, 13, 223. [Google Scholar] [CrossRef]
  16. Li, H.; Gao, W.; Xie, J.; Yen, G.G. Multiobjective bilevel programming model for multilayer perceptron neural networks. Inf. Sci. 2023, 642, 119031. [Google Scholar] [CrossRef]
  17. Sina, L.B.; Secco, C.A.; Blazevic, M.; Nazemi, K. Hybrid Forecasting Methods—A Systematic Review. Electronics 2023, 12, 2019. [Google Scholar] [CrossRef]
  18. Bui, X.D.; Hung, D.T. A Long Short-Term Memory Model for Forecasting Surgical Procedures. IISE Trans. Healthc. Syst. Eng. 2023; Advance online publication. [Google Scholar] [CrossRef]
  19. Vanbrabant, L.; Mertens, S.; Caris, A.; Sörensen, K. Improving hospital material supply chain performance by integrating decision problems: A literature review and future research directions. Comput. Ind. Eng. 2023, 180, 109235. [Google Scholar] [CrossRef]
  20. Atcha, P.; Vlachos, I.; Kumar, S. Inventory sharing in healthcare supply chains: Systematic literature review and future research agenda. Int. J. Logist. Manag. 2024, 35, 1107–1141. [Google Scholar] [CrossRef]
  21. Pathy, S.R.; Rahimian, H. A resilient inventory management of pharmaceutical supply chains under demand disruption. Comput. Ind. Eng. 2023, 180, 109243. [Google Scholar] [CrossRef]
  22. Saha, E.; Rathore, P. A smart inventory management system with medication demand dependencies in a hospital supply chain: A multi-agent reinforcement learning approach. Comput. Ind. Eng. 2024, 191, 110165. [Google Scholar] [CrossRef]
  23. Sohrabi, M.; Zandieh, M.; Shokouhifar, M. Sustainable inventory management in blood banks considering health equity using a combined metaheuristic-based robust fuzzy stochastic programming. Socio-Econ. Plan. Sci. 2023, 86, 101462. [Google Scholar] [CrossRef]
  24. Ahmadi, E.; Mosadegh, H.; Maihami, R.; Ghalehkhondabi, I.; Sun, M.; Süer, G.A. Intelligent inventory management approaches for perishable pharmaceutical products in a healthcare supply chain. Comput. Oper. Res. 2022, 147, 105968. [Google Scholar] [CrossRef]
  25. Li, N.; Chiang, F.; Down, D.G.; Heddle, N.M. A decision integration strategy for short-term demand forecasting and ordering for red blood cell components. arXiv 2020, arXiv:2008.07486. [Google Scholar] [CrossRef]
  26. Bandi, C.; Han, E.; Nohadani, O. Sustainable Inventory with Robust Periodic-Affine Policies and Application to Medical Supply Chains. arXiv 2018, arXiv:1806.06744. [Google Scholar] [CrossRef]
  27. Reyad, M.; Sarhan, A.M.; Arafa, M. A modified Adam algorithm for deep neural network optimization. Neural Comput. Appl. 2023, 35, 17095–17112. [Google Scholar] [CrossRef]
  28. Koh, J.S.; Tan, R.H.G.; Lim, W.H.; Tan, N.M.L. A Modified Particle Swarm Optimization for Efficient Maximum Power Point Tracking Under Partial Shading Condition. IEEE Trans. Sustain. Energy 2023, 14, 1822–1834. [Google Scholar] [CrossRef]
  29. Gad, A.G. Particle Swarm Optimization Algorithm and Its Applications: A Systematic Review. Arch. Comput. Methods Eng. 2022, 29, 2831–2867. [Google Scholar] [CrossRef]
  30. Zhou, Y. The overall framework design of automatic logistics system using a hybrid ANN-PSO model. Eng. Comput. 2022, 38, 2515–2531. [Google Scholar] [CrossRef]
  31. Rojas, F. Hybrid SARIMAX–PSO Framework with Skew-Normal Residuals: Inventory Optimization in Clinical Laboratories. 2025. Available online: https://zenodo.org/records/16905668 (accessed on 11 September 2025).
  32. Robeson, S.M.; Willmott, C.J. Decomposition of the mean absolute error (MAE) into systematic and unsystematic components. PLoS ONE 2023, 18, e0279774. [Google Scholar] [CrossRef]
  33. Rahman, M.M.; Joha, M.I.; Nazim, M.S.; Jang, Y.M. Enhancing IoT-Based Environmental Monitoring and Power Forecasting: A Comparative Analysis of AI Models for Real-Time Applications. Appl. Sci. 2024, 14, 11970. [Google Scholar] [CrossRef]
  34. Mishra, V.; Sharma, P.; Khound, K. Global Supply Chain Shocks and Trade Resilience: A Review Post-Covid and Ukraine Crisis. J. Mark. Soc. Res. 2025, 2, 336–348. [Google Scholar] [CrossRef]
  35. Dare, J.; Patrick, A.O.; Oyewola, D.O. Comparison of stationarity on Ljung box test statistics for forecasting. Earthline J. Math. Sci. 2022, 8, 325–336. [Google Scholar] [CrossRef]
  36. Razghandi, M.; Khamehchi, E. Application of Particle Swarm Optimization and Genetic Algorithms to Oilfield Operational Optimization. J. Pet. Sci. Eng. 2021, 205, 108901. [Google Scholar] [CrossRef]
  37. Tani, L.; Veelken, C. Comparison of Bayesian and Particle Swarm Algorithms for Hyperparameter Optimization in High-Energy Physics Applications. Comput. Phys. Commun. 2022, 277, 108382. [Google Scholar] [CrossRef]
  38. Verma, P.; Chaturvedi, B.K. Comprehensive Analysis and Review of Particle Swarm Optimization Techniques and Inventory System. Int. J. Future Revolut. Comput. Sci. Commun. Eng. 2022, 8, 41–50. [Google Scholar] [CrossRef]
  39. Wang, H.; Li, Y.; Zhou, X. A Comparative Study of GA, PSO and SCE Algorithms for Pyrolysis Kinetics Modeling. Energy Mater. Sustain. Technol. 2023, 2, 9. [Google Scholar] [CrossRef]
  40. Knezevic, C.E.; Das, B.; El-Khoury, J.M.; Jannetto, P.J.; Lacbawan, F.; Winter, W.E. Rising to the Challenge: Shortages in Laboratory Medicine. Clin. Chem. 2022, 68, 1486–1492. [Google Scholar] [CrossRef] [PubMed]
  41. Tabish, S.A. Procurement Management in Health Care Systems. In Health Care Management: Principles and Practice; Springer: Singapore, 2024. [Google Scholar] [CrossRef]
Figure 1. Flowchart of the forecasting and residual modeling pipeline. The complete code is available in Zenodo [31].
Figure 1. Flowchart of the forecasting and residual modeling pipeline. The complete code is available in Zenodo [31].
Mathematics 13 03001 g001
Figure 2. Flowchart of the inventory–cost optimization. Discrete enumeration can be replaced by PSO to explore larger search spaces under budget constraints.
Figure 2. Flowchart of the inventory–cost optimization. Discrete enumeration can be replaced by PSO to explore larger search spaces under budget constraints.
Mathematics 13 03001 g002
Figure 3. Heatmap of forecasting errors across analytes. Rows correspond to MAE and RMSE; columns list analytes. Darker intensities indicate larger errors, highlighting heterogeneous forecasting difficulty.
Figure 3. Heatmap of forecasting errors across analytes. Rows correspond to MAE and RMSE; columns list analytes. Darker intensities indicate larger errors, highlighting heterogeneous forecasting difficulty.
Mathematics 13 03001 g003
Figure 4. Model comparison by MAE: SARIMAX vs. MLP for each analyte (sorted by SARIMAX MAE). The skew-aware residual modeling (SARIMAX–SN/–ZISN) tends to outperform the MLP benchmark on high-variance series, while the gap narrows for low-variance items.
Figure 4. Model comparison by MAE: SARIMAX vs. MLP for each analyte (sorted by SARIMAX MAE). The skew-aware residual modeling (SARIMAX–SN/–ZISN) tends to outperform the MLP benchmark on high-variance series, while the gap narrows for low-variance items.
Mathematics 13 03001 g004
Figure 5. Forecast versus unit cost for analytes included in the PSO optimization. High-demand/low-cost items (e.g., Creatinine, Glucose) contrast with low-demand/high-cost items (e.g., Lithium, Valproic Acid), highlighting the dual challenge of volume-driven logistics and cost-driven risks.
Figure 5. Forecast versus unit cost for analytes included in the PSO optimization. High-demand/low-cost items (e.g., Creatinine, Glucose) contrast with low-demand/high-cost items (e.g., Lithium, Valproic Acid), highlighting the dual challenge of volume-driven logistics and cost-driven risks.
Mathematics 13 03001 g005
Table 1. Summary of representative studies in healthcare forecasting and inventory optimization.
Table 1. Summary of representative studies in healthcare forecasting and inventory optimization.
StudyApproachDomainLimitations
Tadayonrad & Ndiaye (2023) [4]Forecasting with reliability and seasonality indicatorsSupply chain analyticsNo integration with metaheuristics; assumes Gaussian residuals
Basciftci et al. (2024) [10]Two-stage stochastic programming with forecasting inputsCapacity expansionComplex optimization but limited domain-specific statistical modeling
Dwivedi (2025) [11]PSO and heuristic methods for supply chains in health crisesPharmaceutical logisticsOptimization only, lacks structured residual modeling
Li et al. (2023) [16]MLP-based neural forecasting modelsGeneral time series forecastingAccuracy but poor interpretability; limited transparency in clinical domains
Urjais Gomes et al. (2024) [13]DeepAR neural forecastingHealthcare-related univariate time seriesHigh accuracy but black-box nature, low explainability
Sina et al. (2023) [17]Systematic review of hybrid forecasting methods (ARIMA–LSTM, ARIMA–XGBoost, etc.)Cross-sector forecastingNot specific to healthcare; little integration with inventory policies
Bui & Hung (2023) [18]LSTM forecasting of surgical procedures to support planningHospital operating roomsMachine learning only; not integrated with inventory decisions
Vanbrabant et al. (2023) [19]Review of integrated decision problems in hospital supply chainsHospital supply chain managementFocuses on integration, not on hybrid forecasting or metaheuristics
Atcha, Vlachos & Kumar (2024) [20]Systematic review of inventory sharing in healthcare (39 studies)Healthcare supply chainsAddresses sharing mechanisms only; no hybrid forecasting–inventory link
Pathy & Rahimian (2023) [21]Resilient inventory optimization under demand disruptionsPharmaceutical supply chainsOptimization only; no hybrid demand models
Saha & Rathore (2024) [22]Multi-agent reinforcement learning for medicine inventory with demand dependenciesHospital pharmacyBlack-box nature; lacks explainability and skew/zero modeling
Sohrabi et al. (2023) [23]Robust fuzzy–stochastic programming with GA+SA metaheuristics for blood banks (equity considerations)Blood supply chainCase-specific; no explicit demand forecasting
Ahmadi et al. (2022) [24]Reinforcement learning (Q-learning, DQN) and GA for perishable pharmaceutical productsHealthcare supply chainsSimulation-based; no statistical–metaheuristic hybrid residual modeling
Li et al. (2020) [25]Integrated strategy: hybrid forecasting + multi-period ordering for red blood cellsBlood banksPreprint; limited clinical validation; no PSO or skew/zero residuals
Bandi, Han & Nohadani (2018) [26]Robust periodic-affine policies for uncertain demand (applied to pharma retail)Retail pharmaceutical supplyNot metaheuristic; older; no healthcare-specific hybrid forecasting
Table 2. Forecasting errors by item (test window: six months). MAE and RMSE from the proposed model, and MAE from the MLP benchmark. Full parameter estimates and model orders are provided in the Appendix A, Table A1.
Table 2. Forecasting errors by item (test window: six months). MAE and RMSE from the proposed model, and MAE from the MLP benchmark. Full parameter estimates and model orders are provided in the Appendix A, Table A1.
ItemModelMAERMSEMAEMLP
Lactic AcidSARIMAX–SN14.6616.9154.98
UreaSARIMAX–SN83.43107.38106.21
Valproic AcidSARIMAX–SN9.6711.567.05
AlbuminSARIMAX–SN31.8337.37110.67
AmylaseSARIMAX–SN14.6617.75216.82
AmmoniaSARIMAX–SN1.671.964.52
Direct BilirubinSARIMAX–SN268.53291.49279.15
Total BilirubinSARIMAX–SN283.80307.62302.48
CalciumSARIMAX–SN88.33104.99132.64
CarbamazepineSARIMAX–SN4.635.376.71
Total CKSARIMAX–SN51.1864.7377.04
CK-MBSARIMAX–SN78.9899.54118.62
HDL CholesterolSARIMAX–SN235.25264.34312.07
Total CholesterolSARIMAX–SN268.55309.61347.91
CreatinineSARIMAX–SN372.62445.61511.38
LDHSARIMAX–SN50.2463.7582.11
Plasma ElectrolytesSARIMAX–SN18.0022.0229.77
Rheumatoid FactorSARIMAX–SN25.0031.6041.92
PhenytoinSARIMAX–SN2.503.043.80
PhenobarbitalSARIMAX–ZISN1.001.441.62
Alkaline PhosphataseSARIMAX–SN277.70303.02341.28
PhosphorusSARIMAX–SN72.8484.27102.13
GGTSARIMAX–SN190.46202.71239.66
GlucoseSARIMAX–SN407.48488.97566.09
LipaseSARIMAX–SN19.2822.8429.53
LithiumSARIMAX–SN9.8411.1313.41
MicroalbuminuriaSARIMAX–SN113.75145.06181.72
Urea Nitrogen (BUN)SARIMAX–SN243.40271.03318.18
C-Reactive Protein (CRP)SARIMAX–SN103.15119.44148.31
Total ProteinsSARIMAX–SN135.16143.88183.02
CSF ProteinsSARIMAX–SN33.7155.4169.88
AST (GOT)SARIMAX–SN308.68340.83403.24
ALT (GPT)SARIMAX–SN307.64338.90401.77
TriglyceridesSARIMAX–SN249.18280.60333.45
Table 3. Forecasting performance across models (averaged over all determinations).
Table 3. Forecasting performance across models (averaged over all determinations).
ModelMAERMSESkew Sensitivity ( λ > 0 )
SARIMA (Gaussian residuals)126.3151.7
MLP (non-linear benchmark)136.25156.31
SARIMAX–SN/ZISN (ours)120.6144.232 / 34
Table 4. Forecast errors disaggregated by demand levels.
Table 4. Forecast errors disaggregated by demand levels.
Demand LevelMAERMSE
Low demand5.646.36
Medium demand61.0874.74
High demand271.36307.03
Table 5. Forecast accuracy across forecast window (1st to 6th step ahead).
Table 5. Forecast accuracy across forecast window (1st to 6th step ahead).
HorizonMAERMSE
195.12134.34
2224.37324.25
381.88121.58
4128.98190.36
5189.10268.17
698.06149.37
Table 6. Forecast error distribution across demand levels (MAPE).
Table 6. Forecast error distribution across demand levels (MAPE).
Demand LevelMAPE (%)
Low demand
Medium demand10.99
High demand9.34
Table 7. Optimized order quantities and inventory costs using PSO.
Table 7. Optimized order quantities and inventory costs using PSO.
Item k opt Q opt CT opt
Lactic Acid613201.1042 × 106
Urea1210,5603.8686 × 106
Valproic Acid001.2977 × 105
Albumin418,2402.4389 × 106
Amylase1941804.6866 × 106
Ammonia66003.3714 × 105
Direct Bilirubin15005.9327 × 105
Total Bilirubin420162.5705 × 106
Calcium631,5125.9841 × 106
Carbamazepine002.0806 × 105
Total CK546001.6286 × 106
CK-MB28005.0467 × 105
HDL Cholesterol660003.5444 × 106
Total Cholesterol751,2408.5303 × 106
Creatinine862,7208.6936 × 106
LDH729401.4554 × 106
Plasma Electrolytes5200,0001.5993 × 107
Rheumatoid Factor002.1741 × 105
Phenytoin001.3720 × 105
Phenobarbital12001.0345 × 105
Alkaline Phosphatase739201.9445 × 106
Phosphorus531,4007.4649 × 106
GGT527001.2014 × 106
Glucose873,9201.9952 × 107
Lipase215602.3944 × 106
Lithium613561.6285 × 107
Microalbuminuria767205.5914 × 106
Urea Nitrogen (BUN)844,8001.1041 × 107
C-Reactive Protein (CRP)36007.6610 × 105
Total Proteins528,8005.0090 × 106
CSF Proteins627002.4423 × 106
AST (GOT)742003.1010 × 106
ALT (GPT)742003.1197 × 106
Triglycerides633,8407.6132 × 106
Table 8. Comparison of monthly inventory costs under different procurement policies, highlighting the optimization impact.
Table 8. Comparison of monthly inventory costs under different procurement policies, highlighting the optimization impact.
PolicyAverage Monthly Cost (CLP million)
Empirical hospital policy179.5
SARIMA baseline (Gaussian residuals) + PSO32.1
Hybrid SARIMAX–SN/ZISN + PSO (proposed)19.6
Table 9. Top 5 PSO configurations by lowest total cost.
Table 9. Top 5 PSO configurations by lowest total cost.
ParticlesIterationswc1c2PSOExactGap%FeasibleL1 (k)ShareQTime (s)
201000.901.205.0311.38−55.80True190.200.06
203000.901.205.0311.38−55.80True190.200.17
501000.901.205.0311.38−55.80True190.200.14
503000.901.205.0311.38−55.80True190.200.34
1001000.901.205.0311.38−55.80True190.200.28
Table 10. Top 5 PSO configurations by smallest absolute cost gap vs. exact cost.
Table 10. Top 5 PSO configurations by smallest absolute cost gap vs. exact cost.
ParticlesIterationswc1c2PSOExactGap%FeasibleL1 (k)ShareQTime (s)
201000.501.8011.3811.380.00True01.000.06
203000.501.8011.3811.380.00True01.000.17
501000.501.8011.3811.380.00True01.000.14
503000.501.8011.3811.380.00True01.000.34
1001000.501.8011.3811.380.00True01.000.28
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rojas, F.; Yáñez, J.; Cortés, M. Hybrid Statistical–Metaheuristic Inventory Modeling: Integrating SARIMAX with Skew-Normal and Zero-Inflated Errors in Clinical Laboratory Demand Forecasting. Mathematics 2025, 13, 3001. https://doi.org/10.3390/math13183001

AMA Style

Rojas F, Yáñez J, Cortés M. Hybrid Statistical–Metaheuristic Inventory Modeling: Integrating SARIMAX with Skew-Normal and Zero-Inflated Errors in Clinical Laboratory Demand Forecasting. Mathematics. 2025; 13(18):3001. https://doi.org/10.3390/math13183001

Chicago/Turabian Style

Rojas, Fernando, Jorge Yáñez, and Magdalena Cortés. 2025. "Hybrid Statistical–Metaheuristic Inventory Modeling: Integrating SARIMAX with Skew-Normal and Zero-Inflated Errors in Clinical Laboratory Demand Forecasting" Mathematics 13, no. 18: 3001. https://doi.org/10.3390/math13183001

APA Style

Rojas, F., Yáñez, J., & Cortés, M. (2025). Hybrid Statistical–Metaheuristic Inventory Modeling: Integrating SARIMAX with Skew-Normal and Zero-Inflated Errors in Clinical Laboratory Demand Forecasting. Mathematics, 13(18), 3001. https://doi.org/10.3390/math13183001

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop