mirror of
https://github.com/Zenithsiz/ist-ddrs-lab2
synced 2026-02-09 00:51:14 +00:00
Replaced "Acum" with "Accum".
This commit is contained in:
6
code/6.R
6
code/6.R
@@ -5,7 +5,7 @@ calc_avg_delay <- function(ArrivalRate, ServiceRate, StoppingCondition) {
|
||||
NumQueueCompleted <- 0
|
||||
ServerStatus <- 0
|
||||
NumInQueue <- 0
|
||||
AcumDelay <- 0
|
||||
AccumDelay <- 0
|
||||
QueueArrivalTime <- c()
|
||||
EventList <- c(rexp(1, ArrivalRate), Inf)
|
||||
|
||||
@@ -27,7 +27,7 @@ calc_avg_delay <- function(ArrivalRate, ServiceRate, StoppingCondition) {
|
||||
ServerStatus <- 0
|
||||
EventList[2] <- Inf
|
||||
} else {
|
||||
AcumDelay <- AcumDelay + Time - QueueArrivalTime[1]
|
||||
AccumDelay <- AccumDelay + Time - QueueArrivalTime[1]
|
||||
QueueArrivalTime <- QueueArrivalTime[-1]
|
||||
NumInQueue <- NumInQueue - 1
|
||||
NumQueueCompleted <- NumQueueCompleted + 1
|
||||
@@ -36,7 +36,7 @@ calc_avg_delay <- function(ArrivalRate, ServiceRate, StoppingCondition) {
|
||||
}
|
||||
}
|
||||
|
||||
AcumDelay / NumQueueCompleted
|
||||
AccumDelay / NumQueueCompleted
|
||||
}
|
||||
|
||||
generate_graph <- function(rho, output_file) {
|
||||
|
||||
Reference in New Issue
Block a user