Solving Contextual Stochastic Optimization Problems through Contextual Distribution Estimation
Abstract
:1. Introduction
2. Methodology
2.1. Contextual Stochastic Optimization Problem
2.2. The w-SAA Method
2.3. The Contextual Distribution Estimation Method
Algorithm 1. The pseudo-code of the contextual distribution estimation method. |
|
|
2.4. The Evaluation Metric
2.5. ML Methods
2.5.1. kNN
2.5.2. CART
- Input training dataset , hyperparameters , , and .
- For the training dataset of the current node:
- If the number of samples is less than :
- or if the tree depth is greater than or equal to :
- return a decision subtree and stop recursion at the current node.
- Otherwise, proceed to step 3.
- Traverse all feature dimensions and feature values of dataset , and select the feature dimension and value to split the dataset into two parts:
- which minimizes the sum of variances of the left and right subtrees:
- where .
- Recursively call steps 2–3 for the two datasets generated in step 3 until the termination condition is met.
2.5.3. RF
- Input training dataset with feature dimension and set the forest size .
- For each tree , training samples are randomly drawn from with replacement to form the training dataset for that tree.
- Build each decision tree using the CART algorithm.
- For each new observation, obtain the final prediction result by averaging the prediction results of all decision trees considered.
2.5.4. KR
3. Case Study
3.1. Energy Scheduling Problem and Its Mathematical Model
3.2. Introduction of Datasets
3.3. Model Training
3.4. Discussion
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Birge, J.R.; Louveaux, F. Introduction to Stochastic Programming; Springer Series in Operations Research and Financial Engineering; Springer: New York, NY, USA, 2011; ISBN 978-1-4614-0236-7. [Google Scholar]
- Qi, M.; Shen, Z.-J. (Max) Integrating Prediction/Estimation and Optimization with Applications in Operations Management. In Tutorials in Operations Research: Emerging and Impactful Topics in Operations; Chou, M., Gibson, H., Staats, B., Shier, D., Greenberg, H.J., Eds.; INFORMS: Catonsville, MD, USA, 2022; pp. 36–58. ISBN 978-0-9906153-7-8. [Google Scholar]
- Liu, Y.; Francis, A.; Hollauer, C.; Lawson, M.C.; Shaikh, O.; Cotsman, A.; Bhardwaj, K.; Banboukian, A.; Li, M.; Webb, A.; et al. Reliability of Electric Vehicle Charging Infrastructure: A Cross-lingual Deep Learning Approach. Commun. Transp. Res. 2023, 3, 100095. [Google Scholar] [CrossRef]
- Xu, M.; Di, Y.; Ding, H.; Zhu, Z.; Chen, X.; Yang, H. AGNP: Network-Wide Short-Term Probabilistic Traffic Speed Prediction and Imputation. Commun. Transp. Res. 2023, 3, 100099. [Google Scholar] [CrossRef]
- Qu, X.; Lin, H.; Liu, Y. Envisioning the Future of Transportation: Inspiration of ChatGPT and Large Models. Commun. Transp. Res. 2023, 3, 100103. [Google Scholar] [CrossRef]
- Zhen, L.; Xu, Z.; Wang, K.; Ding, Y. Multi-Period Yard Template Planning in Container Terminals. Transp. Res. Part B Methodol. 2016, 93, 700–719. [Google Scholar] [CrossRef]
- Zhen, L. Modeling of Yard Congestion and Optimization of Yard Template in Container Ports. Transp. Res. Part B Methodol. 2016, 90, 83–104. [Google Scholar] [CrossRef]
- Kleywegt, A.J.; Shapiro, A.; Homem-de-Mello, T. The Sample Average Approximation Method for Stochastic Discrete Optimization. SIAM J. Optim. 2002, 12, 479–502. [Google Scholar] [CrossRef]
- Elmachtoub, A.N.; Grigas, P. Smart “Predict, Then Optimize”. Manag. Sci. 2022, 68, 9–26. [Google Scholar] [CrossRef]
- Bertsimas, D.; Koduri, N. Data-Driven Optimization: A Reproducing Kernel Hilbert Space Approach. Oper. Res. 2022, 70, 454–471. [Google Scholar] [CrossRef]
- Shapiro, A.; Dentcheva, D.; Ruszczyński, A. Lectures on Stochastic Programming: Modeling and Theory; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2021; ISBN 978-0-89871-687-0. [Google Scholar]
- Tian, X.; Yan, R.; Wang, S.; Liu, Y.; Zhen, L. Tutorial on Prescriptive Analytics for Logistics: What to Predict and How to Predict. Electron. Res. Arch. 2023, 31, 2265–2285. [Google Scholar] [CrossRef]
- Bertsimas, D.; Kallus, N. From Predictive to Prescriptive Analytics. Manag. Sci. 2020, 66, 1025–1044. [Google Scholar] [CrossRef]
- Wang, S.; Yan, R. “Predict, Then Optimize” with Quantile Regression: A Global Method from Predictive to Prescriptive Analytics and Applications to Multimodal Transportation. Multimodal Transp. 2022, 1, 100035. [Google Scholar] [CrossRef]
- Sadana, U.; Chenreddy, A.; Delage, E.; Forel, A.; Frejinger, E.; Vidal, T. A Survey of Contextual Optimization Methods for Decision-Making under Uncertainty. Eur. J. Oper. Res. 2024, S0377221724002200. [Google Scholar] [CrossRef]
- Ifrim, G.; O’Sullivan, B.; Simonis, H. Properties of Energy-Price Forecasts for Scheduling. In Principles and Practice of Constraint Programming; Milano, M., Ed.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2012; Volume 7514, pp. 957–972. ISBN 978-3-642-33557-0. [Google Scholar]
Set: | |
---|---|
Planning horizon, | |
Parameters: | |
Uncertain energy price per unit in period , | |
Base cost of producing one unit of energy, | |
Production capacity (maximum output) per unit time, | |
Decision variables: | |
Production quantity in period , | |
Production cost in period , , defined as a piecewise function of the production quantity . When lies in the intervals of [0,5], (5,10], (10,15], (15,20], the cost per unit of production in the corresponding interval is , respectively; that is | |
Total cost within the planning horizon, |
Notation | Practical Meaning | Range |
---|---|---|
month_of_year | ||
week_of_year | ||
day_of_week | ||
hour_of_day | ||
holiday_flag | ||
forecast_wind_production | ||
forecast_system_load | ||
forecast_system_marginal_price | ||
CO2_intensity | ||
fuel_price |
Model | Hyperparameters | Search Range | Optimal Value |
---|---|---|---|
kNN | k | {1, 2, …, 50} | 36 |
CART | max_depth | {8, 10, 12, 14} | 10 |
min_samples_split | {5, 10, 20, 30} | 20 | |
min_samples_leaf | {2, 5, 10, 15} | 5 | |
RF | n_estimators | {100, 200} | 100 |
max_depth | {8, 10, 12} | 12 | |
min_samples_split | {5, 10, 20} | 10 | |
min_samples_leaf | {2, 5, 10} | 2 | |
KR | bandwidth | {1, 2, …, 20} | 4 |
Model | Hyperparameters | Search Range | Optimal Value |
---|---|---|---|
kNN | k | {1, 2, …, 50} | 38 |
CART | max_depth | {8, 10, 12, 14} | 10 |
min_samples_split | {5, 10, 20, 30} | 30 | |
min_samples_leaf | {2, 5, 10, 15} | 5 | |
RF | n_estimators | {100, 200} | 200 |
max_depth | {8, 10, 12} | 12 | |
min_samples_split | {5, 10, 20} | 5 | |
min_samples_leaf | {2, 5, 10} | 2 | |
KR | bandwidth | {1, 2, …, 20} | 2 |
kNN | CART | RF | KR | |
---|---|---|---|---|
w-SAA | 12,887.14 | 4753.40 | 4261.88 | 18,191.83 |
distr_esti | 13,120.69 | 4783.65 | 4408.60 | 12,668.46 |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tian, X.; Jiang, B.; Pang, K.-W.; Guo, Y.; Jin, Y.; Wang, S. Solving Contextual Stochastic Optimization Problems through Contextual Distribution Estimation. Mathematics 2024, 12, 1612. https://doi.org/10.3390/math12111612
Tian X, Jiang B, Pang K-W, Guo Y, Jin Y, Wang S. Solving Contextual Stochastic Optimization Problems through Contextual Distribution Estimation. Mathematics. 2024; 12(11):1612. https://doi.org/10.3390/math12111612
Chicago/Turabian StyleTian, Xuecheng, Bo Jiang, King-Wah Pang, Yu Guo, Yong Jin, and Shuaian Wang. 2024. "Solving Contextual Stochastic Optimization Problems through Contextual Distribution Estimation" Mathematics 12, no. 11: 1612. https://doi.org/10.3390/math12111612
APA StyleTian, X., Jiang, B., Pang, K. -W., Guo, Y., Jin, Y., & Wang, S. (2024). Solving Contextual Stochastic Optimization Problems through Contextual Distribution Estimation. Mathematics, 12(11), 1612. https://doi.org/10.3390/math12111612