SchedulingConfig#
Project-wide scheduling settings. It's the config field of ProjectData, which starts as new SchedulingConfig(). Create one with the constructor and chain withX(value) setters only for the fields that differ from the defaults.
Declaration#
The config is read when project data is solved or analyzed. A Project deep-copies the data it solves, so changing this object afterwards has no effect until the next solve(data, …).
Constructors#
SchedulingConfig()#
public
Creates a config with every field at its default.
Fields#
Every field is public and mutable. Each one has a fluent setter withX(value) that assigns the field and returns this instance.
applyConstraints#
public boolean applyConstraints ;
public SchedulingConfig
true turns task constraints (TaskData.constraintType) into hard bounds. Violations are reported as conflicts in the result. false ignores every constraint, MSO and MFO included.
scheduleFromEnd#
public boolean scheduleFromEnd ;
public SchedulingConfig
true plans the project backward (ALAP), from projectEnd and the tasks' end dates. Project#level doesn't support backward projects.
gapBehavior#
public GapBehavior gapBehavior ;
public SchedulingConfig
What happens to the free time between a task and the bound its links put on it. The values are listed in the GapBehavior section below.
moveProjects#
public boolean moveProjects ;
public SchedulingConfig
true moves a summary task with its children as one block. false expands links on a summary to its leaf tasks.
projectConstraint#
public boolean projectConstraint ;
public SchedulingConfig
true makes a task without its own constraint inherit the dated constraint of its nearest ancestor. Takes effect only with applyConstraints; groupMode turns it off.
groupMode#
public boolean groupMode ;
public SchedulingConfig
true suppresses the constraint inheritance of projectConstraint. It has no other effect.
useProgress#
public boolean useProgress ;
public SchedulingConfig
true treats a task with progress == 1 as completed: it keeps its dates and never moves.
descendantLinks#
public boolean descendantLinks ;
public SchedulingConfig
true allows a link between a summary task and one of its own descendants. With false, such a link is dropped and reported as a Note.DroppedLink.
calendarMode#
public CalendarMode calendarMode ;
public SchedulingConfig
Which calendars place the work: resource calendars intersected with task calendars, or task calendars only. See CalendarMode.
strictCalendar#
public boolean strictCalendar ;
public SchedulingConfig
true reports a Conflict.CalendarNonWorking when a task that moves with its summary block lands on non-working time. See Conflict.
maxIterations#
public int maxIterations ;
public SchedulingConfig
Upper limit on planner passes. Must be at least 1; 0 fails validation with an InputException at config.max_iterations. When the limit is reached, the result's converged is false.
projectStart#
public Moment projectStart ;
public SchedulingConfig
Start bound of a forward project. null (default) sets no bound. How the bound applies to tasks with and without predecessors is in Scheduling a project. In Validation.REPAIR mode it's also the start date given to tasks without dates.
projectEnd#
public Moment projectEnd ;
public SchedulingConfig
End bound of a backward project, used when scheduleFromEnd is true. null (default) sets no bound.
durationUnit#
public TimeUnit durationUnit ;
public SchedulingConfig
Default unit of TaskData.duration and LinkData.lag, used when a task or link sets no unit of its own. See TimeUnit.
useCalendars#
public boolean useCalendars ;
public SchedulingConfig
false makes every calendar flat 24/7 time, so all time is working time.
defaultResourceCapacity#
public double defaultResourceCapacity ;
public SchedulingConfig
Capacity of a resource whose ResourceData.capacity is null, in assignment value units (1.0 = 100 %). Must be finite and non-negative; anything else fails validation with an InputException at config.default_resource_capacity.
rootId#
public Id rootId ;
public SchedulingConfig
The TaskData.parent value that means "no parent", for data whose virtual root isn't 0. Ids compare as normalized keys, so the default matches both Id.num(0) and Id.str("0"). A parent equal to rootId is removed on import, so stored tasks never point at the root. With another rootId, a task with id 0 is an ordinary parent. An empty string "" always means "no parent" as well.
Methods#
deepClone#
public SchedulingConfig
Returns a copy that shares no state with this instance.
Returns - a new SchedulingConfig with the same values.
copy#
public SchedulingConfig
Returns a shallow copy. The fields are copied by reference; Moment and Id values are shared with this instance.
Returns - a new SchedulingConfig with the same values.
equals, hashCode and toString come from ValueRecord: structural equality over the public fields and a SchedulingConfig{applyConstraints=false, …} dump.
GapBehavior#
What happens to the gap between a task and the earliest position its links allow. Set through SchedulingConfig.gapBehavior.
| Value | Description |
|---|---|
PRESERVE |
Default. A task keeps its own dates when its links allow them. A link moves it only when the task would otherwise start too early. |
COMPRESS |
Every task is pulled to the earliest position its links and constraints allow, closing the gaps. |
How each mode interacts with links and project bounds is in Links, constraints and summaries.
Example#
;
;
Related#
ProjectData- where the config is setCalendarMode- task or resource calendarsTimeUnit- the default duration unit- Scheduling config - the switches that change scheduling
- Links, constraints and summaries - constraints, gap behaviour and summaries