Options
All
  • Public
  • Public/Protected
  • All
Menu

Gantt project mixin type. At this level, events are called "tasks". All scheduling features from the SchedulerProProjectMixin are preserved. Additionally, tasks inherit constraints from parent tasks. Tasks also receives the effort field and schedulingMode field.

The base event class for this level is GanttEvent. The base assignment class is SchedulerProAssignmentMixin.

At this level, project can be scheduled in backward direction. This is controlled with the direction field.

  • Forward ASAP scheduling

This is a default, most-used mode. In this mode, the "base" date is project start date. If it is not provided, it is calculated as the earliest date of all project tasks. Events are scheduled ASAP, based on the "early" constraints (plus "generic" constraints).

  • Forward ALAP scheduling

In this mode, the "base" date is still project start date. If it is not provided, it is calculated as the earliest date of all project tasks.

Events are first scheduled ASAP, based on the "early" constraints. This gives the project end date. Now events are scheduled ALAP, using the project end date as the base.

The difference between the task position in Forward ASAP and Forward ALAP scheduling is called "slack"

  • Backward ALAP scheduling

This is a "default" backward scheduling. In this mode, the "base" date is project end date. If it is not provided, it is calculated as the latest date of all project tasks. Events are scheduled ALAP, based on the "late" constraints (plus "generic" constraints).

  • Backward ASAP scheduling

In this mode, the "base" date is still project end date. If it is not provided, it is calculated as the latest date of all project tasks.

Events are first scheduled ALAP, based on the "late" constraints. This gives the project start date. Now events are scheduled ASAP, using the project start date as the base.

Hierarchy

Index

Properties

Accessors

Methods

Properties

$project

The project instance, this entity belongs to.

addConstraintOnDateSet

addConstraintOnDateSet: boolean

If this flag is set to true (default) when a start/end date is set on the event, a corresponding start-no-earlier/later-than constraint is added, automatically. This is done in order to keep the event "attached" to this date, according to the user intention.

Depending on your use case, you might want to disable this behaviour.

assigned

assigned: Set<InstanceType<this["project"]["assignmentModelClass"]>>

A set of resources assigned to this task

assignmentModelClass

assignmentModelClass: typeof BaseAssignmentMixin

The constructor for the "Assignment" entity of the project

assignmentStore

The instance of the "Assignments" collection of the project

assignmentStoreClass

assignmentStoreClass: typeof ChronoAssignmentStoreMixin

The constructor for the "Assignments" collection of the project

assignmentsData

assignmentsData: any[]

The assignments data - can be provided during project instantiation and will be loaded with loadInlineData.

const project    = new SchedulerBasicProjectMixin({
    eventsData       : [
        { id : 1, name : 'Predecessor' },
        { id : 2, name : 'Successor' }
    ],
    assignmentsData : [
        { event : 1, resource : 101 },
        { event : 2, resource : 101 },
        { event : 2, resource : 102 }
    ]
    resourcesData   : [
        { id : 100, name : 'John' },
        { id : 101, name : 'Mary' },
        { id : 102, name : 'Gabriel' }
    ]
})

autoCalculatePercentDoneForParentTasks

autoCalculatePercentDoneForParentTasks: boolean

Whether the auto percent done calculation for parent events should be enabled.

autoMergeAdjacentSegments

autoMergeAdjacentSegments: boolean

Set to false to not merge adjacent or overlapping event segments.

calendar

The calendar of this entity.

Please use effectiveCalendar to get the calendar that is actually used by the entity. The calendar reflects only the value provided to this entity while effectiveCalendar returns the calendar that is really used (falls back to the project calendar in case the own calendar is not provided).

calendarManagerStore

calendarManagerStore: ChronoCalendarManagerStoreMixin

The instance of the "Calendars" collection of the project

calendarManagerStoreClass

calendarManagerStoreClass: typeof ChronoCalendarManagerStoreMixin

The constructor for the "Calendars" collection of the project

calendarModelClass

calendarModelClass: typeof BaseCalendarMixin

The constructor for the "Calendar" entity of the project

calendarsData

calendarsData: any[]

The calendars data - can be provided during project instantiation and will be loaded with loadInlineData.

const project    = new SchedulerBasicProjectMixin({
    calendar      : 1,
    calendarsData : [
        {
            id        : 1,
            name      : 'Default',
            intervals : [
                {
                    recurrentStartDate : 'on Sat at 0:00',
                    recurrentEndDate   : 'on Mon at 0:00',
                    isWorking          : false
                }
            ]
        }
    ]
})

childEvents

childEvents: Set<HasChildrenMixin>

A set of references to child events

critical

critical: boolean

A boolean field, indicating whether the event is critical or not. The event is critical if its total slack is zero (or less than zero). This means that if the event is delayed, its successor tasks and the project finish date are delayed as well.

criticalPaths

criticalPaths: CriticalPath[]

The array of the critical paths. Each critical path in turn is represented as an array of CriticalPathNode entries.

cycleEffectClass

cycleEffectClass: typeof CycleEffect

The constructor for the cycle effect - the effect indicating a computation cycle.

dateConstraintIntervalClass

dateConstraintIntervalClass: typeof DateConstraintInterval

Class to represent date constraint intervals set on events.

daysPerMonth

daysPerMonth: number

The number of days per month.

Please note: the value does not define the amount of working time per month for that purpose one should use calendars.

The value is used when converting the duration from one unit to another. So when user enters a duration of, for example, 1 month the system understands that it actually means 30 days (which is then converted to hours) and schedules accordingly.

daysPerWeek

daysPerWeek: number

The number of days per week.

Please note: the value does not define the amount of working time per week for that purpose one should use calendars.

The value is used when converting the duration from one unit to another. So when user enters a duration of, for example, 2 weeks the system understands that it actually means 14 days (which is then converted to hours) and schedules accordingly.

dependenciesCalendar

dependenciesCalendar: DependenciesCalendar

The source of the calendar for dependencies.

dependenciesData

dependenciesData: any[]

The dependencies data - can be provided during project instantiation and will be loaded with loadInlineData.

const project    = new SchedulerBasicProjectMixin({
    eventsData       : [
        { id : 1, name : 'Predecessor' },
        { id : 2, name : 'Successor' }
    ],
    dependenciesData : [ { fromEvent : 1, toEvent : 2 } ]
    resourcesData   : [
        { name : 'Bulldozer' }
    ]
})

dependencyConstraintIntervalClass

dependencyConstraintIntervalClass: typeof DependencyConstraintInterval

Class to represent dependency constraint intervals set on events.

dependencyModelClass

dependencyModelClass: typeof BaseDependencyMixin

The constructor for the "Dependency" entity of the project

dependencyStore

The instance of the "Dependencies" collection of the project

dependencyStoreClass

dependencyStoreClass: typeof ChronoDependencyStoreMixin

The constructor for the "Dependencies" collection of the project

direction

direction: Direction

The scheduling direction of the event. The Forward direction corresponds to the as-soon-as-possible scheduling (ASAP), Backward - to as-late-as-possible (ALAP).

If not specified (which is the default), direction is inherited from the parent task (and from project for the top-level tasks). By default, the project model has forward scheduling mode.

dispatcher

dispatcher: SEDDispatcher

The dispatcher instance for this event. Dispatcher accumulates the information about user input and decide which formula to use for calculation of every related field (startDate, endDate and duration at this level).

Every field can be calculated with 2 type of formulas. The 1st one is called "proposed" and it is used when there is a user input for this field ("proposed" input), or, when user intention is to keep the previous value of the field. The 2nd type is called "pure" and it is used, when a value of the field should be calculated "purely" based on the values of other fields.

See CycleResolverGuide for more information.

duration

duration: Duration

The duration of the event. See also durationUnit.

durationUnit

durationUnit: TimeUnit

The duration unit of the event's duration. See also duration.

earlyEndDate

earlyEndDate: Date

The earliest possible date the event can finish. This value is calculated based on the event restrictions.

earlyEndDateConstraintIntervals

earlyEndDateConstraintIntervals: DateInterval[]

An array of intervals, constraining the end date (as point in time) of this event in case the event is scheduled ASAP (as soon as possible). It is calculated with calculateEarlyEndDateConstraintIntervals

earlyStartDate

earlyStartDate: Date

The earliest possible date the event can start. This value is calculated based on the event restrictions.

earlyStartDateConstraintIntervals

earlyStartDateConstraintIntervals: DateInterval[]

An array of intervals, constraining the start date (as point in time) of this event in case the event is scheduled ASAP (as soon as possible). It is calculated with calculateEarlyStartDateConstraintIntervals

effectiveCalendar

effectiveCalendar: BaseCalendarMixin

The effective calendar used by this entity (either its own calendar if provided or the project calendar) for data calculation purposes.

effectiveVisualCalendar

effectiveVisualCalendar: BaseCalendarMixin

The effective calendar used by this entity (either its own calendar if provided or the project calendar) for data visualizing purposes.

effort

effort: Duration

The effort of this event. See also effortUnit.

effortUnit

effortUnit: TimeUnit

The time unit of the effort field.

endDate

endDate: Date

The end date of the event. Can also be provided as a string, parsable with DateHelper.parse()

endDateConstraintIntervals

endDateConstraintIntervals: DateInterval[]

Field to accumulate the "generic" constraints for end date (which are not related to ASAP scheduling). It is calculated with calculateEndDateConstraintIntervals.

eventModelClass

eventModelClass: typeof SchedulerBasicEvent

The constructor for the "Event" entity of the project.

eventStore

The instance of the "Events" collection of the project

eventStoreClass

eventStoreClass: typeof ChronoEventStoreMixin

The constructor for the "Events" collection of the project

eventsData

eventsData: any[]

The events data - can be provided during project instantiation and will be loaded with loadInlineData.

const project    = new SchedulerBasicProjectMixin({
    eventsData   : [ { name : 'Task 1' } ]
})

getCalendar

getCalendar: () => BaseCalendarMixin

Gets the calendar.

Type declaration

getDirection

getDirection: () => Direction

Getter for direction field.

Type declaration

getEffortUnit

getEffortUnit: () => TimeUnit

Generated getter for the effortUnit

Type declaration

getEndDate

getEndDate: () => Date

Gets the event end date.

Type declaration

    • (): Date
    • Returns Date

getStartDate

getStartDate: () => Date

Gets the event start date

Type declaration

    • (): Date
    • Returns Date

graph

graph: Replica

A reference to the graph, this entity belongs to. Initially empty, and is populated when the entity instance is added to the replica (Replica.addEntity)

hoursPerDay

hoursPerDay: number

The number of hours per day.

Please note: the value does not define the amount of working time per day for that purpose one should use calendars.

The value is used when converting the duration from one unit to another. So when user enters a duration of, for example, 5 days the system understands that it actually means 120 hours and schedules accordingly.

ignoreResourceCalendar

ignoreResourceCalendar: boolean

Ignore assigned resource calendars when scheduling the event. If setting this to true the event dates/duration will be calculated based on the event calendar only.

includeAsapAlapAsConstraints

includeAsapAlapAsConstraints: boolean

Whether to include "As soon as possible" and "As late as possible" in the list of the constraints, for compatibility with the MS Project. Enabled by default. This means that when the constraintType field will be set to assoon/lateaspossible value, the direction field will be cleared to null (emulating the MS Project behavior). So, when enabling this option, you can not have a regular constraint on the task and ASAP/ALAP flag in the same time.

config

{Boolean}

lateEndDate

lateEndDate: Date

The latest possible date the event can finish. This value is calculated based on the event restrictions.

lateEndDateConstraintIntervals

lateEndDateConstraintIntervals: DateInterval[]

An array of intervals, constraining the end date (as point in time) of this event in case the event is scheduled ALAP (as late as possible). It is calculated with calculateLateEndDateConstraintIntervals

lateStartDate

lateStartDate: Date

The latest possible date the event can start. This value is calculated based on the event restrictions.

lateStartDateConstraintIntervals

lateStartDateConstraintIntervals: DateInterval[]

An array of intervals, constraining the start date (as point in time) of this event in case the event is scheduled ALAP (as late as possible). It is calculated with calculateLateStartDateConstraintIntervals

manuallyScheduled

manuallyScheduled: boolean

A boolean field, indicating whether this event should be scheduled automatically or its startDate and endDate are supposed to be defined manually.

maxCalendarRange

maxCalendarRange: number

Maximum range the project calendars can iterate. The value is defined in milliseconds and by default equals 5 years roughly.

parentEvent

parentEvent: HasChildrenMixin

A reference to the parent event

project

The project instance, this entity belongs to.

projectConstraintIntervalClass

projectConstraintIntervalClass: typeof ProjectConstraintInterval

Class to represent project constraint interval applied by the project to its events. The interval prevents th events to be moved before the project start (for forward scheduled projects) or after the project end date (for backward scheduled projects).

replica

replica: EngineReplica

The Replica instance containing all data for this project.

resetUndoRedoQueuesAfterLoad

resetUndoRedoQueuesAfterLoad: boolean

Set to true to reset the undo/redo queues of the internal StateTrackingManager after the Project has loaded. Defaults to false

resourceAllocationInfoClass

resourceAllocationInfoClass: typeof ResourceAllocationInfo

Class implementing resource allocation report for the project resources.

resourceModelClass

resourceModelClass: typeof BaseResourceMixin

The constructor for the "Resource" entity of the project

resourceStore

The instance of the "Resources" collection of the project

resourceStoreClass

resourceStoreClass: typeof ChronoResourceStoreMixin

The constructor for the "Resources" collection of the project

resourcesData

resourcesData: any[]

The resources data - can be provided during project instantiation and will be loaded with loadInlineData.

const project    = new SchedulerBasicProjectMixin({
    resourcesData   : [
        { name : 'John' },
        { name : 'Mary' },
        { name : 'Sarah' },
        { name : 'Robert' }
    ]
})

setCalendar

setCalendar: (calendar: BaseCalendarMixin | ModelId) => Promise<CommitResult>

Sets the calendar. The method triggers schedule change propagation and returns a Promise:

// set calendar
model.setCalendar(calendar1).then(() => {
    // some code to run after schedule got updated
    ...
})

It also adds the calendar to the project calendar manager.

Type declaration

setDirection

setDirection: (value: Direction) => Promise<CommitResult>

Setter for direction field.

Type declaration

setEffort

setEffort: (effort: Duration, unit?: TimeUnit) => Promise<CommitResult>

Generated setter for the effort

Type declaration

skipNonWorkingTimeInDurationWhenSchedulingManually

skipNonWorkingTimeInDurationWhenSchedulingManually: boolean

When true the project's manually scheduled tasks adjust their duration by excluding the non-working time from it, according to the calendar.

Default value is true

skipNonWorkingTimeWhenSchedulingManually

skipNonWorkingTimeWhenSchedulingManually: boolean

When true the project manually scheduled tasks adjust their proposed start/end dates to skip non working time.

Default value is false

slackUnit

slackUnit: TimeUnit

A field storing unit for the totalSlack value.

startDate

startDate: Date

The start date of the event. Can also be provided as a string, parsable with DateHelper.parse()

startDateConstraintIntervals

startDateConstraintIntervals: DateInterval[]

Field to accumulate the "generic" constraints for start date (which are not related to ASAP scheduling). It is calculated with calculateStartDateConstraintIntervals.

stm

stm: StateTrackingManager

State tracking manager instance the project relies on

totalSlack

totalSlack: Duration

A field storing the total slack (or total float) of the event. The total slack is the amount of time that this event can be delayed without causing a delay to the project end. The value is calculated in slackUnit units.

unspecifiedTimeIsWorking

unspecifiedTimeIsWorking: boolean

This property is used when instantiating the default calendar of the project. This calendar will have no availability intervals, so this setting will either turn the whole timespan into working time or non-working.

Default value is true

Accessors

$

  • get $(): {}
  • An object, which properties corresponds to the ChronoGraph Identifiers, created for every field.

    For example:

    class Author extends Entity.mix(Base) {
        @field()
        firstName       : string
        @field()
        lastName        : string
    }
    
    const author = Author.new()
    
    // identifier for the field `firstName`
    author.$.firstName
    
    const firstName = replica.read(author.$.firstName)

    Returns {}

$$

  • A graph identifier, that represents the whole entity.

    Returns EntityIdentifier

$entity

  • An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.

    Returns EntityMeta

enableProgressNotifications

  • set enableProgressNotifications(value: boolean): void

Static $entity

  • An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.

    Returns EntityMeta

Methods

assign

  • assign(resource: InstanceType<this["project"]["resourceModelClass"]>, units?: number): Promise<CommitResult>

calculateDuration

calculateDurationProposed

calculateDurationPure

calculateEarlyEndDateConstraintIntervals

  • calculateEarlyEndDateConstraintIntervals(): CalculationIterator<this["earlyEndDateConstraintIntervals"]>

calculateEarlyStartDateConstraintIntervals

  • calculateEarlyStartDateConstraintIntervals(): CalculationIterator<this["earlyStartDateConstraintIntervals"]>

calculateEffectiveCalendar

calculateEffectiveVisualCalendar

calculateEndDate

calculateEndDateConstraintIntervals

  • calculateEndDateConstraintIntervals(): CalculationIterator<this["endDateConstraintIntervals"]>

calculateEndDateProposed

calculateEndDatePure

calculateLateEndDateConstraintIntervals

  • calculateLateEndDateConstraintIntervals(): CalculationIterator<this["lateEndDateConstraintIntervals"]>

calculateLateStartDateConstraintIntervals

  • calculateLateStartDateConstraintIntervals(): CalculationIterator<this["lateStartDateConstraintIntervals"]>

calculateMaxChildrenEndDate

calculateMinChildrenStartDate

calculateProjectedDuration

calculateProjectedXDateWithDuration

calculateStartDate

calculateStartDateConstraintIntervals

  • calculateStartDateConstraintIntervals(): CalculationIterator<this["startDateConstraintIntervals"]>

calculateStartDateProposed

calculateStartDatePure

calculateTotalChildrenEffort

combineCalendars

commit

  • This is a convenience method, that just delegates to the ChronoGraph.commit method of this entity's graph.

    If there's no graph (entity has not been added to any replica) a CommitZero constant will be returned.

    Parameters

    Returns CommitResult

commitAsync

  • This is a convenience method, that just delegates to the ChronoGraph.commitAsync method of this entity's graph.

    If there's no graph (entity has not been added to any replica) a resolved promise with CommitZero constant will be returned.

    Parameters

    Returns Promise<CommitResult>

convertDuration

enterGraph

  • enterGraph(replica: Replica): void
  • This method is called when entity is added to some replica.

    Parameters

    Returns void

getAssignmentById

  • getAssignmentById(id: ModelId): this["project"]["assignmentStore"]["modelInstanceT"]

getAssignmentFor

  • getAssignmentFor(resource: InstanceType<this["project"]["resourceModelClass"]>): InstanceType<this["project"]["assignmentModelClass"]> | null

getAssignmentStore

  • getAssignmentStore(): this["project"]["assignmentStore"]

getCalendarById

  • getCalendarById(id: ModelId): this["project"]["calendarManagerStore"]["modelInstanceT"]

getCalendarManagerStore

  • getCalendarManagerStore(): this["project"]["calendarManagerStore"]

getDefaultAssignmentModelClass

  • getDefaultAssignmentModelClass(): this["assignmentModelClass"]

getDefaultAssignmentStoreClass

  • getDefaultAssignmentStoreClass(): this["assignmentStoreClass"]

getDefaultCalendarManagerStoreClass

  • getDefaultCalendarManagerStoreClass(): this["calendarManagerStoreClass"]

getDefaultCalendarModelClass

  • getDefaultCalendarModelClass(): this["calendarModelClass"]

getDefaultDependencyModelClass

  • getDefaultDependencyModelClass(): this["dependencyModelClass"]

getDefaultDependencyStoreClass

  • getDefaultDependencyStoreClass(): this["dependencyStoreClass"]

getDefaultEventModelClass

  • getDefaultEventModelClass(): this["eventModelClass"]

getDefaultEventStoreClass

  • getDefaultEventStoreClass(): this["eventStoreClass"]

getDefaultResourceModelClass

  • getDefaultResourceModelClass(): this["resourceModelClass"]

getDefaultResourceStoreClass

  • getDefaultResourceStoreClass(): this["resourceStoreClass"]

getDependencyById

  • getDependencyById(id: ModelId): this["project"]["dependencyStore"]["modelInstanceT"]

getDependencyStore

  • getDependencyStore(): this["project"]["dependencyStore"]

getDuration

getEffort

getEventById

  • getEventById(id: ModelId): this["project"]["eventStore"]["modelInstanceT"]

getEventStore

  • getEventStore(): this["project"]["eventStore"]

getGraph

getProject

  • getProject(): this["project"]

getResourceById

  • getResourceById(id: ModelId): this["project"]["resourceStore"]["modelInstanceT"]

getResourceStore

  • getResourceStore(): this["project"]["resourceStore"]

hasSubEvents

isValidDependency

  • Validates a hypothetical dependency with provided parameters.

    // let's check if a EndToStart dependency linking event1 with event2 will be valid
    if (await project.isValidDependency(event1, event2, DependencyType.EndToStart)) {
        console.log('Dependency is valid');
    } else {
        console.log('Dependency is invalid');
    }

    See also validateDependency method for more detailed validation results.

    Parameters

    • fromEvent: HasDependenciesMixin

      The dependency predecessor

    • toEvent: HasDependenciesMixin

      The dependency successor

    • type: DependencyType

      The dependency type

    • Optional ignoreDependency: BaseDependencyMixin | BaseDependencyMixin[]

      Dependencies to ignore while validating. This parameter can be used for example if one plans to change an existing dependency properties and wants to know if the change will lead to an error:

      // let's check if changing of the dependency predecessor to newPredecessor will make it invalid
      if (await project.isValidDependency(newPredecessor, dependency.toEvent, dependency.type, dependency)) console.log("The dependency is valid");

    Returns Promise<boolean>

    The validation result

joinProject

  • joinProject(): void

leaveGraph

  • This method is called when entity is removed from the replica it's been added to.

    Parameters

    Returns void

leaveProject

  • leaveProject(isReplacing?: boolean): void

loadInlineData

queue

  • queue(fn: () => any, handleReject?: (error: Error | any) => any): Promise<any>
  • Use this method to organize project changes into transactions. Every queue call will create a sequential promise which cannot be interrupted by other queued functions. You can use async functions and await for any promises (including commitAsync) with one exception - you cannot await for other queued calls and any other function/promise which awaits queued function. Otherwise, an unresolvable chain of promises may be created.

    NOTE: Functions which call this method inside are marked with on-queue tag.

    Examples:

    // Invalid queue call which hangs promise chain
    project.queue(async () => {
        const event = project.getEventStore().getById(1);
        await project.queue(() => {
            event.duration = 2;
            return project.commitAsync();
        })
    })
    
    // Valid queue call
    project.queue(() => {
        const event = project.getEventStore().getById(1);
    
        // Consequent queue call will be chained after the current function in the next microtask.
        project.queue(() => {
            event.duration = 2;
            return project.commitAsync();
        })
    
        // Event duration is not yet changed - this condition is true
        if (event.duration !== 2) { }
    })
    internal
    on-queue

    Parameters

    • fn: () => any
        • (): any
        • Returns any

    • Optional handleReject: (error: Error | any) => any
        • (error: Error | any): any
        • Parameters

          • error: Error | any

          Returns any

    Returns Promise<any>

setAssignmentStore

setCalculations

  • setCalculations(calculations: Record<string, unknown>): Promise<Record<string, unknown>>
  • Overrides the project owned store identifiers calculation.

    Parameters

    • calculations: Record<string, unknown>

      Object providing new identifier calculation function names. The object is grouped by store identifiers. For example below code overrides event startDate, endDate and duration calculation so the fields will always simply return their current values:

      // event startDate, endDate and duration will use their userProvidedValue method
      // which simply returns their current values as-is
      const oldCalculations = await project.setCalculations({
          events : {
              startDate : "userProvidedValue",
              endDate   : "userProvidedValue",
              duration  : "userProvidedValue"
          }
      })

    Returns Promise<Record<string, unknown>>

    Promise that resolves with an object having the overridden calculations. The object can be used to toggle the calculations back in the future:

    // override event duration calculation
    const oldCalculations = await project.setCalculations({
        events : {
            duration  : "userProvidedValue"
        }
    })
    // revert the duration calculation back
    project.setCalculations(oldCalculations)

setCalendarManagerStore

setDependencyStore

setDuration

setEndDate

  • setEndDate(date: Date, keepDuration?: boolean): Promise<CommitResult>

setEventStore

setProject

  • setProject(project: this["project"]): this["project"]

setResourceStore

setStartDate

  • setStartDate(date: Date, keepDuration?: boolean): Promise<CommitResult>

shouldRollupChildEarlyEndDate

  • shouldRollupChildEarlyEndDate(child: ConstrainedEarlyEventMixin): CalculationIterator<boolean>

shouldRollupChildEarlyStartDate

  • shouldRollupChildEarlyStartDate(child: ConstrainedEarlyEventMixin): CalculationIterator<boolean>

shouldRollupChildEffort

shouldRollupChildEndDate

shouldRollupChildLateEndDate

  • shouldRollupChildLateEndDate(childEvent: ConstrainedLateEventMixin): CalculationIterator<boolean>

shouldRollupChildLateStartDate

  • shouldRollupChildLateStartDate(childEvent: ConstrainedLateEventMixin): CalculationIterator<boolean>

shouldRollupChildStartDate

skipNonWorkingTime

skipWorkingTime

subEventsIterable

tryPropagateWithChanges

  • tryPropagateWithChanges(changerFn: Function): Promise<boolean>

unassign

  • unassign(resource: InstanceType<this["project"]["resourceModelClass"]>): Promise<any>

userProvidedValue

validateDependency

  • Validates a hypothetical dependency with provided parameters.

    // let's check if a EndToStart dependency linking event1 with event2 will be valid
    const validationResult = await project.validateDependency(event1, event2, DependencyType.EndToStart);
    
    switch (validationResult) {
        const DependencyValidationResult.CyclicDependency :
            console.log('Dependency builds a cycle');
            break;
    
        const DependencyValidationResult.DuplicatingDependency :
            console.log('Such dependency already exists');
            break;
    
        const DependencyValidationResult.NoError :
            console.log('Dependency is valid');
    }

    See also isValidDependency method for more basic usage.

    Parameters

    • fromEvent: HasDependenciesMixin

      The dependency predecessor

    • toEvent: HasDependenciesMixin

      The dependency successor

    • type: DependencyType

      The dependency type

    • Optional ignoreDependency: BaseDependencyMixin | BaseDependencyMixin[]

      Dependencies to ignore while validating. This parameter can be used for example if one plans to change an existing dependency properties and wants to know if the change will lead to an error:

      // let's check if changing of the dependency predecessor to newPredecessor will make it invalid
      const validationResult = await project.validateDependency(newPredecessor, dependency.toEvent, dependency.type, dependency);
      
      if (validationResult !== DependencyValidationResult.NoError) console.log("The dependency is invalid");

    Returns Promise<DependencyValidationResult>

    The validation result

Generated using TypeDoc