## 2 Method  
In order to minimize the losses caused by the closure of any strand of the continuous casting machine, the initial scheduling must be recalculated, and the decision batches must be adapted to the workshop situation. Most of the currently used algorithms focus on the scheduling decisions, avoiding the possibility of rearranging the heats according a new and more suitable planning of the required batches. Therefore, an algorithm was developed, capable of comparing the different scheduling that can be performed from a trigger event that lead to close of one or several lines, even changing the batch decisions, in order to improve productivity on the steel plant. For this, the decision tree technique was applied. Therefore, bearing in mind that the scenario takes place in a steel plant, various possible final cases were reached by analyzing a series of assumptions that involved a succession of decisions. That is, from the initial scheduling, the implications of the line loss in the scheduling itself were analyzed in detail, as well as the different routes that can be generated when recalculating it. These were compared in such a way that adequate decision-making can be carried out depending on new situation of the steel plant. Each one of the routes is equivalent to the adaptation of a batch decision in a particular way, considering all the possible cases that can be carried out. This involves a detailed analysis of all the available routes allowed to make a comparison and work out the appropriate decision making. Any change in the MPS that affects heats or tundish that have not yet entered the production process can be programmed in an optimal way, while those that are already in process may suffer the restrictions of the current state of the factory, or its own quality conditions. That is why the algorithm focuses on the decisions to be made for these washes that have already entered the production cycle; that is, they have already been dealt with in the converter. For the experimental evaluation, a typical steel mill has been taken as a model, with two different casting machines, two ladle furnaces and two converters, in which at any time, the maximum number of castings in process is four, this being the number of steps that the decision tree will advance, from heat N, where the disruptive event occurs, to heat N + 3. Figure 2 shows the schematic of the algorithm's decision tree. These decisions were made following the loss of one or more lines in the casting machine, due to a trigger event. It was observed that for each of the heats scheduled, four different options can be chosen:  
1. Cast the heat, following the sequence;
2. Return the heat to converter;
Figure 2: Decision Tree. trigger event takes place, to cast N + 3, the algorithm's decision tree was reduced to the 13 assumptions, as seen in Figure 2.  
To determine the optimal solution, the characteristics of the continuous casting process are considered. Each of the different branches of the decision tree represents a set of batch decisions, which allows a quick analysis of the processing times of each branch. Based on this, the algorithm construction process was carried out in four steps or stages. STEP 1: Data Input. Definition of the instant T in which the trigger event occurs, as well as the consequences and the situation of the workshop, introducing the necessary data in the algorithm. In order to quantitatively analyze the different routes, the algorithm needs to know a series of parameters, relative to process variables of the steel plant, in addition to those that were already included in the original scheduling. These new parameters, necessary for the correct operation of the algorithm are:  
* Time instant (T): time at which the line loss trigger event occurs, as previously defined. * Heat number (N): position in the tundish where the heat is scheduled in the casting machine at the time of the line loss.