Program Evaluation and Review Technique (PERT) Analysis to Predict Completion Time and Project Risk Using Discrete Event System Simulation Method

—The prediction of project completion time, which is important in project management, is only based on an estimate of three numbers, namely the fastest, slowest, and presumably time. The common practice of applying normal distribution through Monte Carlo simulation in Program Evaluation and Review Technique (PERT) research often fails to accurately represent project activity durations, leading to potentially biased project completion prediction. Based on these problems, a different method is proposed, namely, Discrete Event Simulation (DES). The research aims to evaluate the effectiveness of the simmer package in R in conducting PERT analysis. Specifically, there are three objectives in the research: 1) develop a simulation model to predict how long a project will take and find the critical path, 2) create an R script to simulate discrete events on a PERT network, and 3) explore the


I. INTRODUCTION
S Imulation is often used to explore the complexities of many real-world systems due to the adoption of exorbitant analytical models [1][2][3].This problemsolving method predates the invention of computers.However, recent developments have led to the linking of similar tools and methods.Simulation is also the process of designing the model of a real system and conducting experiments to understand the behavior of the system [4,5].The simulation process is also used to evaluate various strategies in the limits imposed by a set of criteria for operational purposes [1,3].Several forms of simulation are used, depending on the nature of the system under investigation.A standard model 2 out again in the same manner in the future.The main aim of PERT is to reduce delays, production disruptions, and conflicts while efficiently coordinating and synchronizing various project components to accelerate completion.Graphically, PERT is represented as a network consisting of events and activities.These events and activities are depicted as circles and arrows, respectively.Figure 1 is an example of a network comprising four events (cycles) and activities [3], [10].PERT is a method to predict the time required to complete a project with probabilistic elements.It adopts a three-digit estimation method, considering the fastest, slowest, and presumably time [10].In practice, the use of a normal distribution assumption for probabilistic time often leads to biased predictions [11].The research proposes a new method, namely using DES based on the three estimated time numbers, known as the triangular distribution.Constructing a PERT network requires comprehensive information about all significant project activities or tasks.Accurate mapping of preceding and succeeding activities for each task is crucial.Furthermore, the completion time of an activity can be obtained through a brainstorming process, typically including the fastest, longest, and presumably time.The development of PERT is based on six steps [12], [13], as follows: 1) Define the project and identify all significant activities or tasks.
2) Establish connections between these activities, determining which ones should precede or follow the others.3) Describe the network that connects all activities.taxonomy divides simulation issues into three categories: deterministic vs. stochastic, static vs. dynamic depending on the requirement of a temporal component, and continuous vs. discrete based on how the system changes [1,2].For example, the Monte Carlo method is a well-known static stochastic simulation method [1,6,7].
Another typical example is Discrete Event Simulation (DES), which is designed to model stochastic, dynamic, and discretely changing systems.DES differs from continuous simulation methods, which rely on smoothly evolving equational models [8].In DES, state transitions occurred abruptly at specified moments in simulated time.Simmer is a DES package for R that facilitates high-level process-oriented modeling, similar to the functionality offered by other modern simulators [9][10][11].This package adopts the concept of trajectory, representing a shared path in a simulation model for entities of the same type.In addition, the trajectory is a set of standardized acts that characterize the lifecycle of similar processes.This design pattern is easy to implement and uses the chaining or piping process of the magrittr package [2,8].
Program Evaluation and Review Technique (PERT) is a method used for planning and controlling nonrepetitive projects.The projects include topics that have not been conducted and will not be carried out again in the same manner in the future.The main aim of PERT is to reduce delays, production disruptions, and conflicts while efficiently coordinating and synchronizing various project components to accelerate completion.Graphically, PERT is represented as a network consisting of events and activities.These events and activities are depicted as circles and arrows, respectively.Figure 1 is an example of a network comprising four events (cycles) and activities [4,12].
PERT is a method to predict the time required to complete a project with probabilistic elements.It adopts a three-digit estimation method, considering the fastest, slowest, and presumably time [12].In practice, the use of a normal distribution assumption for probabilistic time often leads to biased predictions [13].The research proposes a new method, namely using DES based on the three estimated time numbers, known as the triangular distribution.Constructing a PERT network requires comprehensive information about all significant project activities or tasks.Accurate mapping of preceding and succeeding activities for each task is crucial.Furthermore, the completion time of an activity can be obtained through a brainstorming process, typically including the fastest, longest, and presumably time.The development of PERT is based on six steps [14,15], as follows: 1) Define the project and identify all significant activities or tasks.2) Establish connections between these activities, determining which ones should precede or follow the others.3) Describe the network that connects all activities.4) Assign estimated time and cost to each activity.5) Calculate the critical path, the longest time path through the network.6) Use the network to help with project planning, scheduling, and control.
The research focuses on the fifth step, particularly in predicting the project or program completion time.Therefore, the research objectives are formulated based on previous studies [16,17].It aims to 1) develop a simulation model capable of predicting project completion time and identifying the critical path, 2) develop an R script that simulates discrete events on the PERT network, and 3) explore simulation output using simmer package, both in the form of summary statistics and estimates of project risk.In addition, combining the statistical and graphical analysis of R with the simmer package offers interesting possibilities [18].68 The synergy between simmer and other R packages is also analyzed.The main competitors of simmer are SimPy and SimJulia, developed for Python and Julia, respectively [19,20].

II. RESEARCH METHOD
The research adopts descriptive, exploratory, and library methods [21][22][23].The following steps are applied: 1) The literature is thoroughly assessed to understand the fundamental principles of PERT.R functions are implemented using R and simmer package to conduct a simulation.2) Review the literature thoroughly to understand the environmental structure of the simmer class completely.3) Collect data using generated information based on the PERT network problem for a hypothetical project.4) Develop a flowchart showing the PERT network of a hypothetical project.5) Verify the accuracy and reliability of the model developed in the fourth step.6) Develop R scripts in stages, starting with the simplest form and gradually to the complex one.7) Run simulations multiple times to predict the completion time of the project and experiment with different scenarios.8) Analyze simulation output, which includes: a) Evaluate the estimated duration of project completion.The research repeats the simulation 100 times because, from the observations, the values obtained are relatively stable.Simulation output from these iterations provides both the predicted value for the project completion time and an estimate for the confidence interval.b) Conduct a critical path analysis, which includes identifying available pathways and determining the path with the longest duration achieved through simulation.c) Conduct a project risk analysis, specifically assessing the risk of project completion delays.However, through simulation calculations, probabilities of project delays will be determined for various promised completion times.The research focuses on predicting the project completion time and identifying the critical path in the developed network.Based on predefined lower, upper, and mode values, the hypothetical network has activity durations following a triangular distribution.Therefore, the research can be referenced in more realistic projects.
Next, the PERT network used is hypothetical, reflecting the focus on assessing the effectiveness of discrete event system simulation in project management, particularly in predicting the completion time.The success of the research leads to testing the method on the PERT network with real problems.The research focuses on the time resource and fails to discuss the cost aspect of each activity.In addition, the cost is directly proportional to the amount of time needed to complete an activity.It focuses on the significance of considering time as a crucial resource in project management [12,13].

III. RESULTS AND DISCUSSION
PERT network consists of two essential elements: status, depicted as circles, and activity, represented by arrows marked with specific numbers, respectively [14].The network provided, representing a project, serves as the basis for discussion, with the completion time predicted using the DES method.The network in Fig. 2 shows a project with nine activities and six states or stages, denoted by circles labeled A to F. Each activity is numbered 1 to 9 in the box [4].
A: The project starts, as well as activities 1, 2, and 3. B: Activity 1 is completed, triggering the start of 4. C: Activities 2 and 5 are completed, and 6 and 7 are initiated simultaneously.D: Activities 3 and 7 are completed, prompting the start of 6 and 9. E: Activity 4 is completed, leading to the start of 8. F: Completion of activities 6, 8, and 9, ending the project.The completion time for each activity follows a triangular distribution with parameters a, b, and m denoted by triangular (a, b, m) [20].The time units are measured in weeks, with a, b, and m denoting the fastest, longest, and presumably time or mode, respectively.Table I shows the estimation parameters of the triangular distribution for nine activities.
The prediction of project completion time is conducted through the DES method using a simmer package in R. R coding is divided into four parts, starting with defining the duration for each activity.This initialization process is structured as a user-generated function.Three essential packages, namely simmer, EnvStats, and parallel package, are used for simulation, and the rtri function is used for triangular distribution and iterating over simulation runs.
In the context of DES, the PERT network shown in Fig. 2   The completion time for each activity follows a triangular distribution with parameters , , and  denoted by triangular (a, b, m) [18].The time units are measured in weeks, with , , and  denoting the fastest, longest, and presumably time or mode, respectively.Table 1 shows the estimation parameters of the triangular distribution for nine activities.process.The steps applied in writing the R script are as follows: 1) The initialization process includes two main steps: a) producing a simulation environment using a simmer function named PERT2 and b) defining the completion duration for activity i ( duration_i) to obtain the value of the triangular distribution random variable.These values, named duration_1, duration_2, . . ., duration_9, correspond to nine activities studied.

2) The completion duration values (duration_i)
in step 1 are allocated to trajectories labeled traj_1, traj_2, . . ., traj_9, which correspond to each activity in the PERT network.
Trajectories trigger processes upon entity entry and are represented as global variables named time_1, time_2 . . ., time_9.
3) The activity paths in the PERT network are defined, with six paths used as references.Subsequently, six trajectory objects are designed, namely tarj_148 referring to activity paths 1, 4, and 8, traj_156, . . ., traj_29.Each path contains a timeout, determined by the global variable time_i.For example, the delay time of traj_148 comprises global variables time_1, time_4, and time_8.The total time is stored in the attribute variable, time 148, with the same procedure applied to other trajectories.The attribute variable is used to attach the variable value to the entity.4) The traj_initial trajectory is defined and acts as the initial point for the entity before proceeding to trajectories traj_1, traj_2, . . ., traj_9.In traj_initial, an entity is first cloned to obtain six instances before simultaneously entering traj_1, traj_2, . . ., traj_9.
Therefore, the entities that enter these trajectories tend to initiate the process of assigning global values to the variable of time_i.For example, entry into traj_1 initiates a global assignment of time_1.5) The traj_pert2 is similar to traj_initial, which duplicates the entity to six, corresponding with the number of paths in the network.Entities entering trajectory process timeouts to obtain the total.The resulting sum is stored in the attribute variable.For example, traj_148 stores time_148, representing the total time it takes to complete paths 1, 4, and 8.The entity exiting traj_pert2 has the highest attribute variable showing the longest time, stored as execution_time.6) In the final stage of the simmer simulation environment (PERT2), two processes occur.The pro-70 Each trajectory reads the duration of the corresponding activity by generating random variables based on the triangular distribution.In addition, the resulting values are stored globally.
In the following section, the trajectory of an entity is established to initiate the generation of a triangular distribution random variable and store it globally.The trajectory ranges from traj_1 to traj_9.In addition, traj_initial uses a simmer clone function to duplicate the entity into nine identical ones.Then, each entity enters the respective trajectory of traj_1, traj_2, ..., traj_9.The code for this process is stated as follows.
This trajectory is designed to produce a global variable of time_i , representing the activity time across all PERT paths, ensuring uniformity.The simmer function time_out_from_global is employed for this purpose.The following code outlines the trajectory of the entity responsible for recording the completion duration of each particular PERT path.The set attribute function is traj_pert2.The predicted completion time for the project is stored in the execution_time variable.Simulation must be run multiple times to obtain statistical measures, such as the standard deviation, standard error, confidence interval, and others.The available mclapply function in the parallel package is also used to obtain statistical measures.The add_generator function generates an entity named dummy1, which traverses the traj_initial.The second add_generator function is designed to generate an entity named dummy2, which traverses the traj_pert2.
has <-get_mon_attributes(pert2) result <-subset(has, key == "execution_time", select = c(key, time, replication)) return(result) } The user-defined function is executed as follows: Execution_time is the longest duration among six paths in the PERT network, acting as a predictive variable for the duration of the project.This value is derived from the time variable.The replication variable refers to the repetition of simulation, comprising a total of 100 simulations, with only the first six replicates shown.The result is as follows.The histogram representing the predicted project completion time is obtained as follows: win.graph (width=4.6,height=5,pointsize=10) hist( dt$time,main="Prediction \n ProjectCompletionTime", xlab="CompletionTime") The histogram in Fig. 3 shows a distribution close to normal.A normality test is carried out in accordance with the Shapiro-Wilk normality test and quantilequantile (q-q) plots to validate this observation.The variance value of 0.3704 is quite large, showing that the time spread adhered to a normal distribution.It is reinforced by q-q plots.

shapiro.test(dt$time) # Normality test
Shapiro-Wilk normality test data: dt$time W = 0.98594, p-value = 0.3704 The q-q plot in Fig. 4 confirms that the simulation data for project completion predictions are normally distributed [24,25].It can be understood because the sample size is quite large (100) and is obtained from the sum of the triangular distributions.The mean and standard deviation of these predictions are as follows.
(SDev <-sd(dt$time)) # Std Deviation 2.239672 (average <-mean(dt$time)) # average 20.69473Based on simulation results, the average project can be completed in 20.7 weeks with a standard deviation of 2.24 weeks.Therefore, a 95% confidence interval estimator for the average project completion time is obtained.The average duration for the actual project completion, with a probability of 0.95, is between 20.2 to 21.1 weeks.The calculation is shown as follows.Next, the critical path in the PERT network, relevant for determining the project completion time, is identified as the path with the longest duration.Therefore, the critical path of six pathways in the PERT network is obtained as follows: The histogram in Fig. 3 shows a distribution close to normal.A normality test is carried accordance with the Shapiro-Wilk normality test and quantile-quantile (q-q) plots to valida observation.The variance  = 0.3704 is quite large, showing that the time spread adhere normal distribution.It is reinforced by q-q plots.The q-q plot in Fig. 4 confirms that the simulation data for project completion predictions are normally distributed [22] [23].It can be understood because the sample size is quite large (100) and is obtained from the sum of the triangular distributions.The mean and standard deviation of these predictions are as follows.
( < − ($)) #   2.239672 ( < − ($)) #  20.69473Based on simulation results, the average project can be completed in 20.7 weeks with a standard deviation of 2.24 weeks.Therefore, a 95% confidence interval estimator for the average project completion time is obtained.The average duration for the actual project completion, with a probability of 0.95, is between 20.2 to 21.1 weeks.The calculation is shown as follows.The result is as follows.In PERT, the main concern is the risk of not meeting the scheduled completion time promised to the project owner.The project completion time, as shown previously, is at least approximately normal distribution.The following is a project risk level at various promised completion times.The result is as follows.If the promised completion time is 25 weeks, the risk level is 2.7%.In other words, the probability that the project is completed beyond 25 weeks is 2.7%.However, if the maximum risk tolerance is 1%, the project manager should promise a maximum completion time of 26 weeks.The calculation is shown as follows.
(WS <-qnorm(0.01,mean=mean2, sd=SDev, lower.tail=FALSE)) 25.90499 Simulation is rerun by developing DES using a simmer package.Each activity is represented as a timeout function in simulation without using resources to eliminate the queuing subsystem.Entities in this simulation traverse trajectory representing a path in PERT.In cases where the paths run parallel, entities are duplicated using the clone function on simmer.Consequently, identical entities traverse each parallel path, all starting at time 0. The total delay time in each path will be calculated and synchronized with the simmer function, which is synchronized with the argument function wait=TRUE.The function is paused until the entity exiting trajectory is the last one from the results duplicated, ensuring that the recorded time is the longest.It encapsulates the basic idea of developing a program for PERT simulation.
Simulation is repeated 100 times or as needed for further statistical analysis based on computational speed and specific requirements.In the research, 100 repetitions are presumed adequate.The simulation results are obtained as a data set retrieved from the output of the get_mon_attributes function.The resulting data set consists of three variables, namely key, time, and replication.The key variables contain the names of attributes or global variables stored during simulation.The time represents the delay time associated with each variable, while replication shows the sequence of simulation repetitions.The most important key value is execution_time, which stores the project completion time, as shown by the time value.This value is used to predict the completion time of a project for each replication.In addition, simulation saves the delay time for each path per iteration, enabling the determination of critical paths in each simulation replication.The analysis results show that the project completion time is statistically proven to be dispersed according to the normal distribution.Therefore, the project risk value can be calculated, representing the possibility of the project not meeting the predetermined completion timeframe.

IV. CONCLUSION
Simulation, including 100 replications, results in a predicted project completion time and a standard deviation of 20.7 and 2.2 weeks, respectively.A 95% confidence interval for the actual completion time falls in 20.2 to 21.1 weeks.In addition, path 1-5-7-9 is the longest path, identified as the critical path due to the longest completion time.When the promised completion time is 25 weeks, the associated risk level is 2.7%.Therefore, the probability that the project will be completed after 25 weeks is 2.7%.Assuming the tolerable risk has a maximum of 1%, the promised completion time of the project need not exceed 26 weeks.
The DES method has been proven highly effective in predicting the completion time of a project described by the PERT network.In addition, it offers increased flexibility because, after each completion of a project stage, the simulation model is rerun to obtain a more accurate prediction of the completion time.The inputs in this simulation include 1) the activities in the project of concern, 2) the sequence of these activities, and 3) the estimated fastest, most prolonged, and most frequent completion time or mode for each activity.These

Figure 1
Figure 1 Example of a simple Program Evaluation and Review Technique (PERT) network.

FFig. 1 .
Fig. 1.Example of a simple Program Evaluation and Review Technique (PERT) network.

4 B
is viewed as an entity trajectory, initiating each 69 Cite this article as: I. G. A. A. Yudistira, R. Nariswari, S. Arifin, A. A. Abdillah, P. W. Prasetyo, N. Susyanto, "Program Evaluation and Review Technique (PERT) Analysis to Predict Completion Time and Project Risk Using Discrete Event System Simulation Method", CommIT Journal 18(1), 67-76, 2024.: Activity 1 is completed, triggering the start of 4. C : Activities 2 and 5 are completed, and 6 and 7 are initiated simultaneously.D : Activities 3 and 7 are completed, prompting the start of 6 and 9. E : Activity 4 was completed, leading to the start of 8. F : Completion of activities 6, 8, and 9, ending the project.

Figure 2
Figure 2 Program Evaluation and Review Technique (PERT) network for a hypothetical project.

Fig. 2 .
Fig. 2. Program Evaluation and Review Technique (PERT) network for a hypothetical project.

Figure 3
Figure 3 Histogram of the predicted time of project completion.

Fig. 3 .
Fig. 3. Histogram of the predicted time of project completion.

Table 1
Activity Name and Processing Time with Triangular Distribution (a, b, m)

TABLE I ACTIVITY
NAME AND PROCESSING TIME WITH TRIANGULAR DISTRIBUTION (a, b, AND m).
Cite this article as: I. G. A. A. Yudistira, R. Nariswari, S. Arifin, A. A. Abdillah, P. W. Prasetyo, N. Susyanto, "Program Evaluation and Review Technique (PERT) Analysis to Predict Completion Time and Project Risk Using Discrete Event System Simulation Method", CommIT Journal 18(1), 67-76, 2024.path is not similar for each replicated simulation.The following frequency table shows that path 1-5-7-9 is often the longest.Among the 100 replications of the simulations, path 1-5-7-9 is recorded 25 times as the longest path, while path 3-9 is recorded 19 times as the longest path.