Skip to content

Commit

Permalink
Fix: true model order crossing minimization (#815)
Browse files Browse the repository at this point in the history
* Layered: Graph importer, set model order for hierarchical graph if foce
model order is set.

Signed-off-by: Soeren Domroes <sdo@informatik.uni-kiel.de>
  • Loading branch information
soerendomroes committed Mar 31, 2022
1 parent de0f6db commit 108b8e2
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -306,7 +306,8 @@ private void importHierarchicalGraph(final ElkNode elkgraph, final LGraph lgraph

if (elkgraph.getProperty(LayeredOptions.CONSIDER_MODEL_ORDER_STRATEGY) != OrderingStrategy.NONE
|| elkgraph.getProperty(LayeredOptions.CYCLE_BREAKING_STRATEGY)
== CycleBreakingStrategy.MODEL_ORDER) {
== CycleBreakingStrategy.MODEL_ORDER
|| elkgraph.getProperty(LayeredOptions.CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER)) {
// Assign a model order to the nodes as they are read
elknode.setProperty(InternalProperties.MODEL_ORDER, index++);
}
Expand Down Expand Up @@ -375,7 +376,8 @@ private void importHierarchicalGraph(final ElkNode elkgraph, final LGraph lgraph

if (elkgraph.getProperty(LayeredOptions.CONSIDER_MODEL_ORDER_STRATEGY) != OrderingStrategy.NONE
|| elkgraph.getProperty(LayeredOptions.CYCLE_BREAKING_STRATEGY)
== CycleBreakingStrategy.MODEL_ORDER) {
== CycleBreakingStrategy.MODEL_ORDER
|| elkgraph.getProperty(LayeredOptions.CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER)) {
// Assign a model order to the edges as they are read
elkedge.setProperty(InternalProperties.MODEL_ORDER, index++);
}
Expand Down

0 comments on commit 108b8e2

Please sign in to comment.