You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the cs2 solver, the maximum node ID in the flow graph output sent to the solver can be no greater than the number of nodes in the flow graph, or the solver fails. In other words, the p N E DIMACS line at the start of the output must contain the maximum node ID used as N.
The workaround fix deployed in ee31f80 is to return the maximum ID in use instead of the true number of nodes, which leads to cs2 implicitly assuming disconnected nodes for the unused IDs. However, this isn't ideal: as part of the workaround, FlowGraph::NumNodes() returns a number greater than the actual number of nodes in the graph. Moreover, the implied disconnected nodes may slow the solver down (although I doubt there is much impact in practice).
Note that this isn't a problem when node IDs are reused: the number of nodes in the flow graph and the maximum ID are in agreement in this case.
Possible comprehensive solutions:
Re-map sparse node IDs into a continuous space before sending them to cs2, and back again (yuck!).
Continue with the disconnected implicit node approach, but re-engineer things so that FlowGraph::NumNodes() returns the correct number again.
This commit brings in a somewhat hacky workaround for the problem
described in #25: when using the cs2 solver, the maximum node ID in the
output can be no greater than the number of nodes in the flow graph. The
workaround fix is to return the maximum ID in use instead of the true
number of nodes, which leads to cs2 implicitly assuming disconnected
nodes for the unused IDs.
This commit does not currently affect correctness of any code, but care
is required, since FlowGraph::NumNodes() does not necessarily return the
true number of nodes any more.
Affected modules: scheduling/flow
Bug: #26
Change-Id: I5de0b35cc84f1d4e53e050ac96e25924d031c7ae
This commit brings in a somewhat hacky workaround for the problem
described in #25: when using the cs2 solver, the maximum node ID in the
output can be no greater than the number of nodes in the flow graph. The
workaround fix is to return the maximum ID in use instead of the true
number of nodes, which leads to cs2 implicitly assuming disconnected
nodes for the unused IDs.
This commit does not currently affect correctness of any code, but care
is required, since FlowGraph::NumNodes() does not necessarily return the
true number of nodes any more.
Affected modules: scheduling/flow
Bug: #26
Change-Id: I5de0b35cc84f1d4e53e050ac96e25924d031c7ae
(cherry picked from commit 28bb418)
When using the cs2 solver, the maximum node ID in the flow graph output sent to the solver can be no greater than the number of nodes in the flow graph, or the solver fails. In other words, the
p N E
DIMACS line at the start of the output must contain the maximum node ID used asN
.The workaround fix deployed in ee31f80 is to return the maximum ID in use instead of the true number of nodes, which leads to cs2 implicitly assuming disconnected nodes for the unused IDs. However, this isn't ideal: as part of the workaround,
FlowGraph::NumNodes()
returns a number greater than the actual number of nodes in the graph. Moreover, the implied disconnected nodes may slow the solver down (although I doubt there is much impact in practice).Note that this isn't a problem when node IDs are reused: the number of nodes in the flow graph and the maximum ID are in agreement in this case.
Possible comprehensive solutions:
FlowGraph::NumNodes()
returns the correct number again.See patch in CL 237749.
The text was updated successfully, but these errors were encountered: