# Balancing Project Schedule, Cost, and Value under Uncertainty: A Reinforcement Learning Approach
## 4 Quantitative Models
### Ccbm
\begin{split}& ES_{js}\leq t_{js}\leq LS_{js},\ \forall j=0,\ldots,J+1,\ \forall s=1,\ldots,S,\end{split}  \tag{24}\]  
\[ \begin{split}&\phi_{ij}^{k}-\min\Bigl{(}\hat{r}_{im^{\prime}}^{k}, \hat{r}_{jm^{\prime}}^{k}\Bigr{)}z_{ij}-(1-\hat{\xi}_{im})\Bigl{(}\hat{r}_{ij}^ {\max,k}-\min\Bigl{(}\hat{r}_{im^{\prime}}^{k},\hat{r}_{jm^{\prime}}^{k}\Bigr{)} \Bigr{)}\\ &-\Bigl{(}1-\hat{\xi}_{jm^{\prime}}\Bigr{)}\Bigl{(}\hat{r}_{ij}^{ \max,k}-\min\Bigl{(}\hat{r}_{im^{\prime}}^{k},\hat{r}_{jm^{\prime}}^{k}\Bigr{)} \Bigr{)}\leq 0,\ \text{where}\,r_{ij}^{\max,k}=\max\biggl{(}\max_{m=-1,\ldots,M_{i}}\hat{r}_{im^ {\prime}}^{k},\max_{m^{\prime}=-1,\ldots,M_{j}}\hat{r}_{jm^{\prime}}^{k} \Bigr{)},\\ &\forall i=0,\ldots,J,\ \forall j=1,\ldots,J+1,\ \forall i\
eq j,\ \forall k=1,\ldots,K,\ \forall m=1,\ldots,M_{i},\ \forall m^{ \prime}=1,\ldots,M_{j},\\ &\text{where}\,r_{jm}^{k}=\left\{\begin{array}{l}r_{jm}^{k}\ \text{if}\ 0<j<n+1\\ R^{k}\ \text{if}\ j=0\ \text{or}\ j=n+1,\end{array}\right.\end{split}  \tag{25}\]  
\[ \begin{split}&\sum_{j\in\{1,\ldots,J+1\}\setminus\{i\}}\phi_{ij}^ {k}=\sum_{m=1}^{M_{i}}\hat{r}_{im}^{k}\delta_{im},\ \forall i=0,\ldots,J,\ \forall k=1,\ldots,K,\end{split}  \tag{26}\]  
\[ \begin{split}&\sum_{i\in\{0,\ldots,J\}\setminus\{j\}}\phi_{ij}^ {k}=\sum_{m=1}^{M_{j}}\hat{r}_{jm}^{k}\delta_{jm},\ \forall j=1,\ldots,J+1,\ \forall k=1,\ldots,K,\end{split}  \tag{27}\]  
\[ \begin{split}& 0\leq\phi_{ij}^{k}\leq\min\biggl{(}\max_{m=1,\ldots,M_{i}} \hat{r}_{im^{\prime}}^{k},\max_{m=1,\ldots,M_{i}}\hat{r}_{jm}^{k}\biggr{)},\ \forall i=0,\ldots,J,\ \forall j=1,\ldots,J+1,\ \forall i\
eq j,\\ &\forall k=1,\ldots,K.\end{split}  \tag{28}\]  
The objective function (18) is designed to minimize the project's delivery time. Constraints (19) indicate whether a scenario is completed within the desired timeframe. Constraints (20) and (21), derived from previous works [84; 85], prevent cycles of 2 or 3 or more activities. Constraints (22) enforce the precedence relationships between activities. Constraints (23) establish the relationship between continuous activity start time variables and binary sequencing variables. Constraints (24) define upper and lower bounds for activity start times. Constraints (25), drawing from [85], establish a connection between the continuous resource flow variables, binary sequencing variables, and mode variables. Outflow constraints (26) guarantee that all activities, except for milestone \(J+1\), transfer their resources (when finished with them) to other activities. Inflow constraints (27) ensure that all activities, except for milestone 0, receive their resources from other activities. Constraints (28) set bounds on the flow variables based on the maximum resource consumption modes. It is important to note that the general constraints (25) and (28) can be reformulated as MIP constraints using linear and special-ordered set constraints, along with auxiliary variables [86]. Commercial solvers such as Gurobi automatically handle the equivalent formulation (in [85], these constraints are also handled by the solver). Once the MILP is solved, constructing a schedule follows a straightforward approach. The project is represented as an activity-on-node (AON) network, with arcs connecting activities \(j\) to their immediate predecessors \(\mathcal{P}(j)\). If resources flow from activity \(i\) to \(j\), \(j\) cannot start before \(i\) finishes, making \(i\) an immediate predecessor of \(j\). Hence, we add arcs between activities wherever \(\phi_{ij}^{k}>0\). This construction, referred to as a resource flow network [87], can be achieved by simply adding \(i\) to \(\mathcal{P}(j)\). Finally, we schedule all activities using the \"early start\" approach, where each activity commences when its immediate predecessor concludes. For the baseline schedule, the activity duration used is typically the most likely duration based on a three-point estimate. After the completion of the last activity, the PB is inserted, calculated as the difference between the project delivery time and the baseline duration.