update_duration_with_idle_times
Warning: when adding several idle time windows for a resource and a task, they must be added in increasing time order and time windows must be disjoint. If not done this way, durations might be inconsistent. Also, propagation should not be called between successive calls.
When developing the model, it is recommended to check the start-based duration constraint by printing the constraint: cp_show_var_constraints(getduration(task))

procedure update_duration_with_idle_times(resource: cpresource, task:cptask, t1:integer, t2:integer, allow_start_in_idle:boolean)
resource
|
a resource
|
task
|
a task
|
t1
|
The idle time window start
|
t2
|
The idle time window end
|
allow_start_in_idle
|
If true, the
task will be able to start in the idle time window.
|
© 2001-2022 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.