Learn R Programming

criticalpath (version 0.2.1)

sch_validate: Validate Schedule

Description

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.

Usage

sch_validate(sch)

Arguments

sch

A schedule object.

Value

A list object with a description of all error.

Details

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)!

See Also

sch_add_relation(), sch_relations(), sch_add_relations(), sch_add_activities(), sch_add_activity(), sch_activities(), sch_plan().