## 2 Problem Formulation  
A project is a unique set of activities executed using available resources (employees, machines, materials). This work discusses the classic non-preemptive single-mode RCPSP. The project is shown as a directed graph \(G(V,E)\), in representation of activity-on-node (AON), where \(V\) is a set of nodes corresponding to the activities and \(E\) is a set of arcs describing the order relations between the activities of finish-start zero-lag precedence. Activities are executed using the limited, renewable resources whose number is constant over time. The schedule (start times for all activities) is determined with the optimization criterion (makespan minimization, DCF maximization etc.) when the order constraints (1) and resource constraints (2) are fulfilled. \[ST_{i}+d_{i}\leq ST_{j},\qquad\forall(i,j)\ \in E \tag{1}\]  
\[\sum\limits_{i\in J(t)}r_{ik}\leq a_{k},\qquad\forall t:t=1,ST_{N_{A}+1}, \forall k:k=1,\ldots,K \tag{2}\]  
where:  
* \(i\) is the activity index, \(i=1,\ldots,N_{A}\),
* \(N_{A}\) is the number of activities in a project,
* \(ST_{i}\) is the start time of the activity \(i\),
* \(d_{i}\) is the duration of activity \(i\),
* \(J(t)\) is the set of activities executed in time interval \([t-1,t]\),
* \(a_{k}\) is the number of available resources of type \(k\); at any time \(t\), the number of resources used must not exceed the number of available resources \(a_{k}\) for \(k=1,\ldots,K\),
* \(r_{ik}\) is the demand of activity \(i\) for the resource of type \(k\),
* \(K\) is the number of types of renewable resources. This work offers an optimization model from the perspective of the contractor, which applies stage and financial settlements between the client and the contractor. Arrangements regarding joint settlements may be conducted for the adopted baseline schedule, which is the basis for defining inter alia, the number of contractual stages of the project, the dates of their completion, the activities to be taken at these stages and the method of payment determination. The proposed optimization model maximizing the discounted cash flow from the contractor's perspective with the costs incurred for the completion of the activities and the revenue obtained for the completed stages is described by the Equations (3)-(5):  
\[F=\ \sum\limits_{i=1}^{N_{A}}\left(CFA_{i}\cdot e^{-a\cdot ST_{i}}\right)+ \sum\limits_{m=1}^{N_{M}}\left(CFM_{m}\cdot e^{-a\cdot MT_{m}}\right) \tag{3}\]  
\[MT_{m}=\max\limits_{i\in MA_{m}}\left(FT_{i}\right),\qquad\forall m:m=1, \ldots,N_{M} \tag{4}\]\[CFM_{m}=MP_{m}-MC_{m}\cdot\max(MT_{m}-MD_{m},0),\ \ \ \ \ \forall m:m=1,\ldots,N_{M} \tag{5}\]  
where:  
* \(F\) is the sum of discounted cash flows, objective function,
* \(CFA_{i}\) is the contractor's expenses related to the execution of activity \(i\),
* \(m\) is the index of project stage (milestone), \(m=1\),..., \(N_{M}\) (\(N_{M}\)-number of stages),
* \(FT_{i}\) is the finish time of activity \(i\) (\(FT_{i}=ST_{i}+d_{i}\)),
* \(CFM_{m}\) is the client payment for completion of \(m\)--project stage established for the current schedule;
* \(\alpha\) is the discount rate;
* \(MT_{m}\) is the completion time of \(m\)--project stage established for the current schedule;
* \(MA_{m}\) is the set of activities to be executed in \(m\)--project stage;
* \(MP_{m}\) is the agreed client payment to the contractor for completion of \(m\)--project stage;
* \(MD_{m}\) is the contractual deadline for \(m\)--project stage;
* \(MC_{m}\) is the contractual unit cost for exceeding \(MD_{m}\) deadline. Client payments \(CFM_{m}\) (cash inflows from contractor's perspective) are made right after completion of contractual stages within \(MT_{m}\) completion time within defined amount \(MP_{m}\) reduced by any contractual penalties that include the delays unit cost of \(MC_{m}\). It is assumed that all contractor's expenditures (cash outflows from contractor's perspective) are related to the execution of the activities and are incurred for each activity exactly as scheduled (in start time).