## 3 Model and Methodology  
### Mathematical Formulation of MRCPSP/Max  
For this section, we follow the model presented in [47]. Consider a project with \(n+2\) activities belonging to the set \(V=\{0,1,2,\ldots,n,n+1\}\) where activities \(0\) and \(n+1\) are dummies that represent the beginning and end of the project, respectively. Every activity \(i\) has to be executed in only one mode \(\mu_{i}\in M\) out of the total available for every activity \(M_{i}=\{1,\ldots,\ |M_{i}|\}\). The duration of every activity, \(d_{i_{in}}\), depends on the mode \(\mu\) selected, and the beginning and end of every activity is denoted by \(S_{i}\) and \(C_{i}\) correspondingly. Therefore, if activity \(i\) begins at time \(S_{i}\), it will continue to be executed in mode \(\mu_{i}\) throughout time \(t=[S_{i},\ S_{i}+d_{i_{in}}]\), so if \(S_{0}:=0\), then the duration of the project is given by \(S_{n+1}\). Between the start times of activities \(i\) and \(j\), a time lag \(p\) can be included. This time lag is dependent on the mode \(\mu_{i}\) of activity \(i\) and \(\mu_{j}\) of activity \(j\) (\(i\
eq j\)) and can be maximal \(p_{i_{in}j_{in}j_{in}}^{max}\) or minimal \(p_{i_{in}j_{in}j_{in}}^{min}\). The activities and time lags are represented by an activity-on-node network \(N\) with node set \(V\), arc set \(E\) and arc weight function \(\delta\); \(N=<\)\(V\), \(E\), \(\delta>\). Every element of \(V\) represents an activity, and  
Figure 1: Graphical representation of \(E_{i}\) and \(\delta t\). every element of \(E\) represents a time lag that must be observed. Arc weight function \(\delta\) is a matrix defined by user preferences that assigns to each arc \(<i,j>\) a time lag as follows: for a minimum time lag \(\delta^{min}_{|i_{H}|j_{i}}\)\(p^{min}_{|i_{H}|j_{i}}\) and for a maximum time lag \(\delta^{max}_{|i_{H}|j_{i}}\)\(p^{max}_{|i_{H}|j_{i}}\). As previously mentioned, the inclusion of such time lags leads to cycles in \(N\) that make the MRCPSP/max problem much more complex than other versions of MRCPSP. Furthermore, every non-dummy activity \(i\) executed in mode \(\mu_{i}\) consumes \(r^{p}_{i_{H},k}\) type \(k\) renewable per period of time out of a total \(R^{p}_{k}\) renewable resources available in the project and \(r^{p}_{i_{H},k}\) nonrenewable resource out of a total \(R^{p}_{k}\). Dummy activities consume no resources and have duration = 0. A schedule (\(M\), \(S\)) consists of a mode vector \(M\) and a start time vector \(S\). A mode vector \(M\) = (\(\mu_{i}\)) assigns only one mode \(\mu\) to every activity \(i\) for it to be executed. Each mode vector \(M\) has an associated project, \(N(M)\), obtained by choosing the durations, resources and time lags corresponding to the modes of \(M\). A start time vector \(S\) = (\(S_{i}\)) assigns to each activity \(i\) exactly one point in time \(t\geq 0\) as start time \(S_{i}\) with \(S_{0}:=0\). With \(A(M\), \(S\), \(t)\) := {\(i\in V\)\(|\)\(S_{i}\)\(\leq\)\(t\)\(<\)\(S_{i}\)\(+\)\(d_{i\mu}\)} denoting the set of activities being executed at a time \(t\) for a schedule (\(M\), \(S\)), the MRCPSP/max can be stated as follows:  
\[Min\ S_{n+1} \tag{4}\]  
subject to:  
\[S_{j}-\ S_{i}\ \geq\delta_{|i_{H}|j_{j}}\quad(<i,j>\in E) \tag{5}\]  
\[\sum_{i\in A(M,S,t)}r^{p}_{i_{H}k}\ \leq\ R^{p}_{k}\quad(k\in R^{p};t\geq 0) \tag{6}\]  
\[\sum_{i\in V}r^{p}_{i_{H},k}\ \leq\ R^{p}_{k}\quad(k\in R^{p}) \tag{7}\]  
\[\mu_{i}\in\ M\ (i\in V)\]  
\[S_{i}\ \geq 0\ (i\in V)\]  
\[S_{0}\ =0\]  
The objective function stated in Equation (4) results in the makespan of an optimal schedule (\(M\), \(S\)) that minimizes the project duration ensuring that the time lags in Equation (5) are observed while meeting the renewable and nonrenewable resource consumption requirements established in Equations (6) and (7), respectively. Please refer to Figure 2 and Table 1 for an example of MRCPSP/max. Table 1 shows an example of an MRCPSP/max instance. Here, all of the activities (except for the dummies, 1 and 6) can be executed in one out of three modes available.