diff --git a/examples/user-hints/model-order/edgeModelOrder.elkt b/examples/user-hints/model-order/edgeModelOrder.elkt new file mode 100644 index 0000000..9ad8be4 --- /dev/null +++ b/examples/user-hints/model-order/edgeModelOrder.elkt @@ -0,0 +1,1400 @@ +/******************************************************************************* + * Copyright (c) 2024 Kiel University and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +/* +// elkex:category +Model Order + +// elkex:label +Edge Model Order + +// elkex:doc +Using edge model order, the edge model order should determine the order of the outgoing edges and their ports and make +that the order of the incoming edges depends on the order of the ports in the previous layer. + +Each model is annotated showing whether it is actually possible to solve the resulting dummy node issue. +*/ + +// elkex:graph + +algorithm: layered +elk.direction: RIGHT + +considerModelOrder.components: MODEL_ORDER +aspectRatio: 1 + +node OutgoingEastIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + + port p2 + } + + node n2 { + layout [size: 20, 20] + + port p3 + port p4 + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + } + + + node n1_1 { + layout [size: 20, 20] + + port p2 + } + + node n2 { + layout [size: 20, 20] + + port p3 + port p4 + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingEastIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + + } + + node n1_1 { + layout [size: 20, 20] + + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingEastIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + + } + + node n1_1 { + layout [size: 20, 20] + + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingEastIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + + port p1 + + } + + node n1_1 { + layout [size: 20, 20] + + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: false + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} \ No newline at end of file diff --git a/examples/user-hints/model-order/portModelOrder.elkt b/examples/user-hints/model-order/portModelOrder.elkt new file mode 100644 index 0000000..ab5879b --- /dev/null +++ b/examples/user-hints/model-order/portModelOrder.elkt @@ -0,0 +1,1400 @@ +/******************************************************************************* + * Copyright (c) 2024 Kiel University and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +/* +// elkex:category +Model Order + +// elkex:label +Port Model Order + +// elkex:doc +Using port model order, the port model order should determine the order of the outgoing edges and make +that the order of the incoming edges depends on the order of the ports in the previous layer. + +Each model is annotated showing whether it is actually possible to solve the resulting dummy node issue. +*/ + +// elkex:graph + +algorithm: layered +elk.direction: RIGHT + +considerModelOrder.components: MODEL_ORDER +aspectRatio: 1 + +node OutgoingEastIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + + port p2 + } + + node n2 { + layout [size: 20, 20] + + port p3 + port p4 + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingNorthIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingSouthIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingWestPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingNorthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingSouthPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingWestIncomingEastPorts { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1.p2 +} + +node OutgoingEastIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + } + + + node n1_1 { + layout [size: 20, 20] + + port p2 + } + + node n2 { + layout [size: 20, 20] + + port p3 + port p4 + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingEastIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + + } + + node n1_1 { + layout [size: 20, 20] + + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingEastIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + + } + + node n1_1 { + layout [size: 20, 20] + + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingEastIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + + port p1 + + } + + node n1_1 { + layout [size: 20, 20] + + port p2 + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingNorthIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: NORTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: NORTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingSouthIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: SOUTH + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: SOUTH + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingWestPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: WEST + } + port p4 { + ^port.side: WEST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingNorthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: NORTH + } + port p4 { + ^port.side: NORTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingSouthPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: SOUTH + } + port p4 { + ^port.side: SOUTH + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} + +node OutgoingWestIncomingEastPortsMulti { + algorithm: layered + elk.direction: RIGHT + + cycleBreaking.strategy: MODEL_ORDER + considerModelOrder.strategy: PREFER_EDGES + crossingMinimization.strategy: NONE + crossingMinimization.greedySwitch.type: OFF + portModelOrder: true + + + node n1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p1 { + ^port.side: WEST + } + + } + + node n1_1 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p2 { + ^port.side: WEST + } + + } + + node n2 { + layout [size: 20, 20] + portConstraints: FIXED_SIDE + + port p3 { + ^port.side: EAST + } + port p4 { + ^port.side: EAST + } + + } + + edge n1.p1 -> n2.p4 + edge n2.p3 -> n1_1.p2 +} \ No newline at end of file