## 3 Model and Methodology
### Solution Procedure
#### 3.2.4 Three-Stage Procedure Execution Time-Frame
If the activity cannot be scheduled in the available time period, the time advances until the activity can be scheduled. These three steps generate one initial solution, and this procedure is repeated until the complete population (\(n\) initial solutions) has been generated; this is the initialization phase of the ABC algorithm. In the employed bees phase, all of the solutions are selected for improvement. If a solution is not improved with the local search, a counter for solution non-improvement attempts will increase. If a solution is improved, its counter will be restarted regardless of the number of non-improvement attempts it had previously. If a solution reaches the abandonment limit for not being improved, this solution will be marked for replacement, and a new solution will be generated when the scout bees phase is reached. The onlooker bees phase makes improvements to solutions based on the probability function described in Equation (6). With higher solution fitness, the probability for it being selected for improvement is increased. Similar to the employed bees phase, if the solution selected is not improved with the local search operators, a counter for solution non-improvement attempts will increase, but it is restarted if the solution is improved at any point. If a solution reaches the abandonment limit the solution is marked for replacement by a new solution. The scout bees phase is the final stage in the combinatorial ABC algorithm developed. In this stage, all of the solutions that reached the abandonment limit are replaced by new solutions. These new solutions can be generated either by using the MSR detailed previously or randomly; the way in which they are determined is selected randomly. These three improvement phases are performed a maximum number of cycles times, and when this criterion is reached, the schedule with the shortest makespan is reported as the lower bound for the three-stage procedure (MS\({}_{1}\) in Figure 3) and used as the input for Stage 2. Stage 2: Upper Bound Makespan  
Stage 2 of the proposed methodology calculates the input schedule's entropy based solely on the precedence constraints and the three durations (shortest, most probable and longest possible duration, \(d_{il}\), \(d_{i}\), and \(d_{iu}\), respectively) estimated for every activity. Here, Equation (3) determines the set of unfavorable events, and finally, Equation (2) is used for the schedule's total entropy. As a short example, assume there is an activity whose selected execution mode requires 7 time units. Furthermore, the scheduler determined that the activity's most probable duration (\(d_{i}\)) was 9 time units and that the longest possible duration (\(d_{iu}\)) was 10 time units. This activity happens to be part of the critical path and, therefore, has slack \(s=0\). Furthermore, suppose the relevant time interval \(\delta t\) is set to 1. Therefore, after using Equation (2), the entropy for this activity is 1 time unit. To determine the complete schedule's entropy, this same procedure is applied to all project activities. Nonetheless, the total time added to the current makespan is not necessarily equal to the sum of the entropy for all activities. If activities have slack greater than their entropy values, these activities will simply be shifted without affecting the overall makespan. The new entropy-containing makespan will serve as the upper bound for the execution time-frame and will also serve as an input for Stage 3 (MS\({}_{2}\) in Figure 3). The third and final stage produces a robust makespan using the result of Stages 1 and 2 as input. Even though Stages 1 and 3 both implement the discrete ABC algorithm, there are two significant differences: First, all of the initial solutions generated for Stage 3 must be within the minimized makespan of Stage 1 and the entropy-containing makespan of Stage 2 (\(MS_{1}\leq MS_{R}\leq MS_{2}\) for all of the initial solutions \(i\)). Second, the objective function in Stage 3 is not to minimize the makespan, but rather to maximize the makespan's robustness.