## 4 Problem Description
### Optimizer
#### 4.2.2 Optimization Algorithm  
The proposed optimization algorithm is a metaheuristic hybrid algorithm that combines two well-known metaheuristic algorithms: simulated annealing [23] and tabu search [24]. Simulated annealing allows the selection of worse solutions at the early stages of the iterative process in order to avoid local optima. The algorithm reduces the probability of selecting worse solutions, increasingly accepting better solutions. Tabu search stores information of previously evaluated solutions in a memory data structure called tabu list. As a result, tabu search avoids revisiting solutions that have already been evaluated, improving the computational efficiency by avoiding unnecessary simulation runs. The flow chart of the metaheuristic hybrid algorithm is shown in Figure 5, the following is a detailed explanation of each of the steps in the metaheuristic hybrid algorithm. The metaheuristic hybrid algorithm starts by generating a random solution in a codified form making local changes until there is no better solution. The proposed algorithm for the generation of a feasible initial solution that will function as the starting point for the optimization algorithm to find the optimal solution is shown in Figure 6.  
Figure 5: Flow diagram of the Hybrid metaheuristic algorithm. Figure 6: Flow diagram of the initial solution generation algorithm. The initial solution is then fed to the simulator and the plant model is run. The results of the simulation are sent to the optimizer, which evaluates the feasibility of the solution. The feasibility function \(f(x)\) determines the difference between the left-hand side and the right-hand side of the constraints. If the generated solution \(x\) is feasible, \(f(x)\) becomes zero. A solution is considered feasible if it reaches the goal state determined by the problem without violating any of the constraints. If \(f(x)>0\), a new solution \(y\) is generated based on the current solution \(x\). Until feasibility is guaranteed, a solution may suffer many changes by the application of multiple neighborhood operators. This is an exploration feature of the algorithm. Subsequently, the feasibility of solution \(y\) is evaluated. If \(f(y)>f(x)\) solution \(x\) remains as the current solution, and a new solution \(y\) is generated, restarting the loop. If \(f(y)<f(x)\), solution \(y\) becomes the new current solution (\(x=y\)), and the procedure is repeated. If \(f(y)\) equals zero, solution \(y\) becomes the initial solution and it moves on to the next step. Afterwards, the algorithm uses this initial feasible solution to produce a neighbor solution in which the local search algorithm explores the space of candidate solutions (the search space) by applying local changes by means of a neighborhood operator (NOP). The NOP can be defined in terms of local rearrangements, such as swapping, moving, or changing one or more elements from the current solution sequence. A neighborhood operator can be applied multiple times to make significant changes in the solution to improve the diversification of solutions through the optimization process. After selecting and evaluating the neighbor solution, that neighbor solution is added to the tabu list. From this point on, each new solution is tested against the tabu list. The tabu list contains information of previously evaluated solutions, to avoid searching the same region and avoid repeated simulations. The tabu list works as long-term memory for the algorithm. If a solution appears in the tabu list, then it will be avoided. When the neighbor solution is feasible, and the objective function of the neighbor solution is better than the objective function of the current solution the neighbor solution will be selected as the current solution. If the total operation time is set as the objective function, a better neighbor solution is the operating procedure that takes less time to reach the goal state.