Title: | An Implementation of the Critical Path Method |
---|---|
Description: | An R implementation of the Critical Path Method (CPM). CPM is a method used to estimate the minimum project duration and determine the amount of scheduling flexibility on the logical network paths within the schedule model. The flexibility is in terms of early start, early finish, late start, late finish, total float and free float. Beside, it permits to quantify the complexity of network diagram through the analysis of topological indicators. Finally, it permits to change the activities duration to perform what-if scenario analysis. The package was built based on following references: To make topological sorting and other graph operation, we use Csardi, G. & Nepusz, T. (2005) <https://www.researchgate.net/publication/221995787_The_Igraph_Software_Package_for_Complex_Network_Research>; For schedule concept, the reference was Project Management Institute (2017) <https://www.pmi.org/pmbok-guide-standards/foundational/pmbok>; For standards terms, we use Project Management Institute (2017) <https://www.pmi.org/pmbok-guide-standards/lexicon>; For algorithms on Critical Path Method development, we use Vanhoucke, M. (2013) <doi:10.1007/978-3-642-40438-2> and Vanhoucke, M. (2014) <doi:10.1007/978-3-319-04331-9>; And, finally, for topological definitions, we use Vanhoucke, M. (2009) <doi:10.1007/978-1-4419-1014-1>. |
Authors: | Rubens Jose Rosa [aut, cre], Marcos dos Santos [aut], Thiago Marques [aut] |
Maintainer: | Rubens Jose Rosa <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.1.000 |
Built: | 2025-02-14 05:12:24 UTC |
Source: | https://github.com/rubens2005/criticalpath |
criticalpath
package is an R implementation of the
Critical Path Method (CPM). CPM is a method used to estimate
the minimum project duration and determine the amount of scheduling
flexibility
on the logical network paths within the schedule model. The flexibility is in
terms of early start, early finish, late start, late finish, total float and
free float. Beside, it permits to quantify the complexity of network diagram
through the analysis of topological indicators. Finally, it permits to change
the activities duration to perform what-if scenario analysis.
With this package, you can calculate the following CPM parameters:
Schedule duration
Early start and finish date of each activity
Late start and finish date of each activity
Critical activities
Critical path
Total float and free float
Gantt Matrix
What-if scenario analysis
Topological indicators
Rubens Jose Rosa ([email protected]), Marcos dos Santos ([email protected]), Thiago Marques ([email protected])
Csardi, G. & Nepusz, T. (2005). The Igraph Software Package for Complex Network Research. InterJournal. Complex Systems. 1695.
Project Management Institute (2017) A Guide to the Project Management Body of Knowledge (PMBOK Guide). Sixth Edition.
Project Management Institute (2017) PMI Lexicon of Project Management Terms: Version 3.2.
Vanhoucke, M. (2009) Measuring Time: Improving Project Performance Using Earned Value Management. Springer-Verlag US.
Vanhoucke, M. (2013) Project Management with Dynamic Scheduling: Baseline Scheduling, Risk Analysis and Project Control. Springer-Verlag Berlin Heidelberg.
Vanhoucke, M. (2014) Integrated Project Management and Control: First Comes the Theory, then the Practice. Springer International Publishing Switzerland.
On vignette package there are more information with examples about:
How to create a schedule:
Create a new schedule without any information.
Add activities and relations together to an schedule.
Add activities to a schedule.
Add relations to a schedule.
How to get schedule information:
Title
Reference
Duration
How to get activities properties:
Activity Properties.
Gantt Matrix.
How to change activities duration:
Change Activities Duration.
How to get relations properties:
Relation Properties
Successors and Predecessors.
How to get topological properties:
Topological Indicators.
Return a tibble with all activities of a schedule in an insertion order. These are the main information calculated by CPM.
sch_activities(sch)
sch_activities(sch)
sch |
A schedule object. |
The tibble is formed by following structure:
id: Activity id.
name: The name of activity.
duration: A number that represents the activity's duration.
milestone: A milestone is an activity with zero duration.
This property indicates if an activity is a milestone or not:
TRUE
indicates it is a milestone; FALSE
indicates it is not.
critical: A critical activity is one with total float minor or equal
to zero. This property indicates if an activity is critical:
TRUE
indicates it is critical;
FALSE
indicates it is not critical.
early_start: Is the earliest start period an activity can begin after its predecessors without violating precedence relation.
early_finish: Is the early start plus activity duration.
late_start: Is the late finish minus activity duration.
late_finish: Is the latest finish an activity can finish before their successors without violating precedence relation.
total_float: It is the amount of period an activity can be delayed without violating the project duration. Its formula is: late_start - early_start or late_finish - early_finish
free_float: It is the amount of period an activity can be delayed without violating the start time of the successors activities.
progr_level: It is the rank of activities counted from begin. The level of the activities that don't have predecessor is one; the level of the other activities, is one plus the maximal level of their predecessor.
regr_level: Regressive level is the rank of activities counted from the end. The level of the activities that don't have successor is the maximal progressive level; the level of the other activities, is one minus the minimal level of their successor.
topo_float: It is the difference between progressive level and regressive level.
A tibble with activities.
sch_has_any_activity()
, sch_change_activities_duration()
,
sch_add_activity()
, sch_nr_activities()
, sch_critical_activities()
,
sch_add_activities()
, sch_get_activity()
, sch_duration()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_activities(sch)
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_activities(sch)
Combine several vectors for activities and their attributes into a tibble, which can be combined with other similarly-generated tibbles, resulting in unique tibble to be added in a schedule. If the schedule already contain some activities, the new activities will be added in the end.
sch_add_activities(sch, id, name, duration, ...)
sch_add_activities(sch, id, name, duration, ...)
sch |
A schedule object. |
id |
Activity id that will be used to make relation between activities. It must be unique. |
name |
The name of activity. |
duration |
A number that represents the activity's duration. It must be equal or greater than zero. |
... |
One or more vectors for associated activity attributes. |
A activity tibble, or atb, has at least the following columns:
id
(of type integer
): Activity id.
It is an integer number that must be unique within a schedule.
name
(of type character
): Activity name. It may be empty string.
duration
(of type integer
): Activity duration.
It is integer number without unit time. It may be zero.
An arbitrary number of additional columns containing data attributes can be part of the atb, so long as they follow the aforementioned columns.
A schedule with a activity tibble (atb) added.
sch_reference()
, sch_add_relations()
, sch_add_activity()
,
sch_title()
, sch_nr_activities()
, sch_new()
, sch_plan()
,
sch_get_activity()
, sch_has_any_activity()
,
sch_change_activities_duration()
.
# Example #1 sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) %>% sch_plan() sch_duration(sch) sch_activities(sch) # Example #2 sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L), resource = "Rubens", cost = 123.45 ) %>% sch_plan() sch_duration(sch) atb <- sch_activities(sch) atb$resource atb$cost # Example #3 sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L), resource = c( "Rubens", "Jose", "Rosa", "Rodrigues", "Silva", "Rubens", "Jose", "Rosa", "Rodrigues", "Silva", "Rubens", "Jose", "Rosa", "Rodrigues", "Silva", "Rubens", "Jose"), cost = c( 123.45, 234.56, 345.56, 456.78, 567.89, 123.45, 234.56, 345.56, 456.78, 567.89, 123.45, 234.56, 345.56, 456.78, 567.89, 123.45, 234.56) ) %>% sch_plan() sch_duration(sch) atb <- sch_activities(sch) atb$resource atb$cost
# Example #1 sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) %>% sch_plan() sch_duration(sch) sch_activities(sch) # Example #2 sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L), resource = "Rubens", cost = 123.45 ) %>% sch_plan() sch_duration(sch) atb <- sch_activities(sch) atb$resource atb$cost # Example #3 sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L), resource = c( "Rubens", "Jose", "Rosa", "Rodrigues", "Silva", "Rubens", "Jose", "Rosa", "Rodrigues", "Silva", "Rubens", "Jose", "Rosa", "Rodrigues", "Silva", "Rubens", "Jose"), cost = c( 123.45, 234.56, 345.56, 456.78, 567.89, 123.45, 234.56, 345.56, 456.78, 567.89, 123.45, 234.56, 345.56, 456.78, 567.89, 123.45, 234.56) ) %>% sch_plan() sch_duration(sch) atb <- sch_activities(sch) atb$resource atb$cost
Add activities tibble to a schedule.
sch_add_activities_tibble(sch, atb)
sch_add_activities_tibble(sch, atb)
sch |
A schedule object. |
atb |
A tibble with activities definitions. |
A schedule with a activity tibble (atb) added.
atb <- tibble::tibble( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) sch <- sch_new() %>% sch_add_activities_tibble(atb) %>% sch_plan() sch_duration(sch) #4 # sch_activities(sch)
atb <- tibble::tibble( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) sch <- sch_new() %>% sch_add_activities_tibble(atb) %>% sch_plan() sch_duration(sch) #4 # sch_activities(sch)
Add an activity and her relations to a schedule. The relations are optional. They will be included if a set of activity id is informed, after activity duration.
sch_add_activity(sch, id, name, duration, ..., direction = "succ")
sch_add_activity(sch, id, name, duration, ..., direction = "succ")
sch |
A schedule object. |
id |
Activity id that will be used to make relation between activities. It must be unique. |
name |
The name of activity. |
duration |
A number that represents the activity's duration. It must be equal or greater than zero. |
... |
A set of activity id relation such that will be linked with activity id. It may be relations of successor or predecessors. |
direction |
Direction of relations: It may be "succ" or "pred".
|
A Schedule object with an activity added to it. If relations id is present, it will be included to the schedule.
sch_change_activities_duration()
, sch_has_any_activity()
,
sch_new()
, sch_add_activities()
, sch_get_activity()
, sch_plan()
,
sch_nr_activities()
, sch_add_relation()
.
# Example #1: Only with activities sch <- sch_new() %>% sch_add_activity(1L, "Task 1", 5L) %>% sch_add_activity(2L, "Task 2", 6L) %>% sch_add_activity(3L, "Task 3", 8L) %>% sch_add_activity(4L, "Task 4", 6L) %>% sch_add_activity(5L, "Task 5", 9L) %>% sch_add_activity(6L, "Task 6", 3L) %>% sch_add_activity(7L, "Task 7", 4L) %>% sch_plan() sch_duration(sch) sch_activities(sch) # Example #2: With activities and relations. sch <- sch_new() %>% sch_add_activity(1L, "Task 1", 5L, 2L, 3L) %>% sch_add_activity(2L, "Task 2", 6L, 4L) %>% sch_add_activity(3L, "Task 3", 8L, 5L) %>% sch_add_activity(4L, "Task 4", 6L, 6L) %>% sch_add_activity(5L, "Task 5", 9L, 6L) %>% sch_add_activity(6L, "Task 6", 3L, 7L) %>% sch_add_activity(7L, "Task 7", 4L) %>% sch_plan() sch_duration(sch) sch_activities(sch) sch_relations(sch)
# Example #1: Only with activities sch <- sch_new() %>% sch_add_activity(1L, "Task 1", 5L) %>% sch_add_activity(2L, "Task 2", 6L) %>% sch_add_activity(3L, "Task 3", 8L) %>% sch_add_activity(4L, "Task 4", 6L) %>% sch_add_activity(5L, "Task 5", 9L) %>% sch_add_activity(6L, "Task 6", 3L) %>% sch_add_activity(7L, "Task 7", 4L) %>% sch_plan() sch_duration(sch) sch_activities(sch) # Example #2: With activities and relations. sch <- sch_new() %>% sch_add_activity(1L, "Task 1", 5L, 2L, 3L) %>% sch_add_activity(2L, "Task 2", 6L, 4L) %>% sch_add_activity(3L, "Task 3", 8L, 5L) %>% sch_add_activity(4L, "Task 4", 6L, 6L) %>% sch_add_activity(5L, "Task 5", 9L, 6L) %>% sch_add_activity(6L, "Task 6", 3L, 7L) %>% sch_add_activity(7L, "Task 7", 4L) %>% sch_plan() sch_duration(sch) sch_activities(sch) sch_relations(sch)
Add a relation to a schedule.
sch_add_relation(sch, from, to, type = "FS", lag = 0L)
sch_add_relation(sch, from, to, type = "FS", lag = 0L)
sch |
A schedule object. |
from |
The id of predecessor activity. Must exist an activity with from. |
to |
The id of successor activity. Must exist an activity with to. |
type |
Specifies the type of relation between activities. The default type is FS and its value may be: FS, FF, SS, SF, that means:
If type is not defined, it is assumed to be FS. |
lag |
The time period between activities that the successor activity 'to' must be advanced after activity 'from' has been finished. The value may be negative, in such case, the activity 'to' will be anticipated 'lag' time periods. It must be an integer, less than, equal or greater than zero. If lag is not defined, it is assumed to be zero. |
A Schedule object with a relation added.
sch_has_any_relation()
, sch_nr_relations()
,
sch_add_relations()
, sch_plan()
, sch_validate()
,
sch_add_activities()
, sch_new()
.
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation( 1L, 2L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation(16L, 17L) %>% sch_plan() sch_duration(sch) sch_activities(sch) sch_relations(sch)
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation( 1L, 2L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation(16L, 17L) %>% sch_plan() sch_duration(sch) sch_activities(sch) sch_relations(sch)
Combine several vectors for relation and their attributes into a tibble and add relations between activities to a schedule.
sch_add_relations(sch, from, to, type = "FS", lag = 0L, ...)
sch_add_relations(sch, from, to, type = "FS", lag = 0L, ...)
sch |
A schedule object. |
from |
The id of predecessor activity. |
to |
The id of successor activity. |
type |
Specifies the relation type between activities. The default type is FS and its value may be: FS, FF, SS, SF. |
lag |
The time period between activities that the successor activity
|
... |
One or more vectors for associated relation attributes. |
An relation tibble, or rtb, has at least the following columns:
from
(of type integer
): The id of predecessor activity.
Must exist an activity with from
id.
to
(of type integer
): The id of successor activity.
Must exist an activity with to
id.
type
(of type character
)
Specifies the relation type between activities.
The default type is FS and its value may be: FS, FF, SS, SF, that means:
FS: Finish-Start relation. Activity 'to' id can only start after the finish of activity 'from' id.
FF: Finish-Finish relation. Activity 'to' id must finish together with activity 'from' id.
SS: Start-Start relation. Activity 'to' id must start together with activity 'from' id.
SF: Start-Finish relation. Activity 'to' id must finish when activity 'from' id starts.
lag
(of type integer
): The time period between activities
that the successor activity to
must be advanced after activity from
has been finished.
The value may be negative, in such case, the activity 'to' will be
anticipated 'lag' time periods.
It must be an integer, less than, equal or greater than zero.
If lag is not defined, it is assumed to be zero.
An arbitrary number of additional columns containing data attributes can be part of the rtb, so long as they follow the aforementioned columns.
A schedule with a relation tibble (rtb) added.
sch_title()
, sch_reference()
, sch_add_relation()
,
sch_nr_relations()
, sch_has_any_relation()
, sch_new()
, sch_plan()
,
sch_add_activities()
, sch_validate()
.
sch <- sch_new() %>% sch_title("Project 1: Cost Information System") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice.Gent: Springer, 2014, p. 6" ) %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) %>% sch_plan() sch_has_any_relation(sch) # FALSE sch_nr_relations(sch) # 0 sch_duration(sch) # 4 sch %<>% sch_add_relations( from = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L) ) %>% sch_plan() sch_has_any_relation(sch) # TRUE sch_nr_relations(sch) # 26 sch_duration(sch) # 11
sch <- sch_new() %>% sch_title("Project 1: Cost Information System") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice.Gent: Springer, 2014, p. 6" ) %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) %>% sch_plan() sch_has_any_relation(sch) # FALSE sch_nr_relations(sch) # 0 sch_duration(sch) # 4 sch %<>% sch_add_relations( from = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L) ) %>% sch_plan() sch_has_any_relation(sch) # TRUE sch_nr_relations(sch) # 26 sch_duration(sch) # 11
Add relations tibble to a schedule.
sch_add_relations_tibble(sch, rtb)
sch_add_relations_tibble(sch, rtb)
sch |
A schedule object. |
rtb |
A tibble or data frame with relations definitions. |
A Schedule object with a relation added.
atb <- tibble::tibble( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) rtb <- data.frame( from = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L) ) sch <- sch_new() %>% sch_add_activities_tibble(atb) %>% sch_add_relations_tibble(rtb) %>% sch_plan() sch_duration(sch) # 11
atb <- tibble::tibble( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) rtb <- data.frame( from = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L) ) sch <- sch_new() %>% sch_add_activities_tibble(atb) %>% sch_add_relations_tibble(rtb) %>% sch_plan() sch_duration(sch) # 11
List all predecessors from an activity: direct or indirect predecessors.
sch_all_predecessors(sch, id, ign_from = NULL)
sch_all_predecessors(sch, id, ign_from = NULL)
sch |
A schedule object. |
id |
Activity id to be listed. |
ign_from |
A relation to be ignored: ign_from -> id. Activities from this relation will be ignored. |
A vector with all activities ids.
sch_successors()
, sch_relations()
, sch_is_redundant()
,
sch_all_successors()
, sch_activities()
, sch_non_critical_activities()
,
sch_predecessors()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_all_predecessors(sch, 2) # nothing sch_all_predecessors(sch, 7) # 6, 4 sch_all_predecessors(sch, 10) # 3
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_all_predecessors(sch, 2) # nothing sch_all_predecessors(sch, 7) # 6, 4 sch_all_predecessors(sch, 10) # 3
List all successors from an activity: direct and indirect successors.
sch_all_successors(sch, id, ign_to = NULL)
sch_all_successors(sch, id, ign_to = NULL)
sch |
A schedule object. |
id |
Activity id to be listed. |
ign_to |
A relation to be ignored: id -> ign_to. Activities from this relation will be ignored. |
A vector with all activities ids.
sch_predecessors()
, sch_activities()
,
sch_non_critical_activities()
, sch_successors()
,
sch_relations()
, sch_is_redundant()
, sch_all_predecessors()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_all_successors(sch, 2) # 5, 9, 12 sch_all_successors(sch, 7) # 8, 11, 12 sch_all_successors(sch, 10) # 12
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_all_successors(sch, 2) # 5, 9, 12 sch_all_successors(sch, 7) # 8, 11, 12 sch_all_successors(sch, 10) # 12
Change activities duration and calculates critical path. This way is faster than creating a new schedule with new durations. The order of duration is the insertion order of activities.
sch_change_activities_duration(sch, new_durations)
sch_change_activities_duration(sch, new_durations)
sch |
A schedule object. |
new_durations |
A vector with new activities' duration. |
A schedule object with new durations.
sch_activities()
, sch_has_any_activity()
, sch_duration()
,
sch_nr_activities()
, sch_add_activity()
, sch_add_activities()
,
sch_get_activity()
.
sch <- sch_new() %>% sch_title("Project 2: Patient Transport System") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 9") %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,1L,3L,2L, 2L,2L,2L,1L, 4L,5L,3L,3L, 4L,5L,1L,5L,2L) ) %>% sch_add_relations( from = c(1L, 2L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 8L, 8L, 8L, 8L, 9L, 10L, 11L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 6L, 5L, 8L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 14L, 14L, 14L, 14L, 15L, 16L, 17L, 16L, 17L) ) %>% sch_plan() # Project duration sch_duration(sch) # 25 # Activities duration atb <- sch_activities(sch) atb$duration # Now, change activities duration new_durations <- c(1L,2L,5L, 4L,3L, 2L,1L, 5L, 3L,5L,5L,3L,4L, 2L,1L, 2L,4L) sch %<>% sch_change_activities_duration(new_durations) #Project duration sch_duration(sch) # 31 # Activities duration atb <- sch_activities(sch) atb$duration
sch <- sch_new() %>% sch_title("Project 2: Patient Transport System") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 9") %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,1L,3L,2L, 2L,2L,2L,1L, 4L,5L,3L,3L, 4L,5L,1L,5L,2L) ) %>% sch_add_relations( from = c(1L, 2L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 8L, 8L, 8L, 8L, 9L, 10L, 11L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 6L, 5L, 8L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 14L, 14L, 14L, 14L, 15L, 16L, 17L, 16L, 17L) ) %>% sch_plan() # Project duration sch_duration(sch) # 25 # Activities duration atb <- sch_activities(sch) atb$duration # Now, change activities duration new_durations <- c(1L,2L,5L, 4L,3L, 2L,1L, 5L, 3L,5L,5L,3L,4L, 2L,1L, 2L,4L) sch %<>% sch_change_activities_duration(new_durations) #Project duration sch_duration(sch) # 31 # Activities duration atb <- sch_activities(sch) atb$duration
Return a tibble with all critical activities of a schedule in an insertion order.
sch_critical_activities(sch)
sch_critical_activities(sch)
sch |
A schedule object. |
A tibble with critical activities.
sch_get_activity()
, sch_add_activities()
, sch_activities()
,
sch_add_activity()
, sch_nr_activities()
, sch_non_critical_activities()
,
sch_has_any_activity()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_critical_activities(sch)
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_critical_activities(sch)
Return a tibble with critical relations of a schedule in topological order.
sch_critical_relations(sch, order = "topological")
sch_critical_relations(sch, order = "topological")
sch |
A schedule object. |
order |
Indicates the order of relations:
|
A tibble with critical relations.
sch_relations()
, sch_add_activities()
, sch_has_any_relation()
,
sch_topoi_tf()
, sch_gantt_matrix()
, sch_activities()
, sch_topoi_la()
,
sch_add_relations()
, sch_topoi_sp()
, sch_non_critical_activities()
,
sch_topoi_ad()
, sch_nr_relations()
, sch_non_critical_relations()
.
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation(16L, 17L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 1L, 2L) %>% sch_plan() # In "topological" order. sch_critical_relations(sch) # In "insert" order. sch_critical_relations(sch, order = "insert")
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation(16L, 17L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 1L, 2L) %>% sch_plan() # In "topological" order. sch_critical_relations(sch) # In "insert" order. sch_critical_relations(sch, order = "insert")
An integer value that indicates the duration of a schedule.
Atention: the schedule must be planned with the function sch_plan()
.
sch_duration(sch)
sch_duration(sch)
sch |
A schedule object. |
The duration of the schedule.
sch_change_activities_duration()
, sch_validate()
,
sch_add_activities()
, sch_reference()
, sch_add_relations()
,
sch_title()
, sch_gantt_matrix()
, sch_plan()
, sch_new()
.
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_duration(sch) # 16
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_duration(sch) # 16
Evaluates redundancy of each relation and creates another column in relation tibble. If the schedule does not have any relation, this function do nothing.
sch_evaluate_redundancy(sch)
sch_evaluate_redundancy(sch)
sch |
Object Schedule |
Object Schedule redundancy column added. Or the Schedule without any modification, is trere is no relation in it.
atb <- tibble::tibble( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) rtb <- data.frame( from = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L) ) sch <- sch_new() %>% sch_title("Project 1: Cost Information System") %>% sch_reference("VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 6") %>% sch_add_activities_tibble(atb) %>% sch_add_relations_tibble(rtb) %>% sch_plan() %>% sch_evaluate_redundancy() sch_duration(sch) # 11L rtb <- sch_relations(sch) sum(rtb$redundant) # 0 sch1 <- sch %>% sch_add_relation(1L, 6L) %>% sch_add_relation(3L, 16L) %>% sch_add_relation(4L, 17L) %>% sch_plan() %>% sch_evaluate_redundancy() sch_duration(sch) # 11L rtb <- sch_relations(sch1) sum(rtb$redundant) # 3L
atb <- tibble::tibble( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) rtb <- data.frame( from = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L), to = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 11L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L, 16L, 17L) ) sch <- sch_new() %>% sch_title("Project 1: Cost Information System") %>% sch_reference("VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 6") %>% sch_add_activities_tibble(atb) %>% sch_add_relations_tibble(rtb) %>% sch_plan() %>% sch_evaluate_redundancy() sch_duration(sch) # 11L rtb <- sch_relations(sch) sum(rtb$redundant) # 0 sch1 <- sch %>% sch_add_relation(1L, 6L) %>% sch_add_relation(3L, 16L) %>% sch_add_relation(4L, 17L) %>% sch_plan() %>% sch_evaluate_redundancy() sch_duration(sch) # 11L rtb <- sch_relations(sch1) sum(rtb$redundant) # 3L
Create a matrix that represents a Gantt chart,
a matrix where "1" indicates that an activity is planned to be
in execution.
Atention: the schedule must be planned with the function sch_plan()
.
sch_gantt_matrix(sch)
sch_gantt_matrix(sch)
sch |
A schedule object. |
In this matrix, the rows represent activities, whereas the columns represents the activity execution period. So, the number of columns is equal to project duration. The cells is an integer value that indicates the activity is in execution or not.
A matrix where 1
indicates that an activity is in execution
and 0
, the activity is not executing.
sch_add_activities()
, sch_activities()
, sch_add_relations()
,
sch_add_relation()
, sch_relations()
, sch_plan()
,
sch_xy_gantt_matrix()
.
sch <- sch_new() %>% sch_add_activities( id = c( 1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c( 2L, 3L, 1L, 2L ) ) %>% sch_add_relations( from = c(1L, 2L, 4L, 4L), to = c(3L, 3L, 1L, 2L) ) %>% sch_plan() sch_duration(sch) gantt <- sch_gantt_matrix(sch) gantt # What is the effort by time period? colSums(gantt) # 1 1 2 2 1 1 # What is the duration by activities? rowSums(gantt) # 2 3 1 2 # what is the S curve cumsum(colSums(gantt)) plot(cumsum(colSums(gantt)), type="l", lwd=3)
sch <- sch_new() %>% sch_add_activities( id = c( 1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c( 2L, 3L, 1L, 2L ) ) %>% sch_add_relations( from = c(1L, 2L, 4L, 4L), to = c(3L, 3L, 1L, 2L) ) %>% sch_plan() sch_duration(sch) gantt <- sch_gantt_matrix(sch) gantt # What is the effort by time period? colSums(gantt) # 1 1 2 2 1 1 # What is the duration by activities? rowSums(gantt) # 2 3 1 2 # what is the S curve cumsum(colSums(gantt)) plot(cumsum(colSums(gantt)), type="l", lwd=3)
Gets an activity by id.
sch_get_activity(sch, aid)
sch_get_activity(sch, aid)
sch |
A schedule object. |
aid |
An activity id as defined by the user. |
A an activity information in a tibble with one line, or an error if activity id doesn't exist.
sch_activities()
, sch_duration()
, sch_nr_activities()
,
sch_add_activities()
, sch_critical_activities()
, sch_has_any_activity()
,
sch_change_activities_duration()
, sch_add_activity()
.
sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) %>% sch_plan() sch_get_activity(sch, 7)
sch <- sch_new() %>% sch_add_activities( id = 1:17, name = paste("a", as.character(1:17), sep=""), duration = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L) ) %>% sch_plan() sch_get_activity(sch, 7)
A logical value that indicates if the schedule has any activity. A TRUE value means that the schedule has any activity; a FALSE, means that the schedule do not have any activity.
sch_has_any_activity(sch)
sch_has_any_activity(sch)
sch |
A schedule object. |
A logical value:
TRUE: The schedule has any activity;
FALSE: The schedule do not have any activity.
sch_nr_activities()
, sch_critical_activities()
,
sch_add_activities()
, sch_change_activities_duration()
,
sch_activities()
, sch_nr_relations()
, sch_has_any_relation()
,
sch_add_activity()
.
sch <- sch_new() sch_has_any_activity(sch) # FALSE sch <- sch_new() %>% sch_add_activity(1L, "Only one", 0L) %>% sch_plan() sch_has_any_activity(sch) # TRUE
sch <- sch_new() sch_has_any_activity(sch) # FALSE sch <- sch_new() %>% sch_add_activity(1L, "Only one", 0L) %>% sch_plan() sch_has_any_activity(sch) # TRUE
A logical value that indicates if the schedule has any relation. A TRUE value means that the schedule has some relation; a FALSE, means that the schedule do not have any relation.
sch_has_any_relation(sch)
sch_has_any_relation(sch)
sch |
A schedule object. |
A logical value:
TRUE: The schedule has any relation;
FALSE: The schedule do not have any relation.
sch_topoi_la()
, sch_relations()
, sch_add_relations()
,
sch_topoi_sp()
, sch_has_any_activity()
, sch_all_predecessors()
,
sch_topoi_ad()
, sch_nr_relations()
, sch_all_successors()
,
sch_nr_activities()
, sch_topoi_tf()
.
sch <- sch_new() sch_has_any_relation(sch) # FALSE sch <- sch_new() %>% sch_add_activity(1L, "A", 2L) %>% sch_add_activity(2L, "B", 5L, 1L, direction = "pred") sch_has_any_activity(sch) # TRUE
sch <- sch_new() sch_has_any_relation(sch) # FALSE sch <- sch_new() %>% sch_add_activity(1L, "A", 2L) %>% sch_add_activity(2L, "B", 5L, 1L, direction = "pred") sch_has_any_activity(sch) # TRUE
Verify if a relation between two activities is redundant. A relation A->C is redundant if there are A->C, A->B, B->C relations.
sch_is_redundant(sch, id_from, id_to)
sch_is_redundant(sch, id_from, id_to)
sch |
A schedule object. |
id_from |
From activity id. |
id_to |
To activity id. |
A logical TRUE
if an arc is redundant;
FALSE
if it is not.
sch_all_predecessors()
, sch_all_successors()
,
sch_gantt_matrix()
, sch_relations()
, sch_predecessors()
,
sch_successors()
, sch_activities()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_is_redundant(sch, 2, 5) # FALSE sch_is_redundant(sch, 2, 12) # TRUE
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_is_redundant(sch, 2, 5) # FALSE sch_is_redundant(sch, 2, 12) # TRUE
Create a new schedule without any information. The new schedule contains the structure to include activities and relations.
sch_new()
sch_new()
A list with schedule definition.
sch_reference()
, sch_add_activities()
, sch_duration()
,
sch_xy_gantt_matrix()
, sch_plan()
, sch_add_relations()
,
sch_validate()
, sch_non_critical_activities()
, sch_title()
.
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_duration(sch) # 16
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_duration(sch) # 16
Return a tibble with all non critical activities of a schedule in an insertion order.
sch_non_critical_activities(sch)
sch_non_critical_activities(sch)
sch |
A schedule object. |
A tibble with non critical activities.
sch_get_activity()
, sch_add_activity()
, sch_activities()
,
sch_critical_activities()
, sch_has_any_activity()
, sch_nr_activities()
,
sch_add_activities()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_non_critical_activities(sch)
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_non_critical_activities(sch)
Return a tibble with non critical relations of a schedule in topological order.
sch_non_critical_relations(sch, order = "topological")
sch_non_critical_relations(sch, order = "topological")
sch |
A schedule object. |
order |
Indicates the order of relations:
|
A tibble with non critical relations.
sch_relations()
, sch_add_activities()
, sch_has_any_relation()
,
sch_topoi_tf()
, sch_gantt_matrix()
, sch_activities()
, sch_topoi_la()
,
sch_add_relations()
, sch_topoi_sp()
, sch_non_critical_activities()
,
sch_topoi_ad()
, sch_nr_relations()
, sch_critical_relations()
.
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation(16L, 17L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 1L, 2L) %>% sch_plan() # In "topological" order. sch_non_critical_relations(sch) # In "insert" order. sch_non_critical_relations(sch, order = "insert")
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation(16L, 17L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 1L, 2L) %>% sch_plan() # In "topological" order. sch_non_critical_relations(sch) # In "insert" order. sch_non_critical_relations(sch, order = "insert")
Number of activities in a schedule as an integer value.
sch_nr_activities(sch)
sch_nr_activities(sch)
sch |
A schedule object. |
A integer value indicating the number of activities.
sch_add_activity()
, sch_nr_relations()
, sch_add_activities()
,
sch_activities()
, sch_change_activities_duration()
,
sch_critical_activities()
, sch_get_activity()
, sch_has_any_relation()
.
sch <- sch_new() sch_nr_activities(sch) # 0 sch <- sch_new() %>% sch_add_activity(1L, "Only one", 0L) %>% sch_plan() sch_nr_activities(sch) # 1
sch <- sch_new() sch_nr_activities(sch) # 0 sch <- sch_new() %>% sch_add_activity(1L, "Only one", 0L) %>% sch_plan() sch_nr_activities(sch) # 1
Number of relations in a schedule as an integer value.
sch_nr_relations(sch)
sch_nr_relations(sch)
sch |
A schedule object. |
A integer value indicating the number of relations.
sch_relations()
, sch_topoi_la()
, sch_topoi_tf()
,
sch_all_successors()
, sch_topoi_ad()
, sch_nr_activities()
,
sch_topoi_sp()
, sch_has_any_relation()
, sch_all_predecessors()
,
sch_add_relations()
, sch_has_any_activity()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_nr_relations(sch) # 14
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2,3,4) %>% sch_add_activity( 2L, "a2" , 4L, 5) %>% sch_add_activity( 3L, "a3" , 9L, 10) %>% sch_add_activity( 4L, "a4" , 1L, 6) %>% sch_add_activity( 5L, "a5" , 4L, 9) %>% sch_add_activity( 6L, "a6" , 5L, 7) %>% sch_add_activity( 7L, "a7" , 1L, 8,11) %>% sch_add_activity( 8L, "a8" , 7L, 12) %>% sch_add_activity( 9L, "a9" , 8L, 12) %>% sch_add_activity( 10L, "a10", 3L, 12) %>% sch_add_activity( 11L, "a11", 3L, 12) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_nr_relations(sch) # 14
Perform schedule plan: execute topological sort and critical path calculation. All information about critical path are calculated.
sch_plan(sch)
sch_plan(sch)
sch |
A schedule object. |
A schedule with critical path calculated.
sch_gantt_matrix()
, sch_duration()
, sch_reference()
,
sch_add_activities()
, sch_has_any_activity()
, sch_title()
, sch_new()
,
sch_add_relations()
.
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_duration(sch) # 16
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_duration(sch) # 16
List the direct predecessors of an activity.
sch_predecessors(sch, id)
sch_predecessors(sch, id)
sch |
A schedule object. |
id |
Activity id to be listed. |
A vector with all activities ids.
sch_gantt_matrix()
, sch_all_successors()
, sch_is_redundant()
,
sch_all_predecessors()
, sch_successors()
, sch_activities()
,
sch_relations()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_predecessors(sch, 2) # nothing sch_predecessors(sch, 7) # 6 sch_predecessors(sch, 10) # 3
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_predecessors(sch, 2) # nothing sch_predecessors(sch, 7) # 6 sch_predecessors(sch, 10) # 3
A reference from project origin, for example, a book, a paper, a corporation, or nothing.
sch_reference(sch, new_value = NULL)
sch_reference(sch, new_value = NULL)
sch |
A schedule object. |
new_value |
A new reference. |
A schedule object with new reference.
A reference.
sch_new()
, sch_activities()
, sch_relations()
, sch_title()
,
sch_plan()
, sch_duration()
, sch_validate()
.
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_reference(sch) # empty sch %<>% sch_reference("This schedule is from...") sch_reference(sch)
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_reference(sch) # empty sch %<>% sch_reference("This schedule is from...") sch_reference(sch)
Return a tibble with all relations of a schedule in topological order. These are the main information calculated by CPM.
sch_relations(sch, order = "topological")
sch_relations(sch, order = "topological")
sch |
A schedule object. |
order |
Indicates the order of relations:
|
The tibble is formed by following structure:
from: Predecessor activity id from a relation.
to: Successor activity id to a relation.
type: The type of relation between activities. Its value may be: FS, FF, SS, SF.
lag: The time period between activity predecessor and activity successor activity
critical: A critical relation is formed by two activity critical:
predecessor and successor.
TRUE
indicates it is critical;
FALSE
indicates it is not critical.
ord: Indicates de order that the relation was added in the schedule.
i_from: It is the index of predecessor activity in the activities tibble.
i_to: It is the index of successor activity in the activities tibble.
A tibble with relations.
sch_add_activities()
, sch_has_any_relation()
, sch_topoi_tf()
,
sch_gantt_matrix()
, sch_activities()
, sch_add_relations()
,
sch_topoi_sp()
, sch_topoi_la()
, sch_non_critical_activities()
,
sch_topoi_ad()
, sch_nr_relations()
.
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation(16L, 17L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 1L, 2L) %>% sch_plan() # In "topological" order. sch_relations(sch) # In "insert" order. sch_relations(sch, order = "insert")
sch <- sch_new() %>% sch_title("Project 3: Old Carriage House Renovation") %>% sch_reference( "VANHOUCKE, Mario. Integrated project management and control: first comes the theory, then the practice. Gent: Springer, 2014, p. 11") %>% sch_add_activity( 1L, "a1" , 2L) %>% sch_add_activity( 2L, "a2" , 2L) %>% sch_add_activity( 3L, "a3" , 4L) %>% sch_add_activity( 4L, "a4" , 3L) %>% sch_add_activity( 5L, "a5" , 4L) %>% sch_add_activity( 6L, "a6" , 1L) %>% sch_add_activity( 7L, "a7" , 1L) %>% sch_add_activity( 8L, "a8" , 1L) %>% sch_add_activity( 9L, "a9" , 1L) %>% sch_add_activity(10L, "a10", 1L) %>% sch_add_activity(11L, "a11", 3L) %>% sch_add_activity(12L, "a12", 2L) %>% sch_add_activity(13L, "a13", 1L) %>% sch_add_activity(14L, "a14", 1L) %>% sch_add_activity(15L, "a15", 2L) %>% sch_add_activity(16L, "a16", 1L) %>% sch_add_activity(17L, "a17", 1L) %>% sch_add_relation(14L, 15L) %>% sch_add_relation( 9L, 10L) %>% sch_add_relation( 2L, 3L) %>% sch_add_relation( 8L, 10L) %>% sch_add_relation(10L, 13L) %>% sch_add_relation( 5L, 6L) %>% sch_add_relation(11L, 12L) %>% sch_add_relation(15L, 16L) %>% sch_add_relation( 6L, 8L) %>% sch_add_relation( 3L, 4L) %>% sch_add_relation(16L, 17L) %>% sch_add_relation( 6L, 7L) %>% sch_add_relation(10L, 11L) %>% sch_add_relation(13L, 14L) %>% sch_add_relation( 4L, 5L) %>% sch_add_relation( 7L, 10L) %>% sch_add_relation(12L, 15L) %>% sch_add_relation( 6L, 9L) %>% sch_add_relation( 1L, 2L) %>% sch_plan() # In "topological" order. sch_relations(sch) # In "insert" order. sch_relations(sch, order = "insert")
List the direct successors from an activity.
sch_successors(sch, id)
sch_successors(sch, id)
sch |
A schedule object. |
id |
Activity id to be listed. |
A vector with all activities ids.
sch_relations()
, sch_all_predecessors()
, sch_activities()
,
sch_gantt_matrix()
, sch_predecessors()
, sch_is_redundant()
,
sch_all_successors()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_successors(sch, 2) # 5, 12 sch_successors(sch, 7) # 8, 11 sch_successors(sch, 10) # 12
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 2L, "a2" , 4L, 5L, 12L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity(10L, "a10", 3L, 12L) %>% sch_add_activity(11L, "a11", 3L, 12L) %>% sch_add_activity(12L, "a12", 0L) %>% sch_plan() sch_successors(sch, 2) # 5, 12 sch_successors(sch, 7) # 8, 11 sch_successors(sch, 10) # 12
A title for project identification. It depends on user of the class. It is used to set or get project's title.
sch_title(sch, new_value)
sch_title(sch, new_value)
sch |
A schedule object. |
new_value |
A new title. |
A schedule object with new title.
A title.
sch_relations()
, sch_plan()
, sch_new()
,
sch_validate()
, sch_activities()
, sch_reference()
,
sch_duration()
.
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_title(sch) # empty sch %<>% sch_title("New title") sch_title(sch)
sch <- sch_new() %>% sch_add_activities( id = c(1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c(3L, 4L, 9L, 1L) ) %>% sch_add_relations( from = c(1L, 2L, 2L), to = c(2L, 3L, 4L) ) %>% sch_plan() sch_title(sch) # empty sch %<>% sch_title("New title") sch_title(sch)
Measures the distribution of the activities over the levels. If AD is approximately equal zero, each level has same numbers of activities. Otherwise, if AD is equal one, the quantity of each level is not uniformly distributed.
sch_topoi_ad(sch)
sch_topoi_ad(sch)
sch |
A schedule object. |
A number between 0 and 1, inclusive.
sch_topoi_sp()
, sch_topoi_la()
, sch_topoi_tf()
,
sch_xy_gantt_matrix()
, sch_add_relations()
, sch_add_activities()
,
sch_relations()
, sch_activities()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_ad(sch) # 0.4
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_ad(sch) # 0.4
Measures the presence of long arcs based on the difference between the progressive level of the end activity and the start node of each relation. If LA is approximately equal zero, the progressive level between activities is as far as possible. Otherwise, if LA is equal one, the relation distance are one.
sch_topoi_la(sch)
sch_topoi_la(sch)
sch |
A schedule object. |
A number between 0 and 1, inclusive.
sch_topoi_sp()
, sch_add_relations()
, sch_topoi_ad()
,
sch_relations()
, sch_xy_gantt_matrix()
, sch_activities()
,
sch_topoi_tf()
, sch_add_activities()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_la(sch) # 0.07692308
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_la(sch) # 0.07692308
Shows the closeness of a network to a serial or parallel graph. As the network becomes serial, the SP increase, until one; As the network becomes parallel, the SP decrease until zero.
sch_topoi_sp(sch)
sch_topoi_sp(sch)
sch |
A schedule object. |
A number between 0 and 1, inclusive.
sch_topoi_tf()
, sch_activities()
, sch_topoi_ad()
,
sch_xy_gantt_matrix()
, sch_relations()
, sch_topoi_la()
,
sch_add_activities()
, sch_add_relations()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_sp(sch) # 0.4545455
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_sp(sch) # 0.4545455
Measures the topological float of each activity. If TF = 0, there is no float between activities. If TF = 1, there is float between activities and they be shift without affecting other activities.
sch_topoi_tf(sch)
sch_topoi_tf(sch)
sch |
A schedule object. |
A number between 0 and 1, inclusive.
sch_topoi_ad()
, sch_add_activities()
, sch_add_relations()
,
sch_xy_gantt_matrix()
, sch_topoi_la()
, sch_activities()
,
sch_relations()
, sch_topoi_sp()
.
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_tf(sch) # 0.2333333
sch <- sch_new() %>% sch_title("Fictitious Project Example") %>% sch_reference("VANHOUCKE, Mario. Measuring time: improving project performance using earned value management. Gent: Springer, 2009, p. 18") %>% sch_add_activity( 1L, "a1" , 0L, 2L,3L,4L) %>% sch_add_activity( 2L, "a2" , 4L, 5L) %>% sch_add_activity( 3L, "a3" , 9L, 10L) %>% sch_add_activity( 4L, "a4" , 1L, 6L) %>% sch_add_activity( 5L, "a5" , 4L, 9L) %>% sch_add_activity( 6L, "a6" , 5L, 7L) %>% sch_add_activity( 7L, "a7" , 1L, 8L,11L) %>% sch_add_activity( 8L, "a8" , 7L, 12L) %>% sch_add_activity( 9L, "a9" , 8L, 12L) %>% sch_add_activity( 10L, "a10", 3L, 12L) %>% sch_add_activity( 11L, "a11", 3L, 12L) %>% sch_add_activity( 12L, "a12", 0L) %>% sch_plan() sch_topoi_tf(sch) # 0.2333333
Validate your schedule in terms of structure: cannot have duplicated activity
id, all 'from' and 'to' relation id must exist in activities tibble
and cannot have duplicated relation. This function is called by
sch_plan(plan)
. If there is an error, the schedule cannot be calculated.
sch_validate(sch)
sch_validate(sch)
sch |
A schedule object. |
There are two forms to use this function:
The first is automatic, when you call sch_plan(plan)
, the validation is
called for you.
The second, you can call sch_plan(plan)
with your schedule, before plan,
to see all error in your schedule.
In both way, the calculation schedule is stopped, because there is some error.
To see the errors, you call the sch_plan(plan)
function to find how to
correct the errors.
The result of sch_plan(plan)
is a lista with a lot of information about the
error. The structure is:
is_valid
: A logical value that indicates if the schedule structure is valid.
TRUE
: The schedule structure is NOT valid.
FALSE
: The schedule structure is valid.
is_error_with_activities
: A logical value that indicates if there is
any error with activities.
TRUE
: There is any error with activities.
FALSE
: There is NOT any error with activities.
is_error_with_relations
: A logical value that indicates if there is
any error with relations.
TRUE
: There is any error with relations.
FALSE
: There is NOT any error with relations.
is_error_with_dag
: A logical value that indicates if there is any error
with igraph
object tha support the schedule.
TRUE
: There is any error with igraph.
FALSE
: There is NOT any error with igraph.
activities_errors
: A tibble that list the activities errors:
id
: activity's id of the error
error
: the error.
to_fix
: suggestion of how to fix the error.
relations_errors
:
from
: Predecessor activity id 'from' of the error.
to
: Successor activity id from a relation.
error
: the error.
to_fix
: suggestion of how to fix the error.
dag_errors
: Error identified by igraph
object.
dag_igraph
: The igraph
object that is totally validated.
Attention: You must identify and correct all errors
before call sch_plan(plan)
!
A list object with a description of all error.
sch_add_relation()
, sch_relations()
, sch_add_relations()
,
sch_add_activities()
, sch_add_activity()
, sch_activities()
,
sch_plan()
.
Transform a Gantt matrix into x, y coordinates and the weight one.
Each point greater than zero in a Gantt matrix becomes a x, y coordinate.
Atention: the schedule must be planned with the function sch_plan()
.
sch_xy_gantt_matrix(sch, gantt = NULL)
sch_xy_gantt_matrix(sch, gantt = NULL)
sch |
A schedule object. |
gantt |
A Gantt Matrix. If it is not informed, it will use
|
A matrix with three columns: x, y and weight.
sch_relations()
, sch_activities()
, sch_add_activities()
,
sch_add_relations()
, sch_add_relation()
, sch_plan()
,
sch_gantt_matrix()
.
sch <- sch_new() %>% sch_add_activities( id = c( 1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c( 2L, 3L, 1L, 2L ) ) %>% sch_add_relations( from = c(1L, 2L, 4L, 4L), to = c(3L, 3L, 1L, 2L) ) %>% sch_plan() sch_duration(sch) xyw <- sch_xy_gantt_matrix(sch) xyw plot(xyw[, 1:2])
sch <- sch_new() %>% sch_add_activities( id = c( 1L, 2L, 3L, 4L), name = c("A", "B", "C", "D"), duration = c( 2L, 3L, 1L, 2L ) ) %>% sch_add_relations( from = c(1L, 2L, 4L, 4L), to = c(3L, 3L, 1L, 2L) ) %>% sch_plan() sch_duration(sch) xyw <- sch_xy_gantt_matrix(sch) xyw plot(xyw[, 1:2])
This class is a representation of Precedence Diagramming Method (PDM). PDM is a technique used for constructing a schedule model in which activities are represented by nodes and are graphically linked by one or more logical relationships to show the sequence in which the activities are to be performed.
A schedule has activities and relations data-frames. With this class, it is possible to apply critical path method
title
A project title for identification. It depends on user of the class. Its use are:
Sechedule$title <- "A title"
sets a title for a project.
Sechedule$title
gets the title of the project.
reference
A reference from project origin, for example, a book, a paper, a corporation, or nothing. Its uses are:
Sechedule$reference <- "A reference"
sets a reference for a project.
Sechedule$title
gets the reference of the project.
has_any_activity
A logical value that indicates if the schedule has any activity. A TRUE value means that the schedule has some activity; a FALSE, means that the schedule is empty.
Usage: Schedule$has_any_activity
nr_activities
Number of activities in a schedule as an integer value.
Usage: Schedule$nr_activities
activities
Return a data frame with all activities of a schedule in an activity id order. This is the main information calculated by CPM. The data frame is formed by following structure:
id: Activity id.
name: The name of activity.
duration: A number that represents the activity's duration.
milestone: A milestone is an activity with zero duration.
This property indicates if an activity is a milestone or not:
TRUE
indicates it is a milestone; FALSE
indicates it is not.
critical: A critical activity is one with total float minor or equal
to zero. This property indicates if an activity is critical:
TRUE
indicates it is critical;
FALSE
indicates it is not critical.
ES: Early Start: is the earliest start period an activity can begin after its predecessors without violating precedence relation.
EF: Early Finish: is the early start plus activity duration.
LS: Late Start: is the late finish minus activity duration.
LF: Late Finish: is the latest finish an activity can finish before their successors without violating precedence relation.
total_float: It is the amount of period an activity can be delayed without violating the project duration. Its formula is: LS - ES or LF - EF.
free_float: It is the amount of period an activity can be delayed without violating the start time of the successors activities.
progr_level: Progressive level is the rank of activities counted from begin. The level of the activities that don't have predecessor is one; the level of the other activities, is one plus the maximal level of their predecessor.
regr_level: Regressive level is the rank of activities counted from the end. The level of the activities that don't have successor is the maximal progressive level; the level of the other activities, is one minus the minimal level of their successor.
topo_float: It is the difference between progressive level and regressive level.
Usage: Schedule$activities
has_any_relation
A logical value that indicates if the schedule has any relation. A TRUE value means that the schedule has some relation; a FALSE, means that the schedule does not have any relation.
Usage: Schedule$has_any_relation
nr_relations
Number of relations in a schedule as an integer value.
Usage: Schedule$nr_relations
relations
Return a data frame with all relations of a schedule in topological order. This is the main information calculated by CPM. The data frame is formed by following structure:
from: Predecessor activity id from a relation.
to: Successor activity id from a relation.
type: The type of relation between activities. Its value may be: FS, FF, SS, SF.
lag: The time period between activity predecessor and activity successor activity
critical: A critical relation formed by two activity critical:
predecessor and successor.
TRUE
indicates it is critical;
FALSE
indicates it is not critical.
ord: Indicates de order that the relation was added in the schedule.
i_from: It is the index of predecessor activity in the activities data frame.
i_to: It is the index of successor activity in the activities data frame.
Usage: Schedule$relations
duration
An integer value that indicates the duration of a schedule.
new()
Make a schedule with activities and relations between activities.
The method Schedule$new(activities, relations)
creates an schedule object from two data frames,
one containing activities lists and the other the precedence relations
between activities.
After creation, it is applied the Critical Path Method (CPM).
It is possible to create a empty schedule, without any activity or relation
with the constructor Schedule$new()
.
After that, it is possible to add activity with add_activity
and relation with add_relation
methods.
Schedule$new(activities = NULL, relations = NULL)
activities
Data frame with activities. If it is not informed, the schedule will be created without any activity. Its structure is:
id: Activity id. It is an integer number that must be unique within a schedule.
name: Activity name. It may be empty.
duration: Activity duration. It is integer number without unit time. It may be zero.
relations
Data frame with precedence relations between activities. If it is informed, the activities has to be informed too. If it is not informed, the schedule will be created without any relation. It is formed by predecessor activity e successor activity. Its structure is:
from: The id of predecessor activity. Must exist an activity with from id.
to: The id of successor activity. Must exist an activity with to id.
type: Specifies the type of relation between activities. The default type is FS and its value may be: FS, FF, SS, SF, that means:
FS: Finish-Start relation. Activity to_id can only start after the finish of activity from_id.
FF: Finish-Finish relation. Activity to_id must finish together with activity from_id.
SS: Start-Start relation. Activity to_id must start together with activity from_id.
SF: Start-Finish relation. Activity to_id must finish when activity from_id starts.
lag: The time period between activities that the successor activity must be advanced, or lated, after activity from_id. It must be an integer, less than, equal or greater than zero.
A Schedule object with CPM parameters calculated.
add_activity()
Add an activity to a schedule.
Schedule$add_activity(id, name = "", duration = 0L)
id
Activity id that will be used to make relation between activities. It must be unique.
name
The name of activity. The default is an empty string.
duration
A number that represents the activity's duration. It must be equal or greater than zero. The default value is zero.
A Schedule object with an activity added and the critical path calculated.
add_activities()
Add activities from a data frame to a schedule.
Schedule$add_activities(activities)
activities
A data frame with the activities to be added.
A Schedule object with activities added and CPM calculated.
get_activity()
Gets an activity by id. It returns a data frame with one line about activity.
Schedule$get_activity(id)
id
An activity id as defined by the user.
A data frame with one line with the activity, or an error if activity id doesn't exist.
add_relation()
Add a relation to a schedule.
Schedule$add_relation(from, to, type = "FS", lag = 0L)
from
The id of predecessor activity. Must exist an activity with from.
to
The id of successor activity. Must exist an activity with to.
type
Specifies the type of relation between activities. The default type is FS and its value may be: FS, FF, SS, SF, that means: If type is not defined, it is assumed to be FS.
FS: Finish-Start relation. Activity 'to' id can only start after the finish of activity 'from' id.
FF: Finish-Finish relation. Activity 'to' id must finish together with activity 'from' id.
SS: Start-Start relation. Activity 'to' id must start together with activity 'from' id.
SF: Start-Finish relation. Activity 'to' id must finish when activity 'from' id starts.
lag
The time period between activities that the successor activity 'to' must be advanced after activity 'from' has been finished. The value may be negative, in such case, the activity 'to' will be anticipated 'lag' time periods. It must be an integer, less than, equal or greater than zero. If lag is not defined, it is assumed to be zero.
A Schedule object with CPM parameters calculated.
add_relations()
Add relations between activities from a data frame to a schedule.
Schedule$add_relations(relations)
relations
A data frame with the relations to be added.
A Schedule object with relations added and CPM calculated.
add_act_rel()
Add an activity and her relations to a schedule.
Schedule$add_act_rel( id, name, duration, relations_id = c(), direction = "succ" )
id
Activity id. The id will be used to make relation between activities.
name
The name of activity.
duration
A number that represents the activity's duration. It must be equal or greater than zero.
relations_id
A vector of ids such that will be linked with activity id. It may be relations of successor or predecessors.
direction
Direction of relations_id: It may be "succ" or "pred". If dir="succ" the relations_id will be the successor of the activity. If dir="pred" the relations_id will be the predecessor of the activity.
A Schedule object.
print()
Print a description of the class
Schedule$print(...)
...
Variable parameters
A String .
all_successors()
List all successors from an activity: direct and indirect successors.
Schedule$all_successors(id, ign_to = NULL)
id
Activity id to be listed.
ign_to
A relation to be ignored: id -> ign_to. Activities from this relation will be ignored.
A vector whith all activities ids.
all_predecessors()
List all predecessors from an activity: direct or indirect predecessors.
Schedule$all_predecessors(id, ign_from = NULL)
id
Activity id to be listed.
ign_from
A relation to be ignored: ign_from -> id. Activities from this relation will be ignored.
A vector with all activities ids.
is_redundant()
Verify if a relation between two activities is redundant. A relation A->C is redundant if there are A->C, A->B, B->C relations.
Schedule$is_redundant(id_from, id_to)
id_from
From activity id.
id_to
To activity id.
A logical TRUE
if an arc is redundant;
FALSE
if it is not.
change_durations()
Change activities duration and calculate critical path. This way is faster than creating a new schedule with new durations.
Schedule$change_durations(new_durations)
new_durations
A vector with new activities' duration.
A Schedule object.
gantt_matrix()
Create a matrix that represents a Gantt chart, a matrix where "1" indicates that an activity is planned to be in execution.
In this matrix, the rows represent activities, whereas the columns represents the activity execution period. So, the number of columns is equal to project duration.
Schedule$gantt_matrix()
A matrix where "1" indicates that an activity is in execution.
xy_gantt_matrix()
Transform a Gantt matrix in x, y coordinates and the weight one. Each point greater than zero in a Gantt matrix becomes a x, y coordinate.
Schedule$xy_gantt_matrix(gantt = NULL)
gantt
A Gantt Matrix. If it is not informed, it will use
gantt_matrix()
before this function.
A matrix x, y and weight.
topoi_sp()
SP Serial or Parallel Topological Indicator: It shows the closeness of a network to a serial or parallel graph. As the network becomes serial, the SP increase, until one, when the network totally serial.
Schedule$topoi_sp()
A number between 0 and 1, inclusive.
topoi_ad()
AD Activity Distribution Topological Indicator: Measures the distribution of the activities over the levels. If AD is approximately equal zero, each level has same numbers of activities. Otherwise, if AD is equal one, the quantity of each level is not uniformly distributed.
Schedule$topoi_ad()
A number between 0 and 1, inclusive.
topoi_la()
LA Length of Arcs Topological Indicator: Measures the presence of long arcs based on the difference between the progressive level of the end activity and the start node of each relation. If LA is approximately equal zero, the progressive level between activities is as far as possible. Otherwise, if LA is equal one, the relation distance are one.
Schedule$topoi_la()
A number between 0 and 1, inclusive.
topoi_tf()
TF Topological Float Indicator: Measures the topological float of each activity. If TF = 0, there is no float between activities. If TF = 1, there is float between activities and they be shift without affecting other activities.
Schedule$topoi_tf()
A number between 0 and 1, inclusive.
clone()
The objects of this class are cloneable with this method.
Schedule$clone(deep = FALSE)
deep
Whether to make a deep clone.
Rubens Jose Rosa ([email protected]), Marcos dos Santos ([email protected]), Thiago Marques ([email protected])
Csardi, G. & Nepusz, T. (2005). The Igraph Software Package for Complex Network Research. InterJournal. Complex Systems. 1695.
Project Management Institute (2017) A Guide to the Project Management Body of Knowledge (PMBOK Guide). Sixth Edition.
Project Management Institute (2017) PMI Lexicon of Project Management Terms: Version 3.2.
Vanhoucke, M. (2009) Measuring Time: Improving Project Performance Using Earned Value Management. Springer-Verlag US.
Vanhoucke, M. (2013) Project Management with Dynamic Scheduling: Baseline Scheduling, Risk Analysis and Project Control. Springer-Verlag Berlin Heidelberg.
Vanhoucke, M. (2014) Integrated Project Management and Control: First Comes the Theory, then the Practice. Springer International Publishing Switzerland.
On vignette package there is more information with examples about:
Critical Path Method Package criticalpath.
How to create a schedule:
Add activities and relations together to an schedule.
Add activities to a schedule.
Add relations to a schedule.
Create a schedule object from data frames.
How to get schedule information:
Title, Reference and Schedule Duration.
How to get activities properties:
Activity Properties.
Gantt Matrix.
How to change activities duration:
Change Activities Duration.
How to get relations properties:
Relation Properties
Successors and Predecessors.
How to get topological properties:
Topological Indicators.