Optimization with uncertainties: a scheduling example

The optimization of manufacturing systems is rarely a deterministic task in practice, as uncertainties of various origins often have significant impact on the feasibility or quality of a production plan. The decision making process is often a complex multi-stage mechanism that anticipates and reacts to numerous parameter changes, both internal and external. Such optimization problems and the corresponding approaches are often classified and categorized based on the features of the addressed uncertainties and the desired objective. The goal of this paper is twofold. First, a systematic approach is presented to enumerate the possible optimization problems for a given set of uncertainties and degree of freedom in the planning. This approach is illustrated via a scheduling example that is inspired by literature case studies and focuses on financial objectives with varying demands and prices in the market. Then, selected problem classes identified by the approach are discussed in detail, illustrating and examining the available techniques to tackle them, citing literature studies applying the same or similar approaches.

[h] processing time of task i ∈ I in unit u ∈ U i b p [t] (maximal) batch size for product p ∈ P lb p [t] lower bound for demand of product p ∈ P ub p [t] upper bound for demand of product p ∈ P d p [t] market demand for product p ∈ P d p,s [t] expected demand for product p ∈ P in scenario s ∈ S s p cu∕t selling price for product p ∈ P s p,s cu∕t selling price for product p ∈ P in scenario s ∈ S o p cu∕t overproduction cost for product p ∈ P o p,s cu∕t overproduction cost for product p ∈ P in scenario s ∈ S u p cu∕t underproduction cost for product p ∈ P u p,s cu∕t underproduction cost for product p ∈ P in scenario s ∈ S n p,c Number of batches produced from p ∈ P in configuration c ∈ C Variables b p ≥ 0 Variable for batch size for product p ∈ P q p ≥ 0 Variable for produced quantity of product p ∈ P q o p ≥ 0 Variable for overproduction of product p ∈ P q o p,s ≥ 0 Variable for overproduction of product p ∈ P in scenario s ∈ S q u p ≥ 0 Variable for underproduction of product p ∈ P q u p,s ≥ 0 Variable for underproduction of product p ∈ P in scenario s ∈ S x c,s Binary variable denotes whether batch configuration c ∈ C would be selected in scenario s ∈ S w s ≥ 0 Aggregated objective variable for scenario s ∈ S Real-life operation and optimization of production systems almost always have to deal with several uncertainties.Scheduling problems arising in the industry are no exception.Many papers in the literature discuss various approaches to tackle these uncertainties in both scheduling and other fields of process optimization.The goal of this paper is twofold: • First, a generalized way of looking at the decision making process is presented.
Based on this aspect, a systematic approach can be derived to enumerate the possible problem classes regard to the sets of inputs given and decisions to be made.• This approach is demonstrated with an illustrative scheduling problem class that aims to maximize profit.Some of the generated problem classes feature uncertainties, and the possible techniques to address them are discussed for some classes.
The paper is structured as follows: the rest of the section provides a literature review of batch process scheduling (Sect.1.1), followed by a brief review of addressing uncertainties in the production industry (Sect.1.2).The end of this section, Sect.1.3 discusses advancement on the intersection of the two fields above, scheduling with uncertainties.
Section 2 provides the definition of an illustrative scheduling problem class that will be used later for demonstration.The proposed abstraction to decision making processes is presented in Sect.3. Section 3.2 details the problem class enumeration procedure based on this abstraction.The problem class from Sect. 2 is used as an illustrative example.
Selected problem classes (referred to as cases) are investigated in detail in Sect. 4. These cases are selected in a way to highlight deterministic, reactive, and preemptive techniques in scheduling.At the end of the paper, the conclusions are drawn.

Batch process scheduling
Scheduling is an often used decision-making process in many and different kinds of manufacturing and services industry, where in a given time period the allocation of resources to different tasks is dealt with the goal to optimize one or more objectives.Resources can take many different forms, tasks may be the operations, activities, stages or executions of different kinds of processes.Objectives can also take several shapes and forms, like minimization of completion time of several tasks.In industrial environments, the processes take place within a given framework, but due to the different environmental effects and other factors, there is always the possibility of a certain degree of uncertainty.
Multi-purpose batch production plants are characterized by flexibility and variety in production, which can be used to meet customer demands and with the variety of different production paths to reduce production costs.Due to their diversity, they can be categorized in several ways (Méndez et al. 2006).Problem definition consists of three types of information, which are the recipe per product, the assignment of tasks to equipment, and the quantities to be produced from the products.The recipe contains the minimum information needed to manufacture the product, which is a unique description of specific product manufacturing requirements.Depending on user requirements, the following four levels are used in batch processes: • General recipe identifies the raw materials, their quantity and the required processing tasks.• Site recipe is a general recipe supplemented with site information, which means site-specific information • Master recipe contains information about the required equipment, raw materials with the required quantities and the process of product production.
• Control recipe contains additional information about the production units.This recipe is derived from the master recipe.
Of the four types, the master recipe is applied during the batch process scheduling, which can be represented by a graph where nodes denote the production tasks and arcs denote the relationships between them (Sanmartí et al. 2002) (Hegyháti and Friedler 2010).

Uncertainty in process optimization
As the complexity of the processes increases, so does the likelihood of uncertainty, which requires special attention.There are several solutions for dealing with uncertainty, but to use them first, it is necessary to identify the uncertainty, which provides a preliminary determination and understanding of the hypothetical cause.Each can be classified into separate categories according to certain aspects.The source of 1 3 Optimization with uncertainties: a scheduling example uncertainty can be a dynamic event, which has the following categories (Suresh and Chaudhuri 1993): • Workpiece related events: random job arrival, non-deterministic processing time • Machine related events: machine breakdowns, loading limits • Operation related events: operation delays, unstable production • Other events: operator absence, defective materials Another approach is that uncertainty is not simply a lack of knowledge.On the one hand, uncertainty can arise from inadequate information, which can be of the following types: inexactness, unreliability, and border with ignorance.On the other hand, there are situations where information is abundant, yet there is uncertainty (Van Asselt and Rotmans 2002).Expanding and decreasing information can further increase or decrease uncertainty.Increasing the necessary information in complex processes can put already established processes into a new perspective, about which additional knowledge can be used to identify additional uncertainties, which may mean that our knowledge is limited and insufficient, or the process is more complex than it used to be (Sluijs 1997).Uncertainties resulting from this knowledge-based deficiency can also appear in the model in several ways.Several general locations can be identified to establish the occurrence of uncertainty in the outcome (Walker et al. 2003): • In the problem-making phase of the model, the context is defined, which is particularly important in the decision support practice (Dunn 2018).• The model uncertainty can be divided into two parts: the model structure uncertainty and the model technical uncertainty, which is the uncertainty arising from the computer solution (Sluijs 1997).• It is sometimes worthwhile to classify the inputs of the model into controllable and uncontrollable categories, depending on whether it is possible to influence the values of the input variables.• The method used to calibrate the model parameters is associated with the uncertainty of the parameters (Harremoës and Madsen 1999).• The output of the model may include uncertainty, referenced as model outcome uncertainty, which can appear to the interest to the decision maker as cumulative uncertainty (Bankes 1993).
Additional uncertainty factors must also be taken into account, but the main factors can be summarized based on the aforementioned (Bakon et al. 2022).The identification of uncertainty is crucial in constructing the appropriate model, as ignoring it can lead to misleading or bad results, the consequences of which are revealed after decisions are made.

Uncertainty in batch process scheduling
To deal with uncertainty, it is necessary to distinguish between static and dynamic scheduling.In the case of a static schedule, the data are known in advance and the schedule is fixed.The origin of the uncertainty can arise from several factors, as mentioned earlier, therefore a dynamic schedule is required to address it as the schedule plan must be modifiable.
• Proactive approach To address uncertainty, it is achieved through modeling solutions or by optimizing its performance under different scenarios (Liu et al. 2007;O'Donovan et al. 1999).• Reactive scheduling A preliminary schedule is required to start, which is modified or re-optimized when the uncertainty parameters are realized or an unexpected event occurs (Mihoubi et al. 2021).• Stochastic scheduling In the case of available information about the uncertainty, stochastic variables can be used with probabilistic description when implementing a deterministic model (Ma et al. 2021).• Fuzzy programming In the event when historical data is not available or the probability distribution is unknown, fuzzy programming can handle the uncertainty.Instead of using stochastic variables, a fuzzy programming implementation is used (Balasubramanian and Grossmann 2003;Prade 1979).• Robust scheduling During robust scheduling steps, the impact of disturbances on performance should be minimized by incorporating uncertainties into the model describing the scheduling task.This makes the schedule less sensitive to various distractions.Two fundamental aspects of optimization are solution robustness and quality robustness (Herroelen and Leus 2005).
In the case of a production system, the rework process is important if several aspects support the need to achieve better results.In case of semi-finished and finished products, when the objective is to minimize inventory cost, determining the optimal batch size is of paramount importance (Sarker et al. 2008).To reduce inventory cost if inventory is depleted at certain intervals in the production stage, an approach can be made that provides a solution for equal-and unequal-sized batch deliveries (Glock 2010), which can result in lower total costs.In the case of a twostage production system, supplementing the solution with a variable that can properly measure the production rate may be a good solution to reduce excess inventory (Glock 2011).There are several other solutions in the literature where the batch sizing problem is solved.Such a solution could be a holistic scheduling algorithm (Bicheno et al. 2001), or in the case of a single-stage system due to defective items (Jamal et al. 2004) and in the case of multi-stage manufacturing systems solving the optimal batch sizes (Sarker et al. 2008).Investigating the implementation of Just-In-Time, where batch-sizing decisions (McKenzie and Jayanthi 2007) have an impact on different demand patterns from an operational and financial point of view adequate results were achieved.Similarly, if the Just-In-Time scheduling problem is approached from a general due date perspective, solution is achieved by treating it as an integrated batch sizing problem (Hazır and Kedad-Sidhoum 2014).
Optimization with uncertainties: a scheduling example Distributionally robust optimization based models can provide sufficient flexibility for random demands to adjust resource actions (batch sizes) in multi-stage decisionmaking (Shang and You 2018).Adjusting batch sizes to dynamic events entails frequent adjustments of job sequence, which can be avoided with a buffering mechanism (Qin et al. 2018).In Chemical, Petrochemical and Pharmaceutical Indsutries, risk mitigation approaches have the ability to explicitly take into account parameter uncertainty within a mathematical framework (Verderame et al. 2010).Demand uncertainty can be addressed with stochastic models, which can allow uncertain product demand correlation with the objective of profit maximization (Petkov and Maranas 1997).In short-term scheduling of multiproduct and multipurpose batch plants, the schedule from a multiperiodic formulation has much bigger robustness compared to the one determined based on the vertexes of the uncertainty range, considered as scenarios (Vin and Ierapetritou 2001).For due date changes, adopting discrete-time simulation method for minimizing responsiveness and tardiness is a viable solution in precast concrete structures (Kim et al. 2020).With prefabricated construction productivity and on-time delivery of precast components, a real case study can be conducted to test the validity of a two-level rescheduling model and achieve significant cost savings (Wang and Hu 2018).The applicability of two-stage adaptive robust optimization approaches are demonstrated on two case studies by introducing uncertain parameters (processing time, order demand) into the singlestage deterministic model and reformulating it into a two-stage batch scheduling model (Shi and You 2016).Polynomial-time efficient algorithms can be proposed for single-machine scheduling problems with serial and parallel batches under uncertain processing times using worst-case scenario analysis (Wu et al. 2023).
For a single machine with availability constraints, where the machine suffers from unexpected breakdowns, a genetic algorithm by integrating a run-based preventive maintenance into the production scheduling model can optimize system robustness and stability with experimental results (Lu et al. 2015).Demand uncertainty may be represented by scenario trees in a multi-stage stochastic programming model with lot-sizing (batch size for each product) and overall system costs (production cost, setup cost, inventory cost, backlog cost) (Hu and Hu 2018).The results of a case study with two-stage sotachastic programming model for a manufacturing company producing braking equipment in automotive industry has showed that production quantity is more sensitive to the uncertainty than production sequence (Hu and Hu 2016).A combination of a mixed-integer linear programming and an agent-based reactive scheduling method can be used to minimize total cost of inventory holding and production setup, where processing times are uncertain (Chu et al. 2015).
Rescheduling is traditionally viewed as an approach if uncertainty is present, but the event-triggered rescheduling has some shortcomings (constantly incoming new information), which can be addressed by approaching the rescheduling as an online problem (Gupta et al. 2016).

Illustrative scheduling problem class
The problem class selected for illustration is the mid-term scheduling of a production plant with an economic objective.The goal is to find a production schedule that fits into the predefined time horizon and maximizes the expected profit that derives from the following components: • Income by selling the produced products • Penalties if market demand is not met, or exceeded There are several possible products produced via precedential recipes by the available units.For the sake of simplicity, processing is the only step with time requirements.Cleaning, transportation, etc. are considered to be instantaneous.The core sets and parameters of the problem can be summarized as: To help to understanding the notations, an instance of this problem class is presented.Figure 1 shows the recipe of this instance which contains 3 products ( P = {A, B, C} ).Product A has a sequential production recipe with 3 produc- tion steps ( I A = {i1, i2, i3} ), product B also has a sequential production recipe with 2 production steps ( I B = {i4, i5} ) and the recipe of product C has 4 tasks Optimization with uncertainties: a scheduling example ) and it is not sequential.The recipe contains 4 processing units ( U = {u1, u2, u3, u4} ), which can be used for production.Tasks i1 and i6 can be per- formed by two processing units (u1, u2) where the processing time of task i1 is 4 h and the processing time of i6 is 8 or 9 h using u1 or u2, respectively.Task i6 generates 2 intermediates and task i9 has 2 prerequisite tasks (i7, i8). Figure 1 does not contain all information of the system, like cost parameters.The parameters of the products and tasks are summarized in Tables 1 and 2, respectively, and the time horizon (h) is 55 h.

General concepts
From an abstract point of view, the difference between deterministic and stochastic problems comes down to the timing of the revelation of the values of input parameters and when certain decisions have to be made.
In the deterministic case, the values of all of the input parameters are known in advance, i.e., their values are revealed before any decision is made.In contrast, stochastic problems have some input data, whose value is revealed later than others, and some decisions have to be made between these two timings.The data that reveals themselves after some decisions have been made are often called uncertain.
If all of the decisions have to be made before the uncertain data reveal themselves, the approach is non-reactive.Robust and preventive approaches belong to this category, and the differentiation often lies in the selected objective function.However, if some decisions can be made or altered after an uncertain input is revealed, the approach is reactive.
Note, that unexpected events, such as unit shutdowns are within the scope of the description above.Such events could be considered as new, however, they can also be looked at as predefined parameters that reveal their values later.For example, possible shutdowns can be considered as boolean parameters for each task, which either turn out to be 0 or 1 at the time of their execution.
More often than not, if uncertain values are revealed later, there is still some information available on their possible values.These can be based on a predictive simulation, historical data, assessment from experts, etc.The level of detail of this information can vary a lot, and can influence the approach to be used.In this paper we will focus on the following options: Estimated value-Only a single value is prognosed, which may be the mean or median value.Interval -An interval is given for the possible values of the parameter, but no information is available about the probability distribution within that interval.Probability distribution -A continuous or discrete probability distribution function is given for uncertain parameters.
Naturally, not all of the above are applicable for all cases, e.g., an interval prediction for a binary variable is trivial.However, the detailedness of this information can highly influence the possible objectives and approaches that can be developed.For example, without an interval, it is theoretically impossible to develop a robust approach with the worst case as an objective or bound.Similarly, expected values can only be incorporated into the approach if some distributions on the contributing values are available.From the practical point of view, the difficulty to assess this data can vary a lot based on the parameter, and may be unreasonably expensive to do so.

Enumeration procedure on the illustrative problem class
From the theoretical point of view, if there are n inputs and m decisions, there are (n + m)! different orders of them, that could be considered as different prob- lems.From the planners' perspective, some of these orders can be considered the same.A decision can only rely on data that has already been revealed, therefore if two decisions are neighbors in an ordering, swapping them will not alter the information available for either of them.This can reduce the number of cases by magnitudes.
Moreover, in practice, input parameters are often revealed in larger groups, and some decisions also have to be made simultaneously.For illustration, let us split 1 3 Optimization with uncertainties: a scheduling example both the decisions and inputs of the considered illustrative problem class into two such groups: D S : the set of decisions related to scheduling, such as choosing the number of batches to be produced, and the assignment, sequencing, and timing of each task.D B : the set of decisions determining the size of each batch.I P : all the process data including recipes, processing times, task-unit compat- ibilities, etc. (U, P, b p , I p , I − i , U i , pt i,u , h).I M : market related parameters describing demand, sell price, and costs for over-and underproduction ( s p , o p , u p , d p ).
The idea behind this separation is that while I M may change on a daily basis, I P is more stable.Similarly, a facility often prepares the schedule ( D S ) in advance for a week or so, and may only do small adjustments on a daily basis, which in this case is considered to be the sizing of the batches ( D B ).
Having these four groups, 4! = 24 different orders could have been considered, as illustrated in Fig. 2. Each order represents a different problem class, which will be referred to as cases in the rest of the paper.For a more expressive visualization, decision-items have orange background color, while information-items have green.The connected cases can be transformed into each other by swapping two neighboring items.The connections by swapping non-neighboring items are omitted from the Figure for transparency, as it would mean an additional 36 edges.
As mentioned before, some of these cases can be considered identical, as the decision-items have the same information available for them.These groups of cases are indicated by gray areas in Fig. 3.For example, the following four orders all Removing these duplications, 14 cases remain, which are summarized in Table 3.Not all of the cases have equal practical significance: • Scheduling before any process data are available is meaningless, which eliminates cases 5, 7-11, 13. • In cases 5-7, 10, and 13, market parameters are known earlier than process parameters.While not completely impossible, these cases will be omitted from discussion as market environment data are usually much more volatile than process data.• The remaining are cases 12 and 14, where batch sizing data have to be made a-priori.A valid scenario that could be described by these cases is when the sizes Optimization with uncertainties: a scheduling example of the units have to be decided in the design phase of a plant, and scheduling decisions have to be made much later without the option of scaling the processes down.From the scheduling point of view, these are cases when the batch sizes are fixed.
Note, that in some cases, the decision maker is in a better position than in others.Clearly, the deterministic case ( ID ) is the most advantageous among all of them, when all of the information is available before any decision has to be made.This relation can be defined formally and forms a partial ordering, with the deterministic case being the maximal element, and case 8 as the minimal.In the current context, it is more expressive to talk about stronger and weaker cases instead of larger and smaller ones.Informally, a case is stronger than another, if the decision maker has always at least as much or more information available for all of the decisions than in the other case.(Formally, case X is stronger than case Y, if for all D-type items, the set of I -type items preceding it in case Y is a subset of those in case X.) Obviously, identical cases are equally strong and form equivalence classes.
In Fig. 4, this ordering is represented by the direction of the arcs.Transitive arcs are omitted for transparency.
Another layout of the same network in Fig. 5 better indicates the strongness hierarchy, and the selected cases for Sect. 4 are also indicated.

Evaluation of selected cases
The 4 selected cases will be discussed in detail in this section.The main aspects of the investigation will focus on • Complexity -How many variables or constraints a proposed model may require compared to the baseline.• Reusability -In a practical setting, how much of the effort needs to be repeated if the problem is solved on a daily basis with changed data.• Generalizability -How easy, solvable it is if the profit function is generalized.

ID deterministic case
This is the strongest case that can serve as a baseline.All information is known in advance, thus the model is deterministic.The problem can be formulated as a mixed-integer linear programming problem easily.Depending on the type of model used (precedence-based, discrete, continuous, etc.) the number of continuous and binary variables, as well as the number of constraints may vary a lot.
The profit function according to the base problem defined in Sect. 2 is: where q p indicates the produced quantity from product p ∈ P .This is a piecewise linear function for each product with two pieces: above and below d p .For better understanding Fig. 6 shows the profit function of a product and Fig. 7 shows the profit function of 3 products.This function can be modeled in different ways: a binary variable may be introduced for each product for the selection of the segments, or two non-negative continuous variables can be introduced for under-and overproduction, and the profit is reformulated as: where q o p and q u p are non-negative continuous variables that model max(0, q p − d p ) and max(0, d p − q p ) , respectively.1This also means that q p must be replaced by d p + q o p − q u p everywhere else in the model.It is also important to note, that the evaluation of the profit (and thus o p , u p and s p ) only appears in the objective function, and they have no influence on the other parts of the model.This has two beneficial consequences.
If the I M variables change for the next day, the solution acquired before will still be feasible if the q o p and q u p are shifted with the change in demand.This means that with this simple preprocessing step, a feasible solution for the MILP model is available, providing an initial upper bound.Since this solution is primal feasible, the bound can be improved by running the second phase of the simplex algorithm to The profit function of three products achieve higher profit by allowing to change only the mass related continuous variables, while keeping discrete scheduling variables and continuous timing variables fixed.
The other benefit is, that if a more complex profit evaluation is needed to model the real life example, properly it will only appear in the objective function.Thus, for example, if this function is quadratic in nature, the problem can still be formulated as a Mixed Integer Quadratic Programming (MIQP) problem (Bonami et al. 2018;Mencarelli and D'Ambrosio 2019).Modern solvers such as CPLEX or Gurobi can solve MIQP problems with some solver specific restrictions.For example in case of CPLEX the objective function can contain quadratic terms and it must be convex or the objective function can contain only quadratic terms which are products of binary variables (in this case, the objective function is not necessarily convex).Moreover, the constraints must be inequalities and the constraints that contain a quadratic term can be represented as second order cone programs (SOCP) or the quadratic term in a constraint involves only multiplication of binary variables.2In the case of multiobjective problems, formulating the problem as MILP or MINLP, Pareto optimal solutions can be achieved with the CPLEX or BARON solver (Capón-García et al. 2011).

I P DI M market-sensitive scheduling and batch-sizing
In this case, one has to make the scheduling and sizing decisions before the market data reveals itself.Unlike in the deterministic case, it becomes important what kind of information is available about the the uncertain values.

Expected demand
The simplest option is if a value is estimated, and then the goal of the optimization is to maximize profit for that scenario.This situation is equivalent to the deterministic case from the mathematical point of view.

Demand interval
A slightly more detailed option is, if there is an interval [lb p , ub p ] available for each uncertain variable.Then, for each production plan, a worst-case and a best-case scenario can be evaluated.If an estimated case is also available within the interval, an "expected-case" is also available.These values give rise to several optimization objectives, for example: 1 3 Optimization with uncertainties: a scheduling example • Maximizing expected-or best-case while having a lower bound on the worstcase • Maximizing worst-case Maximizing the worst-case scenario is simple, as it will happen at one of the ends of the given interval, whether q p is inside it or not.Thus, one can add the profit expressions as in the deterministic case once with d p = lb p and then with d p = ub p for each product.Then, for each product a new profit variable is introduced as the lower bound of these two cases.These continuous variables are then summed in the maximization objective.
Implementing a lower bound on the worst case can be done in a similar fashion.The only difference is that the sum mentioned previously is present in a constraint with this lower bound.Maximization of the expected case is the same as the deterministic case.Maximizing the best case is similar, with the only difference that if q p is within the interval, then d p can be equal to it.If q p < lb p , then the profit should be calculated as if d p = lb p .The situation is similar if q p > ub p .This can be done easily if q o p models max(0, q p − ub p ) (instead of max(0, q p − d p ) ) and q u p does the same for max(0, lb p − q p ) .Note, that this modeling trick does not allow to use d p + q o p − q u p instead of q p in the other parts of the model anymore.One should add a new bounded q � p ∈ [0, ub p − lb p ] variable, and use d p + q o p − q u p + q � p instead.

Discrete demand distribution
In some cases, the probability distribution of the uncertain values can be estimated with a (finite) discrete distribution function.For the sake of simplicity, let us assume that there is a finite set of scenarios, S, and the expected values of all of the uncertain variables are given for all of the scenarios.In a more complex case, some sets of uncertain variables would have their scenarios independently.However, having independent scenario sets S , S 2 , … would only translate to For each s ∈ S , there is a probability assigned, P(s) such that ∑ s∈S P(s) = 1.Evaluating the profit would require separate q o p,s and q u p,s variables for each scenario, s ∈ S , which would model max(0, q p − d p,s ) and max(0, d p,s − q p ) , where d p,s is the expected demand in the scenario.In the objective function there is just a weighted version of the original objective for each scenario: where s p,s , u p,s , and o p,s are the price, under-and overproduction costs for product p ∈ P in the scenario s ∈ S .Figure 8 shows an aggregate profit function of a product in case of three scenarios with probabilities 0.4, 0.5 and 0.1.
Thus the model requires 2 ⋅ (|S| − 1) additional continuous variables, and the constraints for setting them.Note, however, that these variables are strongly bound together, as for all s ∈ S , d p,s + q o p,s − q u p,s must represent the same value, q p that is independent from s.
Incorporating continuous distribution functions into an MILP model is impossible expect for trivial cases.Regardless of the detail of the information on the market data, if it changes, re-running the model is equally time consuming as it was in the deterministic case.Similarly, considering a more complex cost function is possible within similar limits as in the deterministic case.
Note, that the ideas above are general, not specific to the illustrative example.If there are uncertain variables and variables that depend on them, the scenario-based approach can be used in the same way even if those variables are binary decision variables.
Scenario-based approach is applied with uncertainty of the number of jobs using MILP and branch-and-price algorithm to minimize the expected costs (Wullink et al. 2004).Similarly, with uncertain time requirements of elective operations in theater scheduling decisions with the objective to maximize the expected profit is applied in (Freeman et al. 2016).Data-driven uncertainty set with probability distributon for market demand is used to maximize the net present value at each time period in Ning and You (2017).
Optimization with uncertainties: a scheduling example

I P D S I M D B market-reactive batch-sizing
This case represents a middle point between the previously discussed cases, as it is clearly visible in Fig. 5. Compared to the deterministic case in Sect.4.1, it is weaker, as scheduling decisions have to be made before market information is available.On the other hand, it is a stronger case than the market-sensitive one from Sect.4.2, as the decision maker has the ability to react on the market information with the decisions about batch sizing.If the possible outcomes from I M are finite, a two-stage model can be easily for- mulated.For example, having a finite set of scenarios, S, as discussed in a previous section.In such a situation, for each variable, x that either represents a decision from D B or a calculated value based on those variables, a set of variables, x s has to be introduced, where s ∈ S .Obviously, q u p and q o p would be such derived variables, and any variables they derive from, possibly the independent sizing variables for the batches.Thus, instead of q o p and q u p , several ( 2 ⋅ |S| to be precise) variables are intro- duced, denoted by q o p,s and q u p,s , respectively for s ∈ S .This is similar to expected profit maximization discussed in the previous chapter.However, a key difference is that these variables are more independent, as d p,s + q o p,s − q u p,s (representing q p,s ) can be different for each scenario.
Any constraint that involves any of these variables have to be added multiple times for all s ∈ S , as well.For example, if an objective variable, w s is introduced, the following constraints may be added: Having these variables, an expected profit can simply be expressed as ∑ s∈S P(s) ⋅ w s .Imposing a lower bound on the worst case situation can be done by setting the lower bound for all w s variables.If the worst case is to be maximized, a new variable w may be introduced with w ≤ w s for all s ∈ S , and then this variable is maximized.
Note, that this approach can significantly increase the size of the model, and thus, its computational need.Let us say that B variables represent or are infected by decisions from D B and ̄ B are not.Similarly, let B denote the number of constraints that have any of those B variables, and ̄ B those that rely only on the non-affected variables.
In the market-sensitive case from the previous section, the model would have B + ̄ B variables and B + ̄ B constraints.In the scenario-based market-reactive case, the model has |S| ⋅ B + ̄ B variables and |S| ⋅ B + ̄ B constraints.Clearly, by increasing the number of scenarios the complexity of the model increases, as well.This presents a practical trade-off between having a solvable model and having a more detailed scenario distribution that models the uncertain variables better.
Naturally, the number and type of those B variables and B constraints are significant.In this illustrative example, only a small portion of the variables is affected, and all of them are continuous.Similarly, only a few equality constraints are affected by those variables.Most of the variables and constraints deal with scheduling decisions, such as timing, allocation, precedence, etc, that are unaffected by D M .Thus, Note, that the idea above can be generalized to three-stage, four-stage, ..., n-stage cases, as well, that do not appear in our illustrative example.Let us consider a I 0 D 1 I 1 … D n I n case, where k variables are affected by D k but unaffected by D k+1 , … , D n , and the outcome for each I l is approximated by l scenarios.For the sake of simplicity, it is assumed, that these scenarios are independent from each other.In this case, there would be only one version of the 1 variables only affected by D 1 , 1 different version of all of the variables affected only by D 1 and D 2 , as in the above case.For the variables that are affected by D 1 , D 2 and D 3 , 1 ⋅ 2 different versions must be added, and so on.Finally, the n variables that are affected by D n have a total number of 1 ⋅ 2 ⋅ ⋯ ⋅ n−1 .Altogether, the total number of variables is: As an illustration, Table 4 shows the number of variables for several n values while considering that k = 1 and the number of scenarios for each stage is also uniform, e.g., k is independent of k and simply denoted by .In this simplified case the above 3 Note, that S is not necessarily ̄ B , as some redundant calculated variables may are affected by both set of decision variables.

3
Optimization with uncertainties: a scheduling example formula reduces to n ⋅ ∑ n−1 k=0 k .Also, if the case were deterministic, the original number of variables would be n in each case, which is the same as if = 1.
Re-running these models can be exhaustive, however, in this particular example, if the number of feasible solutions for the part of the model with ̄ B variables and ̄ B constraints are manageable, a two-stage solution approach can be implemented.First, the feasible solutions to this part of the model are generated and saved.This is a time consuming process, but it has to be done only when I P changes, which is rare.Next, each time the predictions on I M change, the only remaining part of the model needs to run for all of the saved schedules.Obviously, this is only reasonable, if • The deterministic part is heavy, with many discrete variables and big-M constraints • This part of the model has a relatively small number of feasible solutions • The frequently changing part of the model is small and quick to solve The advantage of this approach besides the reduced CPU times is that the models for the two parts are handled separately.It makes a possibility to apply different solution approaches.For example, the first part can be done by an MILP or SAT approach, while the profit optimization part can rely on something else.This allows the model to address more complex profit functions or continuous probability distributions for I M .For example, if only the demand changes, the news-vendor model (Edgeworth 1888) can be applied to address a continuous distribution for d p (Hegyhati et al. 2010).An additional benefit is that the saved schedules can be evaluated independently which makes it easy to deploy the calculations on a cluster, and carry out the computations in parallel.By doing this, more complex profit functions or a higher number of considered scenarios becomes possible to consider.

I P D B I M D S market-reactive scheduling
At first glance, this case could seem unrealistic, however, it actually represents an integrated planning and scheduling problem if the equipment units must always be operated in 100% capacity, and their sizes have to be decided in the facility-design phase.In this case, the sizing of the equipment units means the sizing of the batches as well, which is done once before building the factory, and thus before the daily market data is revealed.Thus, batch sizing decisions can not reflect on the daily demand, however, scheduling decisions can.
Similarly to the market-sensitive batch-sizing case, a two-stage programming model can easily be derived if the distribution of market data can be described in the form of discrete scenarios.However, as mentioned previously, the number of variables and constraints affected by D S is much larger than that of D B .As a result, this model would become highly inefficient even with a small number of scenarios.
A more reasonable approach could be to generate all of the feasible schedules before making the decisions on batch sizing.Although this process would definitely take a considerable amount of time, most probably, that is not a significant issue in the planning phase of a facility.Generating all of the feasible schedules via MILP models can be cumbersome, but other approaches, such as an S-graph algorithm or potential constraint programming model can do this in a straight-forward way.
The end result of this procedure is a list of batch number configurations (P-tuple of integers), that are feasible within the time horizon.Let C denote this set, and n p,c refer to the number of batches produced from p ∈ P in the configuration c ∈ C .D S is reduced to a single selection from C, which would mean |C| binary variables, whose sum is 1.
In the two-stage model, that would result in |C| ⋅ |S| binary variables, which may be a huge number, however, the overall model is very simple: Where b p is now a first stage continuous variable, and binary variable x c,s denotes whether batch configuration c would be selected in scenario s.As a result, the latter equality contains a bilinear term, that could be linearized.This preventive model can provide the solution with the highest expected profit.
There are two more practical considerations to discuss for this case.When the planning phase is over in practice, and thus the b p values are fixed, the prob- lem reduces to a deterministic profit maximization scheduling problem, as all the remaining decisions can be made after all the input data is revealed.Thus, if the market data change for the same factory, the b p values can be considered as input parameters at that point.However, if the C set is still kept, finding the optimal profit reduces to finding the minimal element between the values of the |C| profit options.The calculation of these profit options is a very simple formula, which can be done in parallel if necessary.
Another practically interesting situation is, when a similar plant (with the same set of units and products) is to be designed with different market estimates (scenarios and related parameters).If that were to happen, the |C| configurations would still be valid, and could be reused with the model above.
If other meta-information is also saved during the generation of the configurations, such as the minimal makespan for each configuration, the generation of the C set can be avoided and replaced by simple filtering if the new plant differs by having a shorter time horizon or having a subset of products.Even if the time horizon gets a bit longer, most of the computation can be skipped using the old C set as a cache.

Concluding remarks
Uncertainties are almost guaranteed for any application in the field of optimization.The contributions of this paper to this topic are twofold.In the first part, a generic characterization approach is presented for stochastic optimization problems.This method identifies a problem class by an alternating sequence of sets of information reveals and decisions to be made.The enumeration of such problem classes was illustrated by a stochastic scheduling example, where both the problem data, and Optimization with uncertainties: a scheduling example the set of decisions are split into two parts.Two relations among those classes were identified: an equivalence relation for sequences that define the same problem, and a partial ordering where a "stronger" problem class is unequivocally more beneficial for the decision maker, with the deterministic class being the maximal element.
For the illustrative example, 14 such distinctive classes were derived from the 24 possible sequences, and referred to as cases.The second part of the paper focused on the possible modeling and optimization techniques for 4 selected cases, where some or all of the decisions have to be made before market data is revealed.These options were discussed in detail, and investigated from the aspect of complexity, generalizability and reusability.While some of the statements hold for other optimization problems, regardless of the nature of their information and decision sets, others exploit problem specific features to propose more efficient approaches.This part of the discussion focuses not only on theoretical complexity, but possible implementation and practical application of the mentioned approaches, such as building a cache of feasible schedules a-priori.This second part leaves room for follow-up papers to conduct empirical tests on case studies, and compare the results based on quality, efficiency, and applicability.
Set of input parameters become available after stage k D k Set of decisions made in stage k I P All process data necessary for scheduling D S Set of decisions related to scheduling I M Set of market related parameters D B Set of decisions determining the size of each batch B Set of variables represent or are infected by decisions from D B 1 Introduction and literature review

Fig. 1
Fig. 1 Example instance of the illustrative problem class

Fig. 2
Fig. 2 Different cases for the illustrative example

Fig. 3
Fig. 3 Equivalent cases for the illustrative exampleTable 3 Considered cases for the illustrative problem class from Sect. 2

Fig. 4 Fig. 5
Fig. 4 Strongness directed network of merged cases for the illustrative example

Fig. 6 3
Fig. 6The profit function of a product c ⋅ b p ⋅ x c,s ∀p ∈ P, s ∈ S Set of predecessor tasks for task i ∈ I U i ⊆ U Set of units capable to carry out task i ∈ I C Set of batch number configurations feasible within the time horizon

Table 1
Parameters of products for the example problem instance shown in Fig. 1.The units of measure are [t] , [t] , cu∕t , cu∕t and cu∕t for parameters b p , d p , s p , o p and u p respectively

Table 2
Parameters of tasks for the example problem instance shown in Fig.1 this is a much more fortunate situation than I P D B I M D S would have been.The set of variables affected by scheduling decisions is a much larger subset of all of the variables, i.e., S is much larger than B , and the same could be said about S in relation to B . 3 Moreover, plenty of these variables are binary, thus not only |S| ⋅ S + ̄ S is significantly larger than |S| ⋅ B + ̄ B , it is true for the affected number of discrete variables, as well.Obviously, solving the model in that case is a much more CPU extensive job than in this one.In addition, sequencing constraints that utilize big-M relaxation are also affected by D S in the I P D B I M D S case.Thus, the two-stage model with |S| ⋅ S + ̄ S constraints would not only have more constraints, but probably provide worse bounds due to the increased number of big-M constraints.

Table 4
Number of variables in the n-stage model with k = 1