The project instance, this entity belongs to.
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).
A set of references to child events
The date of the constraint, applied to this event
The type of constraint, applied to this event
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.
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.
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.
The duration of the event. See also durationUnit.
The duration unit of the event's duration. See also duration.
The earliest possible date the event can finish. This value is calculated based on the event restrictions.
The earliest possible date the event can start. This value is calculated based on the event restrictions.
The effective calendar used by this entity (either its own calendar if provided or the project calendar) for data calculation purposes.
The effective calendar used by this entity (either its own calendar if provided or the project calendar) for data visualizing purposes.
The end date of the event. Can also be provided as a string, parsable with DateHelper.parse()
Field to accumulate the "generic" constraints for end date (which are not related to ASAP scheduling). It is calculated with calculateEndDateConstraintIntervals.
Gets the calendar.
Getter for direction field.
Gets the event end date.
Gets the event start date
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)
This flag indicates that task has a postponed scheduling conflict.
Inactive events do not affect successors nor rollup their attributes to parent events.
A set of incoming dependencies for this task (dependencies which ends at this task)
The latest possible date the event can finish. This value is calculated based on the event restrictions.
The latest possible date the event can start. This value is calculated based on the event restrictions.
A set of outgoing dependencies from this task (dependencies which starts at this task)
A reference to the parent event
The percent done for this event.
The project instance, this entity belongs to.
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.
Sets the constraint date of the event.
Sets the constraint type of the event.
Setter for direction field.
A field storing unit for the totalSlack value.
The start date of the event. Can also be provided as a string, parsable with DateHelper.parse()
Field to accumulate the "generic" constraints for start date (which are not related to ASAP scheduling). It is calculated with calculateStartDateConstraintIntervals.
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.
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)
A graph identifier, that represents the whole entity.
An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.
A ConstrainedScheduleMixin for this event, which is used for scheduling by constraints and dependencies.
A ConstrainedScheduleMixin, which in the absence of late scheduling is just an alias for earlyPreSchedule
The ConstrainedLateScheduleMixin containing the 1st phase ALAP schedule
The ConstrainedLateScheduleMixin containing the 2nd phase ALAP schedule
An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.
The main calculation method for the duration field. Delegates to either calculateDurationProposed or calculateDurationPure, depending on the information from dispatcher
The "proposed" calculation function of the duration field. It should calculate the duration as if there's a user input for it or a previous value. It can also use the values of other fields to "validate" the "proposed" value.
See also calculateDurationPure
The "pure" calculation function of the duration field. It should calculate the duration as if there's no user input for it and no previous value - "purely" based on the values of other fields.
If start date of event is less or equal then end date (normal case) it delegates to calculateProjectedDuration. Otherwise, duration is set to 0.
See also calculateDurationProposed.
Calculation method of the effectiveCalendar. Takes the calendar from the project, if not provided to the entity explicitly.
Calculation method of the effectiveCalendar. Takes the calendar from the project, if not provided to the entity explicitly.
The main calculation method for the endDate field. Delegates to either calculateEndDateProposed or calculateEndDatePure, depending on the information from dispatcher
The "proposed" calculation function of the endDate field. It should calculate the endDate as if there's a user input for it or a previous value. It can also use the values of other fields to "validate" the "proposed" value.
See also calculateEndDatePure
The "pure" calculation function of the endDate field. It should calculate the endDate as if there's no user input for it and no previous value - "purely" based on the values of other fields.
At this level it delegates to calculateProjectedXDateWithDuration
See also calculateEndDateProposed.
Method calculates the task percentDone field value. For a summary task it calculates the value based on the task children if the project autoCalculatePercentDoneForParentTasks is true (default). And for a regular (leaf) task it just returns the field provided value as-is.
This method calculates the duration of the given time span, in the provided durationUnit
or in the durationUnit.
This method calculates the opposite date of the event.
The base date of the event (start or end date)
Boolean flag, indicating whether the given baseDate
is start date (true
) or end date (false
)
Duration of the event, in its durationUnits
The main calculation method for the startDate field. Delegates to either calculateStartDateProposed or calculateStartDatePure, depending on the information from dispatcher
The "proposed" calculation function of the startDate field. It should calculate the startDate as if there's a user input for it or a previous value. It can also use the values of other fields to "validate" the "proposed" value.
See also calculateStartDatePure
The "pure" calculation function of the startDate field. It should calculate the startDate as if there's no user input for it and no previous value - "purely" based on the values of other fields.
At this level it delegates to calculateProjectedXDateWithDuration
See also calculateStartDateProposed.
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.
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.
This method is called when entity is added to some replica.
Convenience method to get the instance of assignment by its id.
Convenience method to get the instance of the assignment store in the project instance, this entity belongs to.
Convenience method to get the instance of calendar by its id.
Convenience method to get the instance of the calendar manager store in the project instance, this entity belongs to.
Returns default constraint date value for the constraint type provided (either start or end date of the event).
Convenience method to get the instance of dependency by its id.
Convenience method to get the instance of the dependency store in the project instance, this entity belongs to.
Duration getter. Returns the duration of the event, in the given unit. If unit is not given, returns duration in durationUnit.
Convenience method to get the instance of event by its id.
Convenience method to get the instance of the event store in the project instance, this entity belongs to.
The method to get the ChronoGraph
instance, this entity belongs to.
Returns a project instance
Convenience method to get the instance of resource by its id.
Convenience method to get the instance of the resource store in the project instance, this entity belongs to.
The abstract method which should indicate whether this event has sub events
Returns true if the provided constraint type is applicable to the event.
Constraint type.
True
if the provided constraint type is applicable (false
otherwise).
Indicates if the task can be pinned with a constraint to enforce its start/end date changes.
Template method, which is called when model is joining the project (through joining some store that has already joined the project)
This method is called when entity is removed from the replica it's been added to.
Template method, which is called when model is leaving the project (through leaving some store usually)
Sets the constraint type (if applicable) and constraining date to the task.
Constraint type.
Promise
Duration setter.
The new duration to set.
The unit for new duration. Optional, if missing the durationUnit value will be used.
A boolean flag, indicating, whether the intention is to keep the start date (true
) or end date (false
)
Sets the event end date.
The new end date to set
Whether the intention is to keep the duration
field (keepDuration = true
) or startDate
(keepDuration = false
)
The method to set the project instance, this entity belongs to.
Sets the event start date
The new start date to set
Whether the intention is to keep the duration
field (keepDuration = true
) or endDate
(keepDuration = false
)
The method is used during forward (from start to end) scheduling. It defines whether the provided dependency
should constrain the successor or not. If the method returns true
the dependency constrains the successor and does not do that when false
returned.
By default the method returns true
if the dependency is active
and if this event is active (or both this event and the successor are inactive).
Dependency to consider.
true
if the dependency should constrain successor, false
if not.
The method defines whether the provided child event should be taken into account when calculating this summary event earlyEndDate. Child events roll up their earlyEndDate values to their summary tasks. So a summary task earlyEndDate gets equal to its maximal child earlyEndDate.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default, the method returns true
to include all child events data.
Child event to consider.
true
if the provided event should be taken into account, false
if not.
The method defines whether the provided child event should be taken into account when calculating this summary event earlyStartDate. Child events roll up their earlyStartDate values to their summary tasks. So a summary task earlyStartDate date gets equal to its minimal child earlyStartDate.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default, the method returns true
to include all child events data.
Child event to consider.
true
if the provided event should be taken into account, false
if not.
The method defines whether the provided child event should be taken into account when calculating this summary event endDate. Child events roll up their endDate values to their summary tasks. So a summary task end gets equal to its maximal child end.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default the method returns true
to include all child events data.
true
if the provided event should be taken into account, false
if not.
The method defines wether the provided child event should be taken into account when calculating this summary event lateEndDate. Child events roll up their lateEndDate values to their summary tasks. So a summary task lateEndDate gets equal to its maximal child lateEndDate.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default the method returns true
to include all child events data.
Child event to consider.
true
if the provided event should be taken into account, false
if not.
The method defines wether the provided child event should be taken into account when calculating this summary event lateStartDate. Child events roll up their lateStartDate values to their summary tasks. So a summary task lateStartDate date gets equal to its minimal child lateStartDate.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default the method returns true
to include all child events data.
Child event to consider.
true
if the provided event should be taken into account, false
if not.
The method defines whether the provided child event should be taken into account when calculating this summary event percentDone.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default the method returns true
to include all child events data.
Child event to consider.
true
if the provided event should be taken into account, false
if not.
The method defines whether the provided child event should be taken into account when calculating this summary event startDate. Child events roll up their startDate values to their summary tasks. So a summary task start date gets equal to its minimal child start.
If the method returns true
the child event is taken into account
and if the method returns false
it's not.
By default the method returns true
to include all child events data.
true
if the provided event should be taken into account, false
if not.
The method is used during backward (from end to start) scheduling. It defines whether the provided dependency
should constrain the predecessor or not. If the method returns true
the dependency constrains the predecessor and does not do that when false
returned.
By default the method returns true
if the dependency is active
and if this event is active (or both this event and the predecessor are inactive).
Dependency to consider.
true
if the dependency should constrain successor, false
if not.
The method skips the event non working time starting from the provided date
and
going either forward or backward in time.
It uses the event effective calendar to detect which time is not working.
Date to start skipping from
Skip direction (true
to go forward in time, false
- backwards)
The method skips the provided amount of the event working time
starting from the date
and going either forward or backward in time.
It uses the event effective calendar to detect which time is not working.
Date to start skipping from
Skip direction (true
to go forward in time, false
- backwards)
Amount of working time to skip
Units the duration
value in (if not provided then duration is considered provided in durationUnit)
The abstract method which should return an Iterable of BaseEventMixin
Calculation function that simply returns current (proposed or previous) value of an identifier.
Generated using TypeDoc
This mixin provides the constraint-based as-late-as-possible scheduling. See the ConstrainedEarlyEventMixin for the description of the ASAP constraints-based scheduling. See GanttProjectMixin for more details about forward/backward, ASAP/ALAP scheduling.
It also provides the facilities for calculating the event's totalSlack and the critical flag.
The ALAP-specific constraints are accumulated in lateSchedule, latePreSchedule fields.