Introduction
Two-Stage Stochastic Integer Programs (2SIP) are essential for modeling decision-making under uncertainty, such as facility location planning where decisions must be made before demand is fully known. However, 2SIPs are computationally intensive because they require simultaneous consideration of numerous potential future scenarios. Traditional solvers often struggle with the scale of these problems, leading to long computation times. While machine learning (ML) offers potential speedups, existing approaches often fail to guarantee solution feasibility or lack the flexibility to handle complex first-stage constraints.
Methodology: The Representative Scenario Approach
This research proposes a novel supervised learning framework based on the conjecture that for any 2SIP, there exists a single "Representative Scenario" (RS). By solving a deterministic version of the problem using this predicted RS, an optimal or near-optimal first-stage decision can be obtained.
The workflow consists of three main steps:
- Feature Engineering: Raw problem data (costs, demand distributions) are converted into features representing variable and constraint interactions.
- Predicting the RS: Instead of predicting the solution directly, models (Linear Regression and Artificial Neural Networks) are trained to predict the parameters of the RS. This bypasses the "black box" feasibility issue common in direct ML predictions.
- Deterministic Optimization: The predicted RS is used in a standard solver (e.g., Gurobi) to solve a single-scenario problem. This ensures that the final solution is always feasible according to the problem's constraints.
Experimental Evaluation
The method was evaluated on the Stochastic Capacitated Facility Location Problem (S-CFLP) using 50,000 generated instances. Each instance involved 10 potential locations, 10 clients, and 50 demand scenarios. Ground truth for training was established using a specialized heuristic to identify the "true" RS for each instance by comparing the 2SIP optimal solution with various surrogate solutions.
Results and Discussion
The learning-based approach demonstrated significant improvements in computational efficiency without substantial loss in solution quality.
As shown in Figure 1, the ML-based methods (LR and ANN) achieve a solution quality comparable to Gurobi while operating orders of magnitude faster. Specifically, the LR approach solved problems in approximately 0.02 seconds, representing a roughly 400x speedup over Gurobi's average computation time of over 8 seconds.
Quantitative analysis in Figure 3 reveals that solutions from Linear Regression were, on average, within 0.64% of Gurobi's objective value. Notably, LR outperformed ANN in this task, suggesting that simpler linear models may generalize better for predicting representative scenarios in this domain. Furthermore, the ML methods occasionally found better solutions than Gurobi when the latter was constrained by a 2% optimality gap for time efficiency.
Conclusion
By predicting scenario parameters rather than solution vectors, this approach successfully combines the speed of machine learning with the feasibility guarantees of traditional optimization. Future work will focus on validating the "Representative Scenario" conjecture across other domains, such as power grid unit commitment, and establishing a formal mathematical foundation for the existence of such scenarios in non-linear problems.
Summary updated