chocoteam / chocoteam/choco-solver

[BUG] OutOPfMemory Error in propagator PropGraphCumulative

Open
#932 7 comments 0 reactions 0 assignees View on GitHub
support
Dominant language
Java
Stars
779
Forks
159
Avg merge
6d 9h
Merged PRs (30d)
10

Description

PropGraphCumulative is a propagator used by cumulative condition. This propagator uses a graph, which is backtrackable. Vertices of the graph are tasks and there is an edge between two vertices if their tasks overlap. When we go forward, the graph is getting smaller. When we backtrack, we have to return some edges to the graph. Method PropGraphCumulative.propagate(int evtmask) removes edges for every two vertices, when they stop to overlap.

![image](https://user-images.githubusercontent.com/4634324/188144066-3b425bcf-de3e-45a5-9ca8-3d76b5b77374.png)

Generally, maximum number of edges is O(N^2), where N is number of vertices (tasks). The while-cycle is break after 2*N vertices is searched. This means that some extra edges stays in the graph although they should be removed. This doesn’t influence a result but consumes a memory. When we need to schedule a lot tasks or we have more cumulative-constraints, it can cause OutOfMemory Error.

Suggested solution is remove the line number … but maybe it needs deepest research.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.