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 GanttAssignmentMixin.

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.

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.

calendar

The calendar of this entity.

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.

daysPerMonth

daysPerMonth: number

The number of days per month (is used when converting the duration from one unit to another).

daysPerWeek

daysPerWeek: number

The number of days per week (is used when converting the duration from one unit to another).

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' }
    ]
})

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

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.

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

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

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 (is used when converting the duration from one unit to another).

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

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.

parentEvent

parentEvent: HasChildrenMixin

A reference to the parent event

project

The project instance, this entity belongs to.

replica

replica: EngineReplica

The Replica instance containing all data for this project.

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

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

calculateEndDate

calculateEndDateConstraintIntervals

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

calculateEndDateProposed

calculateEndDatePure

calculateLateEndDateConstraintIntervals

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

calculateLateStartDateConstraintIntervals

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

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(): any

getResourceById

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

getResourceStore

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

hasSubEvents

isValidDependency

  • Validates a hypothetic 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: SchedulerProDependencyMixin

      The dependency 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

setAssignmentStore

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>

skipNonWorkingTime

skipWorkingTime

subEventsIterable

unassign

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

validateDependency

  • Validates a hypothetic 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: SchedulerProDependencyMixin

      The dependency 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