# Deling with Uncertainty in the MRCPSP/Max Using Discrete Differential Evolution and Entropy
## 3 Methods
### Discrete Differential Evolution Algorithm  
Differential evolution is an evolutionary-type, population-based algorithm to optimize functions over continuous solution spaces [48]. Characterized by simplicity, straightforwardness, and robustness, numerous applications have been developed to solve combinatorial optimization problems [49; 50], such as the machine scheduling problem in production (MSPP) [51; 52; 53; 54; 55; 56; 57; 58; 59; 60], the traveling salesman problem (TSP) [61; 62; 63], the linear ordering problem (LOP) [64; 61], the multidimensional two-way number partitioning problem (MDTWNPP) [65], and the multidimensional knapsack problem (MKP) [66]. In [64; 65], the authors addressed permutation-based optimization problems and proposed an algebraic structure and a binary operator that allowed the solutions to be directly expressed as permutations. The duality of geometric search operators was introduced in [61] for both continuous and combinatorial problems. Furthermore, in [67], angle modulation, a trigonometric base (i.e., a sin/cos function) technique, was developed to generate a bit string from continuous to binary problem spaces. A set-based encoding scheme that redefined all algorithmic operators for the discrete space was applied to TSP in [63]. In [66], the authors emphasized a selection operator based on the multiple probability estimation models and verified its usage in continuous and combinatorial problems. Moreover, due to the interdependency between variables, the model's performance may be compromised in binary- or permutation-based problems. Nonetheless, the precedence relationship is fundamental to project scheduling, making the concept of decoding (i.e., converting continuous encoding vectors into permutations of activity lists) more complex than other approaches currently in use. Furthermore, when dealing with possible execution modes for activities in RCPSP, one needs to consider the task sequence and its appropriate mode almost in parallel. Only a few studies have examined either single- or multimode RCPSP [14; 68; 69; 70; 71; 72; 73; 74], and even fewer have addressed the MRCPSP/max format, in which the encoding scheme is only visible from one viewpoint. Thus, in this paper, we propose the application of DDE to solve the MRCPSP/max. In our DDE method, the encoding of the DDE algorithm consists of two vectors, one representing the task sequence and another with the execution mode for each activity. Several potential resource conflicts and precedence constraints are taken into account in our design. Conventional DE works in two phases: initialization and evolution. In the initialization phase, the population \(S^{g}=\left\{X_{i}^{g}:i=0,1,\ldots N_{p}-1\right\}\) at each generation \(g\) for the size of \(N_{p}\) contains candidate solutions (i.e., schedules). As shown in Equation (12), each solution consists of D-dimensional parameter vectors \(X_{i}^{g}=\left\{x_{i,j}^{g}:j=0,1,\ldots D-1\right\}\), generated as follows by a uniformly distributed random number \(rand\left[0,1\right]\). \[X_{i}^{g}=X_{min}^{g-1}+rand\left[0,1\right]\cdot\left(X_{max}^{g-1}-X_{min}^{ g-1}\right) \tag{12}\]  
The search space \(S^{g}\) is constrained by the maximum and minimum bounds \(\left(X_{max}^{g-1},\ X_{min}^{g-1}\right)\). \(X_{i}^{g}\) is instantiated independently and further adjusted throughout the execution of the algorithm. The key is to generate a suitable number of trial parameter vectors to avoid stagnation and provide sufficient solution space for the next phase. Mutation and crossover operators and population maintenance mechanisms begin their computing schemes in the evolution phase. The classical mutation and crossover operators generate new vectors, whereas the population maintenance mechanism determines which vector will survive the next generation. In this respect, a target vector \(X_{i}^{g}\) refers to a parent vector from the current generation \(g\), whereas a mutant vector \(M_{i}^{g}\) obtained through the differential mutation operation, is called the donor vector.