Multimode resource-constrained project scheduling in flexible projects

Flexible agile and extreme project management methods have become increasingly popular among practitioners, particularly in the IT and R&D sectors. In contrast to the theoretically and algorithmically well-established and developed trade-off and multimode methods applied in traditional project management methods, flexible project scheduling methods, which are applied in agile, hybrid, and especially extreme project management, lack a principled foundation and algorithmic handling. The aim of this paper is to fill this gap. We propose a matrix-based method that provides scores for alternative project plans that host flexible task dependencies and undecided, supplementary task completion while also handling the new but unplanned tasks. In addition, traditional multimode resource-constrained project scheduling problems are also covered. The proposed method can bridge the flexible and traditional approaches.


Introduction
The importance of scheduling and resource allocation problems in project management was recognized over five decades ago (see excellent reviews in Brucker et al. [2], Habibi et al. [11]). From the beginning of the 1960s until recently, researchers usually assumed tradeoff functions between both the time and the cost and between the time and the resources (see, e.g., [20]) (see Fig. 1a) and later, also among the time, the cost and the quality [1,18]. Two main versions of trade-off methods are specified. First, from the 1960s to the 1980s, continuous time-cost relationship problems were addressed extensively in the literature (see, e.g., [9,17]). Researchers later investigated the discrete version of trade-off methods (see, e.g., [5,7,25]). Despite the ease of use, the main concern of the concept of continuous trade-off problems (CTP) is that it is usually hard to specify continuous trade-off functions between the time and the cost, the time and resources, or the cost and the quality. In real projects, decision makers instead choose from technologies (in addition to completion modes) (see Fig. 1b, c). Moreover, this situation is better described by discrete trade-off problems (DTP) (see Fig. 1b). At the same time, CTP can be solved by fast polynomial algorithms (see, e.g., [10,19]), while the discrete version of trade-off problems, with the exception of a few kinds of project networks [5] is an NP-hard problem [6]; therefore, the discrete version of timequality-cost trade-off problems are also NP-hard problems [25]. To solve DTPs, heuristic and metaheuristic algorithms are usually applied [23,26]. The recent multimode resourceconstrained project scheduling problems (MRCPSP) (see an excellent review in Habibi et al. [11]), do not assume any trade-off functions between time and resources or between time and cost (see Fig. 1c). Trade-off methods are successfully used in construction projects [20]; in addition, the discrete version of trade-off methods and MRCPSPs are also successfully used in new product development projects [29] and investment projects [12], but they are difficult to use in software development projects and R&D projects where the project plans are more flexible. The main limitation of these concepts is that they both assume a fixed logic plan, such as a fixed set of tasks and a fixed sequence of completion. The proposed algorithm extends trade-off methods and MRCPSPs in order to handle flexible projects.
Previously, Wysocki found that in a [31] study of the practices of software project managers, only 20% of IT projects were managed by a traditional project management (TPM) methodology. Generally, methods for investment and construction projects cannot be directly applied to software development or R&D projects, as these are managed by agile project management (APM) approaches. Currently, hybrid (i.e., combinations of traditional and agile and extreme) approaches are becoming increasingly popular (see, e.g., [16]). However, flexible approaches are thus far not privileges for software development projects [3]. Rapidly changing environments increasingly enforce flexible approaches. Scheduling algorithms can support decision makers to manage projects; however, there are very few algorithmic methods that can support the flexible approaches. Therefore, it is important to study how to extend project scheduling methods to handle flexible and changing environments. Scheduling methods, as agents, can also imitate decision makers; therefore, not only the methods but also the scheduling and management approaches can be modeled (see Table 1). While a project manager who follows a traditional project management (TPM) approach can use trade-off or multimode methods to reduce task duration, the agile and extreme project manager tries to restructure the project. If the project structure is flexible (see Table 1), the project duration can be reduced without increasing the project cost by reducing the number of flexible dependencies. However, in real project situations, decision makers can choose from different kinds of technologies; therefore, the TPM and APM approaches should be integrated. Agile approaches usually split the projects into smaller so-called sprints that are usually 2-6 weeks. The content of sprints is specified by the customer and the developers together. However, when running a sprint, unplanned new tasks and new requirements can be involved only until the next sprint.
The extreme project management (XPM) approach must handle the new tasks and new requirements during the implementation of the project. Application management, which can be considered as a combination of project management and process management from a scheduling point of view, also allows management to involve new and unforeseen tasks in the project plan. However, while extreme project management can confirm the extra costs and the increased project duration due to the extra tasks, application management instead emphasizes adhering to a fixed budget and fixed time-frame. 1 Flexible approaches require flexible project structures and flexible constraints; however, in addition to the opportunity of reorganizing the project, different kinds of technology (completion modes) should also be considered; therefore, traditional and flexible approaches should be combined into hybrid project management approaches (see, e.g., [16,21,27]). Nevertheless, hybrid approaches should be supported by algorithmic methods in order to help decision makers ensure the project's success.
There are different combinations of agile and traditional project management approaches (see, e.g., [16,21,27]). However, to the best of our knowledge, there is no exact algorithm that can be used to solve hybrid multimode problems that can handle unplanned tasks and dependencies. Nevertheless, R&D and IT projects, such as introducing and setting up new information systems, may require reorganizing part of the project, and R&D projects may require handling unplanned tasks, particularly in the development phase. However, decreasing the time demands of mandatory tasks and those of the new unplanned tasks may also be an important requirement. Neither the agile nor the extreme approach can handle this situation properly; nor can the traditional approach. Traditional approaches, or network-based methods, assume static logic plans, but the reorganization of projects may produce insuf-ficient reductions in project duration and/or supplementary tasks, and important tasks may excluded from the project due to budget constraints and/or project deadlines. A hybrid project management (HPM) approach can combine the traditional, agile and extreme approaches; however, these kinds of HPM approaches are not yet supported by project planning methods. The proposed algorithm combines the agile, extreme and traditional approaches. This method extends the traditional multimode resource-constrained project scheduling problem by allowing the restructuring and reorganizing of projects and handling unplanned new tasks.
The proposed hybrid time-cost and hybrid time-quality-cost trade-off models multimode methods manage flexible project plans and allow us to restructure or reorganize these project plans in order to satisfy customer and management claims. In contrast to the traditional project scoring and selection methods, there is no need to specify all project alternatives in order to select the most desirable project scenario or the one with the shortest duration or lowest cost.
To handle flexible project plans, matrix-based techniques will be used instead of traditional network-based project planning techniques. This method has already been successfully used to model agile projects [15]. The basis of the proposed matrix-based method is a project domain matrix (PDM) (see [15]) with unplanned tasks. The modified PDM is an n + u by m + u matrix, where n is the number of planned tasks; u is the number of unplanned tasks; m = n + t + c + q + r ; t is the number of possible durations; c is the number of possible (direct) costs; q is the number of possible quality parameters; and r is the number of possible resource demands of tasks. The PDM has five domains. The first domain is the logic domain (LD) that is described as an n by n project expert matrix (PEM) (see [14]) or numerical dependency structure matrix (NDSM) (see [24]). 2 Since the PEM has specified and semispecified versions, the PDM is specified if and only if the LD is specified; otherwise, the PDM is semispecified. The other domains are the time domain (TD), cost domain (CD), quality domain (QD) and resource domain (RD). If the demands are deterministic, we say that the PDM is deterministic; otherwise, the PDM is nondeterministic. In this study, the hybrid resource-constrained multimode project scheduling problems (HMRCPSP) are considered: the TD, CD, QD, and RD can contain deterministic values but must have at least two completion modes. Therefore, this version is a deterministic multimodal PDM. While the basis of the proposed model is the PDM, the basis of the proposed method is the expert project ranking (EPR) algorithm (see [15]), which can evaluate specified and semispecified deterministic PDMs. However, the EPR method cannot handle the resource-constrained multimode project scheduling problem, and the unplanned tasks and requirements. Therefore, while EPR can be used to schedule a flexible project plan and can thus be used in agile project management approaches, it cannot address multimodes and extra, unplanned tasks, and therefore cannot be directly used in extreme or hybrid project management. This paper proposes a hybrid resource constrained multimode project scheduling problem by handling unplanned tasks to bridge APM, XPM and TPM and handle both the challenges of project and the application managements. tation will be proposed. At the end of this section, an exact algorithm is proposed for a hybrid multimode resource-constrained project scheduling problem. The decisions for finding the optimum will be directed by score functions and matrices (P, Q) and time-quality-costresource functions, so we need several definitions and notations before proceeding.

Definitions and problem statements
Definition 1 We call any finite set A = {a 1 , . . . , a n } the set of possible activities or tasks in the project. The subset of supplementary tasks is A = { a 1 , . . . , a σ } ⊆ A, where A is any fixed subset of A. Then, A = A \ A is the subset of mandatory tasks. Another subset iŝ A = { a 1 , . . . , a p } A , the set of planned tasks, soǍ = A \Â is the subset of unplanned tasks. Then,Â =Â ∩ A is the set of planned mandatory tasks,Ǎ =Ǎ ∩ A is the set of unplanned mandatory tasks, Â =Â ∩ A is the set of planned supplementary tasks, and Ǎ =Ǎ ∩ A is the set of unplanned supplementary tasks.
Clearly A =Â ∪Ǎ ∪ Â ∪ Ǎ is a disjoint union (a partition of A). The mathematical model in Sect. 2 does not distinguish supplementary and planned tasks, similarly, not the mandatory and unplanned ones. This distinction will be interesting in the simulation Sect. 3.

Definition 2
The set of (project) scenarios is Ξ (A) := S ⊆ A : A ⊆ S . When we consider a fixed element S ∈ Ξ (A), we call S a realized (project) scenario.
The traditional project management approach allows only mandatory tasks. There is no opportunity to remove tasks or exclude dependencies, while agile approaches prioritize tasks and can handle mandatory and supplementary tasks. While mandatory tasks must be realized, supplementary tasks can be omitted from the project. Decisions about supplementary task realization always have two options: include or exclude. When specifying project constraints, usually only the planned tasks are considered; however, the extreme project management approach allows new, unplanned tasks to be included in the projects. S A denotes the set of tasks that will be fulfilled by the algorithm. The number of possible project scenarios is 2 σ , where σ = A .

Definition 3 Any function
The task completion and exclusion scores can mean either probabilities or importance values.

Example 1
If every task completion score is a probability value, then Q = 1 − P.

Example 2 If scores are probability values, then we have ⊗ = Π.
If scores indicate the importance of task completion, then ⊗ = Σ.
In phase one, we decide which tasks will be included in the project scenario by maximizing ⊗ (S), fulfilling certain time, quality and cost requirements.
In phase two, we decide the order in which we will complete these tasks. This order is a relation of tasks, and our algorithm receives three kind of relations (dependencies) as inputs: no dependency, required and flexible. We have to resolve (i.e., decide) all flexible relations.

Definition 5
The relation triplet (≺, ∼, ) is a relation representation of a hybrid project plan if for any i, j ≤ n and i = j, we let (i) a i ≺ a j represent the strict or required dependencies between tasks a i and a j , i.e., a j may not be started unless activity a i has been completed; (ii) a i ∼ a j represent no dependency between tasks a i and a j , i.e., the starting time of a j is not affected by a i ; and (iii) a i a j represents flexible dependencies between tasks a i and a j .

Remark 1
It is important to note that ≺ is naturally a transitive, irreflexive and asymmetric relation, i.e. a strict partial ordering, which excludes circles like a 1 ≺ a 2 ≺ · · · ≺ a 1 . Therefore, by a standard topological ordering algorithm, we may assume that a i ≺ a j ⇒ i < j.
While strict dependencies a i ≺ a j between tasks a i and a j must be realized (in a sequential way), and a i ∼ a j indicates indifference (we may choose either sequential or parallel realization), flexible dependencies ( ) must be resolved. In this case, we can decide whether these tasks will be completed in a sequential way, i.e., a i ≺ a j will be declared, or in a parallel way, a i ∼ a j . When we decide that these tasks should be completed in either a sequential or a parallel way, we say that the flexible dependency is realized (or decided). Since for any i, j , i = j exactly one of a i ≺ a j , a i a j , a i ∼ a j or a i a j holds, and for i = j ("in the diagonal"), none of these four is valid; then, we have the following result: is a partition of A× A\ι ( ≺ −1 is the reverse of ≺ , i.e., , and ι is the diagonal) and ≺ is a strict partial ordering.
The easiest way to input and modify all data is by using a special n × n matrix M, which we call a hybrid logic plan. ([M] i, j denotes the entry in row i and column j.)

Definition 6
The matrix representation of an input for a hybrid logic plan means any n × n matrix with entries ∅, X , ?, i.e., M ∈ {X , ∅, ?} n×n , assuming the following requirements: In the diagonal, [M] i,i = "X ", "∅", "?" represents that the task a i will be executed, will not be executed, or will be decided later, respectively. Similarly, [M] i, j = "?" for any i = j indicates flexible task dependency, which we have to decide in the algorithm. 4 The algorithm will change each "? to either "X " or "∅" in M step-by-step in the diagonal in phase one, and in the off-diagonal in phase two. From Remark 1, we know that considering the entries X , M is an upper triangular matrix both in the input and in all subsequent steps of the algorithm. In what follows, M is any such matrix M ∈ {X , ∅, ?} n×n .

Proposition 2
For any realized project scenario S ⊆ A, the diagonal of the matrix representation does not contain "?": M i,i = "X" for a i ∈ S and M i,i = "∅" for a i ∈ A \ S. Further, M does not contain "?" at all when all flexible dependencies are decided.
Since we plan to omit all tasks a ∈ A \ S, we might also omit the rows and columns of M not belonging to S. This might be important in computer runs (saving time and memory) and could be defined axiomatically. We leave these details to the readers. Similar to Definition 3, we are given score values for each dependency.
Let us emphasize that (i) and (ii) above are requirements for the input matrix M. While the "?" entries in M are changing during the algorithm run, P and Q remain unchanged.
The off-diagonal values of [P] i, j represent the score of realizing the task dependency between a i and a j , while [Q] i, j represents the score of resolving the task dependency between a i and a j .
From the diagonal of M, we can provide sharp bounds to ⊗ (S) (see (1)) in each step of the algorithm. When replacing a "?", the algorithm makes newer extensions of the recent (or input) matrix, and our goals in phase one and phase two are suitable in-and out-closures of the input matrix, respectively. In-closures represent scenarios, while out-closures decide all flexible dependencies.

Theorem 1 For any M,
For any in-extension N of M, and for any i ≤ n, For any in-closure N of M, and For any M, there are N 1 and N 2 in-closures such that Corollary 1 If M contains no "?" in the diagonal, then for the represented scenario S ⊆ A, we have In phase three, we will have to decide how to handle the elements of A by choosing elements from the sets of modes called protocols.
. . , k} , of positive real numbers and the vector r i = {r i,1 , .., r i,ρ } is called a discrete multimode protocol (DMMp). We write t min , t max , q min , q max , c min , c max , r min and r max instead of min i t i , max i t i , min i q i ,max i q i , min i c i ,max i c i , min i min j r i, j and max i max j r i, j respectively. If for each a ∈ A we are given a protocol W a , then we call the set W = {W a : a ∈ A} a discrete multimode problem (DMMP) on A.
(ii) Any positive, continuous, strictly decreasing function w : [t min , t max ] → [q min , q max ]× [c min , c max ] × [r min , r max ] is called a continuous multimode protocol (CMMp) with resource demands, where 0 < t min , t max , q min , q max , c min , c max , r min , and r max are also assumed. If for each a ∈ A, we are given a protocol w a . Then, we call the set W = {w a : a ∈ A} a continuous multimode problem (CMMP).
We interpret (t, q, c, r) ∈ W a or w a (t) = (q, c, r) as paying cost c with quality q and with resource r to solve the element a ∈ A in time t using the mode assigned to (t, q, c, r). For a parallel explanation of discrete and continuous problems, we write (t, q, c, r) ∈ w a in both cases.
are satisfied for all i, j, k, l = 1, .., n, then a special case of multimode problems, namely, time-quality-resource-cost trade off problems are considered. The elements t a min , t a max , q a min , q a max , c a min , c a max , r a min and r a max may be different in different protocols w a (W a ) for each a ∈ A in general. The cases t min = t max , q min = q max , c min = c max or r min = r max are also allowed. The final goal of our algorithm is an optimal project schedule.
where (t a , q a , c a , r a ) ∈ w a for a ∈ S.
We are now ready to provide upper and lower bounds for time and cost in each stage (in any phase) of the algorithm, that is, for any matrix M ∈ {X , ∅, ?} n×n .

Definition 12 (i) For any M and W DMMP or CMMP, the minimal cost bound is
(ii) For any project schedule − → w the total project cost of − → w is To quantify project quality, both quality parameters and the task completion scores ([P] i,i ) are considered.

Definition 13 (i) For any M and W DMMP or CMMP, the maximal (relative) quality bound is
For time bounds, we must not forget the ≺ dependencies.

Definition 14 (i) For any real path
(M i j ,i j+1 = "X " for 1 ≤ j < k), the minimal time bound of the path is contains mandatory tasks only (i.e., assuming M i,i = "X " whenever a i ∈ − → P ). We denote this maximum by Thus, − → P is called a critical path, and a i 1 , a i 2 , . . . , a i k is the set of critical activities.
where − → P is any longest minimum path.
The length and definition of the longest minimum path do not depend on the project schedule − → w since t a min are summed in Eq. 21. Critical paths are in fact longest minimum paths. Clearly, t( − → w ) ≥ T min (M, W) for any W and − → w . A longest minimum path in any M can be found by a standard algorithm within O(n + d), where n is the number of tasks, and d is the number of dependencies.

Definition 15
Denote A( − → w , t) ⊆ A the set of running activities in time t for the schedule − → w . The maximal resource demands for resource k are: and the total resource vector is Theorem 2 For any M and for any inor out-closure N of M, and Further, for any project schedule − → w (for the scenario S , determined by the diagonal of N) and For M ∈ {X , ∅} n×n and − → w , we also use the following notations for total project quality, cost, time and resource demand: and and Definition 16 A project structure or net means a deterministic logic plan, i.e., every flexible relation is realized. The triplet X = (S, ≺, ∼) represents the project structure of a given scenario S ⊆ A.
The matrix representation of a project structure contains no "?" symbols at all. In phase two, we have to address the score values of the dependencies on A using the off-diagonal elements of P and Q (see Definition 7).

Definition 17
For any associative operation ⊗ on R, we define the aggregation function for project structures as and its extreme values If M is the matrix representation of a realized project structure, ⊗ nd (M) gives the score value of this project structure. 6

Calculating constraints
In all versions of the multimode functions, the maximal/minimal time, quality and cost demands can be determined for all activities. In this way, the maximal/minimal total project time (TPT), total project quality and maximal/minimal total project cost (TPC) can be determined. This feature will be used when calculating the maximal and minimal demands for a project scenario and the maximal/minimal duration of a project structure. In the case of resource-constrained HMRCPSP problems, activities can be supplementary, and the dependencies can be flexible. Unplanned tasks and dependencies can modify the project plan. If we exclude a task from the project, we also exclude the time/quality and cost/resource demands of this activity. Instead, phases 1 through 3 are directed by (37)-(56), where the constants C c , C t , C q , C r , C diag and C nd might be varied upon request; however, we assume that

Possible target function
If all constraints are specified, we are ready to specify target functions in all phases of the algorithm. These targets can be different in all phases. We specified several possible target functions, but other target functions can be specified for other applications ⊗ → max: Maximize score values in order to select the most desired project plan. TPT→ min: Minimize project duration. TPC→ min: Minimize project cost. TPQ→ max: Minimize project quality.
We are now ready to define the problems we will solve in phases one, two and three.

Hybrid multimode resource-constrained project scheduling problem
In this problem, we try to select the most desired project plans with minimal project duration, while keeping all the time/cost/resource/quality constraints.
Problem 1 phase one: Let A be a finite set of activities and M be a matrix representation assuming The role of (40) is to stop the algorithm from searching for the maximum in (37) when (40), together with (38), (39) and (41), cannot be achieved.
Problem 2 phase two: Let M be a solution to Problem 1 phase one, i.e., a matrix representation of a project scenario S ⊆ A. Let C t , C nd ∈ R + be given such that T min M , W ≤ C t and C nd ≤ ⊗ max nd M . Now, find a structure, i.e., an off-closure M of M such that assuming The role of (44) is to stop the algorithm from searching for the maximum in (42) when (44), together with (43), cannot be achieved.
After phase two, we are faced with a traditional time-cost trade-off problem; therefore, in phase three, we can specify different kinds of objective functions in Problem 3: phase three/1 and /2. Problem 3 phase three: Let M be a solution to Problem 1 phase two, i.e., a matrix representation of a given project structure X = (S, ≺, ∼). Let C c , C t ∈ R + be given such that C min M , W ≤ C c and T min M , W ≤ C t . Further, let C r be any nonnegative 7 vector of dimension ρ such that C r ∈ [TPR min , TPR max ].
Problem 3 phase three/1) Find a project schedule − → w such that Problem 3 phase three/2) Find a project schedule − → w such that Problem 3 phase three/3) Find a project schedule − → w such that Note that the requirements for all the constants in each phase ensure that this phase has at least one solution and that this matrix can be handled in the next phase.

Modeling flexible project plans
Although the proposed model can be used for both discrete and continuous versions of multimode resource-constrained project scheduling problems, in simulations, we addressed both continuous and discrete versions of MRCPSP. For practical reasons, we use a specific, deterministic, multimodal project domain matrix (PDM) to model the resource-constrained hybrid multimode resource allocation problem. The PDM is an n by m matrix (see, e.g., Table 2), where n = |A| is the number of tasks, ρ is the number of resources, m = n+(3+ρ)ω and ω = |W | is the number of modes [15]. The PDM has five domains: the logic domain (LD), time domain (TD), quality domain (QD), cost domain (CD) and resource domain (RD) (see Table 2). In the initial step, LD := P, where P ∈[0, 1] n×n is the score matrix. The diagonal [PDM] i,i = [LD] i,i = [P] i,i represents the task completion scores, and those out of the diagonal PDM i, j = LD i, j = P i, j (i = j) represent the task dependency scores between task a i and task a j . Empty cells represent the unplanned tasks and their unknown requirements. While specifying constraints, the demands of unplanned tasks are not specified. In the simulation, two contract strategies are compared, the agile strategy, which schedules unplanned task to the next sprint, but the constraints are assumed to be fixed, and the extreme strategy, which involves new tasks with their demands and modifies the constraints considering the unplanned task demands.
TD, QD and CD contain of the corresponding data of multicompletion modes − → w i ∈ W (i ≤ ω) as columns, (minimum, maximum) values while the resource domain (RD) is built up similarly for each resource (the columns are for r i, j for i ≤ ω, j ≤ ρ, see Table 2).
Kosztyáan [15] shows how to handle and resolve cycles in a PDM. Therefore, without loss of generality, we can assume that there is no cycle in the project net. In other words, the LD of the PDM can be rearranged as an upper triangular matrix. Table 2 shows an example of a project plan. Table 2(a) shows the original project plan, where the PDM is already ready to mark new/unplanned tasks. As shown in Table 1, two contract strategies can handle the unplanned tasks. Following application management (AM), the original constraints are kept, and tasks can be completed provided all demands are not greater than the constraints. Extreme project management modifies the constraint to involve the unplanned tasks (see the last two rows in Table 2), whereas if handling unplanned tasks and dependencies are not allowed, then only task B is the mandatory task. Therefore, TPT min = 1, TPC min = 2, TPR min = [2, 1] T can be specified without calculating all possible scenarios. According to Eq. (17), TPQ max = 1, TPQ min = 0.8/(4 × 0.9) = 0.22, while if the unplanned task E is also considered, than minimal values of the total project cost are TPC min = 2 and TPQ min = (0.8 + 1.0)/(4 × 0.9 + 1.0) = 0.39. The minimal duration TPT min = 1 and resource demands TPR min = [2, 1] T are not changed. Therefore, if the extra costs/duration/resource demands of the unplanned task can be accepted and the constraint can be modified, it may be beneficial for project scheduling.

PHASE ONE
We are given the matrix M 0 ∈ {X , ∅, ?} n×n . Suppose that all the "?" symbols in the diagonal are in the first σ rows (columns). The algorithm sequentially changes these symbols to either "X " or "∅" in this order; such a change is called a step. These changes are not final, and the original matrix M 0 is also saved. We look for the optimum similar to a "back-and-forth" method, saving information in the buffer B (a set) of possible ways that we might investigate later. After replacing as many elements of M as we can (satisfying Eqs.
where i denotes the element in the diagonal of M we are replacing, − → m = M 1..n,1..n is the actual content of the diagonal of M (specifically, is the"ideal" score we may achieve by replacing M i,i with Y . 8 B may contain several elements with the same ⊗ b value, but at this moment, we do not know which value can be realized later, i.e., satisfy (38)-(41) that have not yet been investigated but fulfill the bounds of (38)-(41). More precisely, for their extension, Remark 3 Before starting step i for 1 < i, at the end of step i − 1, we have inserted Y into the i − 1-th entry of M. Since we are now extending this configuration, B does not contain the corresponding record The algorithm starts a new cycle whenever it goes back to an element of B and starts to replace "?" from the i = i 0 + 1-th entry of the diagonal. Problem 1 may have a solution if, for at least in one cycle, we are able to step i to σ (satisfying (38)-(41)). Of course, we store all the in-closures M of M 0 that were found by the algorithm and may be optimal solutions to Problem 1. If B contains an element b with a higher score than M has (i.e., ⊗ b > ⊗ diag M ), then we start a new cycle from b. During this cycle, i cannot be increased to σ , then go back to b and start a new cycle, i.e., reset the diagonal of M according to − → m , set i := j, delete b from B, and go to the General Step. END of the Algorithm. (The algorithm is visualized in Fig. 2

Remark 4
If we want to find all optimal solutions to Problem 1, then replace (65) with Proof In each step, the algorithm chooses the best of (at most) two possibilities but buffers the other for further investigation. The value ⊗ diag (M) for each M is a sharp upper bound for  further continuation of M. Therefore, all the buffered possibilities with smaller ⊗ than those of the finished (and saved) matrices (in the Check Step) could be deleted from the buffer.
Since the algorithm checks each remaining element of the buffer (see the Check Step), at the end, we must obtain each optimal solution.
The result of phase one is to find [depending on the meaning of the completion scores and the aggregation functions (see Definition 4)] the most desired or most probable project scenario. Table 3 shows the results of phase one of Example 3.

Example 4
At the end of the result of phase one, only two options are allowed: tasks will be included in ("X" see on Table 3) or (because of the low priority) will be excluded from (see "∅" on Table 3) the project plan. Table 3 shows that in the case of excluding a task from a project plan, all of its demands, completion modes and dependencies are also excluded from the project plan. Similar to the original project plan, minimal and maximal values of demands can be specified without calculating all possible project structures. TPT min = max(4 + 1, 1) = 5 if only planned tasks are considered, and TPT min = max(4 + 1, 1, 1) = 5 if both planned and unplanned tasks are considered. TPC min = 2 + 3 + 4 = 9 if only planned tasks are considered, and TPC min = 2 + 3 + 4 + 2 = 11 if both planned and unplanned are considered. Because task D is excluded, if only planned tasks are considered: TPQ max = 3×0.9/4×0.9 = 0.75, while if both planned and unplanned tasks are considered, TPQ max = (3 × 0.9 + 1)/(4 × 0.9 = 0.75 + 1) = 0.80, which shows that if unplanned tasks can be completed, the total project quality can increase.
The goal of phase two is to find the most desired/most probable project structure within a project scenario. However, the project structure always depends on the result of phase one. Therefore, the "highest" scoring project structure can be interpreted only within a specified project scenario.

PHASE TWO
In phase two, the goal is to find the most probable or most desired project structure within the specified project scenario. The algorithm and most of the notation for phase two are the same as in phase one. We have to determine the "?" symbols outside of the diagonal of M in a fixed (but arbitrary) order. Before each replacement, we save the other possibility in a buffer, similar to (57), checking the conditions corresponding to (43) Table 4 shows the results of phase two Minimal and maximal values of demands can also be specified without calculating all possible project plans. TPT min = 4 + max(1, 4) = 8 if only planned tasks are considered, and TPT min = max(4 + max(4, 1), 1) = 8. Since at phase two tasks are already not excluded from the project plan, minimal/maximal values of the cost/quality/resource are not modified.

PHASE THREE
After phase two we obtain a project structure, which represents a traditional multimode resource-constrained project scheduling problem (MRCPSP). In this phase, when considerations of discrete completion modes are specified, we use Creemers [4]'s algorithm to specify the solution of the MRCPSP, and the continuous version of the problem is solved by Monghasemi et al. [18]'s algorithm. If there is no feasible solution to the given algorithm, we should go back to phase two and select the next project structure from the buffer. The optimal output matrix is a kind of domain mapping matrix (DMM), see Table 5, where flexible dependency and uncertain task completion are excluded or included. Therefore, the logic domain (LD) of the output matrix is a dependency structure matrix (DSM), where "X" represents included tasks on the diagonal, and included dependencies are on the out-diagonals of the LD. The optimal output matrix (furthermore, the project schedule matrix (PSM)) contains one vector of time/cost demands (TD,CD) and one vector of quality parameters (QD). The Original constraints 18 19 0.75 10 6 Modified constraints 21 22 0.75 12 8 PSM also contains an n by r submatrix of resource demands (RD) and a vector of scheduled start times (SST). Table 5 shows the results of phase three. Table 5 shows that because of the quality constraint, the lowest duration cannot be selected if unplanned tasks are not considered (see Table 5a). In this case, TPT = 5 + max(1, 4) = 9, TPC = 3 + 5 + 4 = 12, TPQ = 3 × 0.9/4 × 0.9 = 0.75, and TPR = [3, 2] T . At the same time, if unplanned tasks are considered, than the lowest duration of tasks can be selected. In this case, TPT is not increased. TPT = max(4+max(1, 4), 1) = 8. TPC = 2+5+4+3 = 14 if every task is completed as early as possible TPR = [3,4] T , while TPQ = (0.8 + 0.9 + 0.9 + 1.0)/(4 × 0.9 + 1.0) = 0.78. Example 5 shows that unplanned tasks do not necessarily increase the time demands, and because the growth of relative quality occurs, customers can be more satisfied.

Algorithmic complexity
Briefly, in phase one, ⊗ diag (M) is calculated and T min (M, W) is refreshed (see Definition 14), so each cycle is at most quasilinear, but we have no bounds on the total size of the buffer. Similarly, in phase two, we have to calculate T min (M, W) and ⊗ nd (M), which implies a similar upper bound on time as in phase one. Perhaps some extreme counterexamples may cause exponential running time, but practical runs (see Sect. 3) provided quadratic runs, both in phase one and in phase two.
In more detail, in general, the nth-largest value can be determined within O(n log n) computation time (e.g., [22]); however, our decision tree is a special binary heap where a quasilinear search algorithm can be specified. In Sect. 2.3, we saw that the best project structures can be found within O(s + d), where s is the number of supplementary tasks to be completed (phase one), and d is the number of flexible task dependencies (phase two). If there are no supplementary tasks to be completed, the number of possible project structures depends only on the number of flexible dependencies. If there are d flexible dependencies, then there are 2 d possible project plans (phase two). In case of acyclic project networks, the maximal number of flexible dependencies is n(n − 1)/2, and in this case, the number of possible project structures is 2 n(n−1)/2 (phase two). If there are s supplementary tasks, then 2 s project scenarios can be specified. In a special case, if s = n and d = n(n − 1)/2, then there are 2 n project scenarios (phase one) and n j:=0 n j 2 j( j−1)/2 project plans (phase two).
The computational demand of the proposed hybrid algorithm with respect to the fulfilled PEM=LD of a specified deterministic PEM is O(d) = O(n(n − 1)/2) ≈ O(n 2 ) in the case of a fulfilled upper triangular matrix (NDSM) with only mandatory tasks, and the run time O(d +s) = O(n+n(n−1)/2) ≈ O(n 2 ) is similar when regarding a fulfilled upper triangular matrix with all supplementary tasks (phase one). For example, when n = 50, completely filled upper triangular NDSM and PEM specify 5, 78 · 10 368 possible project plans, while our algorithm finds a project structure within O(50 2 ) steps (phase two). However, at the end of the project selection process, where we have a feasible project structure, the proposed algorithm has to call a method for the multimode resource-constrained project scheduling problem. In this case, the complexity of the (MRCPSP) method and the complexity of project selection are multiplied. As MRCPSP are NP-hard problems, the hybrid versions of these problems are also NP-hard problems.

Method of testing project management approaches
The main goal of this section is to test the proposed algorithm and compare it to several state-of-the art algorithms. At the same time, since applied methods can imitate decision makers, different kinds of project management and scheduling approaches can be compared. In this section, the proposed algorithm is tested on the modified MMLIB [28] project database and on generated projects, which were generated by ProGEN [13]. Flexible and traditional approaches are implemented by algorithms from the literature review. Both the continuous version of time-quality-cost trade-off methods and the discrete version of multimode resource-constrained project scheduling problems are compared. The implemented algorithms imitate decision makers (i.e., project managers), who can select a technology (completion mode) from the set of multimodes and/or who can reorganize the project. The main question was to investigate scenarios in which flexible approaches produce more feasible projects.

Data sources and selected initial project plans
The aim of selecting and generating initial project plans is to meet as much as possible the expectations for flexible project management approaches, especially the features of agile, extreme and hybrid projects. 1. Vanhoucke [30] showed that flexible projects usually contain more parallel tasks; therefore, according to Vanhoucke [30], the number of parallel tasks is greater than the number of serial tasks. 9 Nevertheless, one of the most popular agile approaches, the KANBAN method, limits the number of parallel WIP tasks, and allows only 3-5 WIPs. Therefore, in the simulation, the number of WIPs must be lower than 5.
2. Projects are usually separated into smaller autonomous subprojects (sprints) (see, e.g., [8]), that should completed within 2-5 weeks; therefore, the number of tasks is limited and should not be greater than 30. 3. Projects should contain at least two types of renewable resources (e.g., in software projects, a programmer and a tester). 4. Projects should contain at least two completion modes to apply continuous trade-off methods and at least three for testing the discrete version of MRCPSP.
Two kinds of datasets are specified. The logic networks of Dataset A came from the standard project database [30]. Project plans of Dataset B are generated by the standard project generator software ProGen [13].

Use of logic network
Since all applied databases contained logic plans, the original project plans were used. Moreover, 5 project plans (j3031_7, j3035_10, j3042_1, j3031_5, j3064_10) satisfied the above mentioned criteria from Dataset A, and 5 additional project plans were generated by ProGen. Unfortunately, all databases contained neither flexible dependencies/supplementary tasks nor unplanned tasks; therefore, on one hand, score values are attached to the customized rate of tasks and dependencies. The rate of flexible dependencies and supplementary tasks were between 10 and 40% ( f f ∈ {0.1, 0.2, .., 0.4}) (see an example in Fig. 3a). The proposed algorithm can exclude tasks and dependencies, and the original network can be changed; however, at least the mandatory tasks and fixed dependencies must be completed (see Fig. 3a).
On the other hand, the original database does not contain unplanned tasks and dependencies. Therefore, the ratio of unplanned tasks and dependencies are specified between 0 and 40% (u f ∈ 0.0, 0.10, .., 0.40) (see an example in Fig. 3c). Unplanned tasks and dependencies can contain mandatory tasks and fixed dependencies (see Fig. 3d). This modified dataset is capable of checking flexible management approaches. The modified databases contain 2 datasets, which contain 5-5 original project plans. These project plans contain a flexible project plan with 4 kinds of flexible rates. Moreover, 5 kinds of ratios of unplanned tasks and dependencies can be attached to the original project plan. Therefore, 2 × 5 × 4 × 5 = 200 logic plans are investigated.

Use of demands
Since quality parameters are missing from every known project database, we have to calculate according to the quality-cost trade-off functions. Only the relative quality functions were calculated. In the case of the continuous version, a higher budget that can allow higher quality is considered. Moreover, usually an inverse proportionality can be assumed between the cost and quality. The (relative) quality parameters were simulated to the i-th task. In the case of the continuous version of trade-off methods, only two completion modes are specified for minimal/maximal values of durations/cost and resource demands. However, in the discrete version of MCRPSP, a randomized third completion mode is generated for time, cost, quality and resources; therefore, the trade-off assumptions between time-cost, time-resources and cost-quality are not satisfied in this case. Since both the discrete and the continuous version of the problem are examined, 200 × 2 = 400 project plans are specified.

Calculating constraints
All of the traditional approaches, agile project management approaches, and application management approaches specify the budget, deadlines and resource constraints based on only   [28] the planned tasks and dependencies. However, the extreme project management approach allows the project managers to confirm the extra cost and duration of unplanned tasks, and the constraints can be modified. Therefore, in the simulation, two kinds of contract strategy are compared. In the first strategy, the constraints are specified by considering only planned tasks. The agile project management approach does not allow new, unplanned tasks and dependencies. Therefore, these new tasks will be completed in a next sprint. However, the application management approach can confirm new tasks for which the original budget constraint allows their completion.
The other contract strategy is the flexible contract strategy, where the new tasks can increase the budget and can modify the deadline.
In the simulation, the five constraints (C t ,C c ,C q ,C s ,C r ) were between the possible minimal and maximal values of demands. Then, Eq. (67) calculates: where C x represents the constraints (i.e., C x ∈ {C t , C c , C q , C s , C r }) and TPX represents the total project time/cost/quality/score/resources, respectively.
Two kinds of contract strategies and 2 5 kinds of constraints on 400 project plans specified 400 × 2 × 2 5 = 25,600 problems.

Target function
Though different kinds of target functions can be considered, we only want to specify the most desired project plan (maximal total project scores), where the completion time of the project is minimal.

Applied agents
Applied algorithms imitate decision makers. The traditional project management approach does not allow flexible dependencies and supplementary tasks; therefore, all flexible dependencies are considered as fixed and all supplementary tasks are considered as mandatory tasks. In the case of discrete completion modes, we obtain an MRCPSP problem, which was solved by Creemers [4]'s algorithm, while the continuous version of the problem was solved by Monghasemi et al. [18]'s algorithm. These algorithms imitate the decision maker who follows a traditional project management approach. Furthermore, these algorithms are called Traditional Project Management agents (TPMa).
To implement Agile Project Management agents (APMa), we used Kosztyán [15]'s Exact Project Ranking (EPR) algorithm. This algorithm does not consider different kinds of completion modes. Therefore, only minimal (so called normal) time demands and their cost/quality/resource demands are considered. Furthermore, this algorithm is called the Agile Project Management agent (APMa).
Despite that the original version of EPR does not allow the unplanned tasks and dependencies, the proposed extension of the PDM matrix and the extension of the set of activities can capably solve the problem. If the constraints are calculated based only on the planned tasks, and there is no chance to modify the constraints, the algorithm imitates the application management approach; therefore, the modified version of EPR is called an Application Management agent (AMa). However, if the extra demands can modify the constraints, than the modified EPR can imitate the decisions of the extreme project managers, and this algorithm, henceforward, is called the eXtreme Project Management agent (XPMa).
The proposed algorithm handles both the supplementary and the unplanned tasks and dependencies, and in addition, it can handle the multimode of completion modes. The decision maker can combine the multimode and the project screening techniques to reorganize the project. This algorithm can imitate the decision maker who follows the hybrid project management approach. Therefore this algorithm is, furthermore, called the Hybrid Project Management agent (HPMa).

Feasibility and the scheduling performance
On one hand, one of the main aspects of comparing the examined agents is to specify feasible project plans, namely, which agent and which project management approach can solve more problems.
On the other hand, it is also important to determine which feasible method can save more time, cost and resources. Therefore, the scheduling performances are specified as follows: T P Q% = T P Q/C q − 1 (71) T P S% = T P S/C s − 1 ( 7 2 ) All scheduling performances are between [0, ∞], specifically, 0 if the total project time/cost/quality/score/resource and the given constraints are equal. The scheduling performances are 1 if half of the budget, duration, resource demands, etc. can be saved. A greater value can produce higher scheduling performance. The verification of optimality is a considerably hard problem because in this case, we should specify all the possible project structures, and we should find an optimal solution in a fixed project structure. However, because of the problem complexity (see Sect. 2.3.4), this kind of testing works only in small problems. Therefore, we tested the proposed algorithm only in small projects, where the logic domain was 5 × 5.

Results
If unplanned tasks are not allowed, three kinds of algorithms can be compared, both for the continuous version of the time-quality-cost trade-off problem (CTQCTP) and the discrete version of the multimode resource-constrained project scheduling problem (MRCPSP). TPMa represents the traditional project management approach, where every (not only mandatory, but supplementary) task and all (not only fixed, but flexible) tasks are included in the project; therefore, we obtain either the traditional (resource-constrained) CTQCTP or an MRCPSP problem. To imitate CTQCTP, we used Creemers [4]'s algorithm, while in the case of MRCPSP, Monghasemi et al. [18]'s is implemented.

Results of feasibility test and verification optimality
Given the large number of project scenarios and project structures in the cases of flexible projects (see Sect. 2.3.4) and the NP-hardness of MRCPSP-s, the feasibility is first checked. The question was to determine which method can produce a more feasible project.
Considering all databases and all the continuous and discrete problems, the feasibility rate was 72.03%. Despite that the agile project management approach (implemented by Kosztyán [15]) cannot handle multimodes and trade-offs, the feasibility rate was 78.64%.
More feasible projects could be specified if the flexibility factor was higher (see Fig. 4). However, the proposed HPMa can produce projects that are 98.83% flexible. Figure 4 shows that in the case of more flexible projects, the agile project management approach produces more feasible projects, while the traditional project management approaches perform better if the flexibility ratio is lower. Because the characteristics of project management agents are not different when considering dataset A and dataset B, we combined these datasets and show results on the joined dataset.
Verification of optimality of the proposed method was performed in two steps. First, without using resource constraints, flexible task dependencies, and supplementary tasks, the optimal solution of a CTQTCP problem can be specified by Creemers [4] [15]'s algorithm can specify the optimal solution. In this case, the proposed and Kosztyán [15]'s algorithm produced the same results.
After the first step, we specified random 5 × 5 logic domains, which is quite small to specify all possible project scenarios and all project structures. According to the complexity of the problem, the number of possible project plans is 5 . For all possible project plans without resource constraints, Kosztyán [4]'s and the proposed algorithm are compared, and both algorithms could find the optimal solution. However, this mode of verification cannot be used for larger matrices because for a 6 × 6 logic domain, the possible project plan is 979,841.

Comparing scheduling performance
Both XPMa and AMa are based on the modification of Kosztyán [15]'s algorithm. Figure 5 shows that HPMa produces the most feasible project. At the same time, the ratio of feasibility can be increased if the constraints are not fixed as in AM but are flexible as in XPM. Figure 6 shows the scheduling performances for MRCPSP problems, where greater values are better (shows lower TPT, TPC, TPR and higher TPQ, TPS; see Eqs. (68)-(72)). The HPMa produces the lowest TPT because the scheduling performance of the total project time (TPT%), 2.18, is the best for the proposed algorithm, but the cost of this performance is such that the other scheduling performance indicators are better for TPMa and APMa algorithms (see Fig. 6a).
Although TPMa has produced the lowest ratio of feasible project plans, TPMa reduces the most cost demands for feasible project plans.
APMa is the most effective for increasing quality and allocating resources. Figure 6b shows that HPMa can reduce the TPT most effectively while keeping more tasks, but XPMa and AMa can reduce cost and resources most effectively.

Discussion
In flexible project environments, flexible approaches, such as agile and extreme project management approaches, can specify more feasible projects; therefore, these approaches can be more successful than the traditional approaches. At the same time, if there are more completion modes, hybrid approaches can handle both the flexibility and the selection from completion modes. This combination of approaches can produce the most feasible projects. The other advantage of the hybrid approach is that it can be used in cases of both flexible ( f f is high) and nonflexible environments ( f f is low). On one hand, if there is no flexible dependency and supplementary task, the HPMa is the equivalent of TPMa.
On the other hand, if there is only one completion mode and we consider only planned tasks, HPMa is the equivalent of APMa. At the same time, in the flexible project environment when unplanned tasks can also be included in the project, HPMa is equivalent to AMa if constraints are fixed, but HPMa = XPMa if the constraint is flexible. Nevertheless, in the general case, if more than one completion mode (technology) is specified, in a flexible project environment HPMa can use both traditional and flexible scheduling techniques in order to specify feasible projects. Figure 5 shows that the flexible environment (higher flexibility factor) can increase the rate of flexibility more than the number of unplanned tasks. However, if extra costs and extra efforts of unplanned tasks are considered, the ratio of flexibility can be increased. Although Fig. 6 shows results only for MRCPSP, where trade-offs between time and cost, cost and quality, time and resources are not assumed, a kind of trade-off between methods can be observed. Figure 6 shows that the proposed HPMa can reduce TPT most effectively, but this method is not superior. Traditional and flexible project management approaches, such as APMa, XPMa, AMa can save more money and more resources. Flexible approaches can provide greater increases in quality and can be more effective in resource allocation. HPMa can be most effective for reducing time because this approach can reorganize the project and can select from completion modes, while other approaches use only one technique; however, other methods can save more resources and can produce more quality, while HPMa is usually closer to the constraints.

Summary and conclusion
The proposed hybrid multimode resource-constrained project scheduling problem approach may bridge the agile and traditional project management approaches. If there are no flexible dependencies or supplementary task completions, the problem amounts to the traditional MRCPSP problem. The hybrid project management (HPM) approach combines methods (e.g., TQCTP. MRCPSP) from traditional project management, and structuring and scoring techniques from agile project management. The proposed algorithm is a fast, efficient method that supports the hybrid project management approach. The algorithm is able find an optimal solution according to predefined preferences over factors such as time, cost and quality. The proposed algorithm is able to handle unplanned tasks; therefore, this method can be used in a continuously changing environment. This paper shows that a hybrid approach can be an adequate alternative to flexible project management approaches. Traditional and flexible approaches can and should be combined in order to specify more feasible projects, and increase the scheduling performance of the project duration.
The developed matrix-based method and proposed exact algorithm may be important and essential components of a project expert system supporting strategic decision making, particularly in cases of large, complex, and flexible projects.

Limitations and future works
The proposed model extends the traditional multimode resource-constrained project scheduling problem; however, in this model, only renewable resources (e.g., human resources) and one nonrenewable resource (e.g., cost demand) are considered. In project management, renewable, nonrenewable, and semirenewable resources may also be important parameters. Therefore, this extension will be considered in future research. Another possible application of this method is in risk management and risk analysis. Supplementary and unplanned task completions can model changes in management or client claims. Flexible task dependency can model technological changes. In these cases, a more appropriate matrix-based model could be specified, and the efficiency on risk mitigation of traditional and flexible project management approaches can be compared for different kinds of project plans.