Cumulative constraint not able to prune more complex tasks
See original GitHub issueI have 4 tasks. As I am scheduling jobs, I am instantiating them from lower bound. First I place A. Then I place B, but the placement fails. Then there are len(A) - len(B) iterations where B is placed
Expected behavior
Actual behavior
Minimal Working Example
Experienced with choco-solver-{3.3.3 - 4.0.5}
public class BasicPlayground {
public final static int MAXTIME = 10000;
public static void main(String[] args) {
Model model = new Model();
TTask a = new TTask("taskA", model, 800);
TTask b = new TTask("taskB", model, 10);
TTask c = new TTask("taskC", model, 10);
TTask d = new TTask("taskC", model, 10);
model.post(model.arithm(b.getEnd(), "=", c.getStart()),
model.arithm(b.getEnd(), "=", d.getStart()),
model.cumulative(
new Task[]{a.getTask(), b.getTask(), c.getTask(), d.getTask()},
model.intVarArray("", 4, 1, 1),
model.intVar(2),
false,
Cumulative.Filter.HEIGHTS)
);
Solver solver = model.getSolver();
solver.setSearch(Search.minDomLBSearch(a.getStart(), b.getStart(), c.getStart(), d.getStart()));
Solution solution = solver.findSolution();
solver.printStatistics();
}
}
@Data
class TTask {
private final IntVar start;
private final IntVar end;
private final IntVar duration;
private final Task task;
public TTask(String taskName, Model model, int iduration) {
this.start = model.intVar(taskName + " start", 0, BasicPlayground.MAXTIME);
this.end = model.intVar(taskName + " end", 0, BasicPlayground.MAXTIME);
this.duration = model.intVar(taskName + " duration", iduration, iduration);
this.task = model.taskVar(start, duration, end);
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Global Constraint Catalog: Ccumulative
Purpose. Cumulative scheduling constraint or scheduling under resource constraints. Consider a set T of tasks described by the 𝚃𝙰𝚂𝙺𝚂 collection.
Read more >The SoftCumulative Constraint with Quadratic Penalty
The constraint uses one starting time variable Si ∈ [esti, lsti] for each task i in the problem, as well as parameters for...
Read more >A New Multi-Resource cumulatives Constraint with Negative ...
Abstract. This paper presents a new s cumulative constraint which generalizes the original cumulative constraint in different ways.
Read more >A new constraint programming model and solving for the ...
Thus cumulative only has a lower bound on the duration and is unlikely to achieve substantial additional pruning to justify its overhead.
Read more >[PDF] Explaining the cumulative propagator - ResearchGate
PDF | The global cumulative constraint was proposed for modelling ... represent not only a machine which is able to run multiple tasks...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
its what i say, disjunctive is for capacity 1, so you should NOT manually use DisjunctiveTaskIntervalFilter if capacity is not equal to 1
Absolutely!