This offers the same functionality as probe_sched/5, but with added flexibility, and a more complex user interface. The extra arguments offer the user more control.
The Cost argument is a variable, and it must be linked to the task variables by the list of linear constraints. The user can add not only linear constraints on the cost function, but also constraints between the task variables. Only constraints made explicit in this list are 'seen' by the probe. probe_cstr_sched also posts them to the ic solver.
The options offer user control over the temporal granularity, and the priority of the probe.
The algorithm uses min_max, but directs the search using a probe which focusses the search on the optimum. The probe is a procedure that finds optimal solutions to a relaxed problem ignoring resource limits. For details see setup_probe. Additionally the algorithm sets up a binary variable between each pair of tasks, see make_overlap_bivs. Whenever the probe returns tentative start times, these are propagated to the overlap binary variables yielding a total resource usage which reveals any bottlenecks, where needed resources exceed thos available. probe_search then non-deterministically introduces a new constraint which reduces the bottleneck. The probe_sched call:
probe_sched(Ss,Ds,Rs,MaxR,abs(X-X1)+Y)translates into the probe_cstr_sched call:
probe_cstr_sched(Ss,Ds,Rs,MaxR,[Cost=:=E1+Y,E1>=X-X1,E1>=X1-X],Cost, [granularity(1),priority(5)])Thus making the default granularity '1' and the default priority '5'.