# 7. Accounting for Uncertainty: Optimization Meets Reality In this chapter, we discuss the impact that uncertainty can have on optimization problem and argue that it is often necessary to account for it while formulating our models. In all the optimization problems discussed in the previous chapters, we treated the quantities in the problem description as exact, but, in reality, they can not always be trusted or assumed to be what we think. Uncertainty might negatively affect solutions to an optimization problem in the following forms. - estimation/forecast errors (increasingly important in ML-driven world): - in a production planning problem, future customer demand is a forecast; - in a vehicle routing problem, travel times along various roads are real-time updated forecasts; wind farm energy production level based on wind forecasts. - measurement errors: - a warehouse manager might have errors in the data records regarding current stock levels; - concentration level of a given chemical substance is different from expected. - implementation errors: - a given quantity of an ingredient is sent to production in a chemical company, but due to device errors, a slightly smaller amount is actually received; - electrical power sent to an antenna is subject to the generator's errors. Since there is so much uncertainty, natural questions are: - how to check how bad `not knowing the numbers exactly in advance` can be for the performance of solutions? - if a given solution is very sensitive to changes in the problem parameters, can a better solution be found by taking uncertainty into account in advance, and if so, how? We will show three examples of how one can inspect solutions for their sensitivity to data changes. * [Fleet assignment problem](fleet-assignment.ipynb) * [Robustness analysis of BIM production plan via simulations](bim-robustness-analysis.ipynb) Go to the [next chapter](../08/08.00.md) about robust optimization and to [Chapter 9](../09/09.00.md) about stochastic optimization.