Settin the working directory, choosing the file location
setwd("~/SIP/SIP Phase 2/R Programming/Netwrok Problems")
Loading the file into R
Network <- read.csv(paste("Network Problem 2.csv", sep=""))
Loading the packages
library("R6")
## Warning: package 'R6' was built under R version 3.4.3
library("dplyr")
## Warning: package 'dplyr' was built under R version 3.4.3
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library("projmanr")
## Warning: package 'projmanr' was built under R version 3.4.3
library("tidyr")
## Warning: package 'tidyr' was built under R version 3.4.3
library("igraph")
## Warning: package 'igraph' was built under R version 3.4.3
##
## Attaching package: 'igraph'
## The following object is masked from 'package:tidyr':
##
## crossing
## The following objects are masked from 'package:dplyr':
##
## as_data_frame, groups, union
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
## The following object is masked from 'package:base':
##
## union
Viewing the dataset
View(Network)
Making a gantt chart
gantt(Network, start_date = Sys.Date())

Making the network diagram
network_diagram(Network)

Finfing the critical path
critical_path(Network)
## $critical_path
## [1] "5" "10" "12" "16" "17" "26" "27" "30" "32"
##
## $results
## id name start_date end_date duration is_critical pred_id
## 1 1 T1 2018-03-14 2018-03-14 0 FALSE
## 2 2 T2 2018-03-14 2018-03-16 2 TRUE 1
## 3 3 T3 2018-03-14 2018-03-17 3 FALSE 1
## 4 4 T4 2018-03-14 2018-03-20 6 FALSE 1
## 5 5 T5 2018-03-16 2018-03-24 8 TRUE 2
## 6 6 T6 2018-03-17 2018-03-20 3 FALSE 3
## 7 7 T7 2018-03-16 2018-03-18 2 FALSE 2
## 8 8 T8 2018-03-24 2018-03-26 2 FALSE 5
## 9 9 T9 2018-03-24 2018-03-25 1 FALSE 5
## 10 10 T10 2018-03-24 2018-04-01 8 TRUE 5
## 11 11 T11 2018-03-20 2018-03-24 4 FALSE 6
## 12 12 T12 2018-04-01 2018-04-04 3 TRUE 10
## 13 13 T13 2018-03-20 2018-03-22 2 FALSE 6 2
## 14 14 T14 2018-03-24 2018-03-31 7 FALSE 7 11
## 15 15 T15 2018-03-25 2018-03-31 6 FALSE 9
## 16 16 T16 2018-04-04 2018-04-12 8 TRUE 12
## 17 17 T17 2018-04-12 2018-04-17 5 TRUE 16
## 18 18 T18 2018-03-17 2018-03-23 6 FALSE 3
## 19 19 T19 2018-03-31 2018-04-08 8 FALSE 4 15
## 20 20 T20 2018-04-17 2018-04-22 5 FALSE 17
## 21 21 T21 2018-04-12 2018-04-14 2 FALSE 16
## 22 22 T22 2018-04-12 2018-04-13 1 FALSE 6 16
## 23 23 T23 2018-04-13 2018-04-16 3 FALSE 13 22
## 24 24 T24 2018-03-17 2018-03-23 6 FALSE 3
## 25 25 T25 2018-04-22 2018-04-27 5 FALSE 9 20
## 26 26 T26 2018-04-17 2018-04-27 10 TRUE 13 17 21
## 27 27 T27 2018-04-27 2018-05-05 8 TRUE 22 26
## 28 28 T28 2018-04-27 2018-05-02 5 FALSE 18 23 25
## 29 29 T29 2018-04-13 2018-04-18 5 FALSE 8 19 22
## 30 30 T30 2018-05-05 2018-05-13 8 TRUE 27
## 31 31 T31 2018-05-02 2018-05-08 6 FALSE 24 28
## 32 32 T32 2018-05-13 2018-05-13 0 TRUE 29 30 31
##
## $total_duration
## [1] 60
##
## $end_date
## [1] "2018-05-13"
##
## $network
## IGRAPH 4152f91 DN-- 32 47 --
## + attr: name (v/c)
## + edges from 4152f91 (vertex names):
## [1] 1 ->2 1 ->3 1 ->4 2 ->5 2 ->7 2 ->13 3 ->6 3 ->18 3 ->24 4 ->19
## [11] 5 ->8 5 ->9 5 ->10 6 ->11 6 ->13 6 ->22 7 ->14 8 ->29 9 ->15 9 ->25
## [21] 10->12 11->14 12->16 13->23 13->26 15->19 16->17 16->21 16->22 17->20
## [31] 17->26 18->28 19->29 20->25 21->26 22->23 22->27 22->29 23->28 24->31
## [41] 25->28 26->27 27->30 28->31 29->32 30->32 31->32
The critical path is 5-10-12-16-17-26-27-30-32. And the total duration of the project is 60 time units.