2 3
play

2 3 P ROBLEM Diagrams in practice often have an unfortunate aspect - PowerPoint PPT Presentation

A G ENERAL RALIZA ZATION ON OF OF THE THE D IRE TED G RA PH L AYERI NG P ROBLEM RECTED RAPH YERING OBLEM Ulf Regg, Thorsten Ehlers, Miro Spnemann, and Reinhard von Hanxleden Department of Computer Science Kiel University T HE M


  1. A G ENERAL RALIZA ZATION ON OF OF THE THE D IRE TED G RA PH L AYERI NG P ROBLEM RECTED RAPH YERING OBLEM Ulf Rüegg, Thorsten Ehlers, Miro Spönemann, and Reinhard von Hanxleden Department of Computer Science Kiel University

  2. T HE M OTIVATION 1

  3. 2

  4. 3

  5. P ROBLEM Diagrams in practice often have an unfortunate aspect ratio resulting in poor utilization of the drawing area small diagram elements a lot of whitespace C. Gutwenger, R. von Hanxleden, P. Mutzel, U. Rüegg, and M. Spönemann Examining the compactness of automatic layout algorithms for practical diagrams, GraphViP 2014 4

  6. S UGIYAMA L AYOUT P1 Cycle Removal P2 Layer Assignment Topological Phases P3 Crossing Minimization P4 Node Placement Geometrical Phases P5 Edge Routing K. Sugiyama, S. Tagawa, M. Toda C. D. Schulze, M. Spönemann, R. v. Hanxleden Methods for visual understanding of hierarchical system Drawing layered graphs with port constraints Journal of Visual Languages and Computing, 2013 structures, IEEE Trans. on Syst., Man and Cybernetics, 1981. 5

  7. A LTERING THE A SPECT R ATIO Which phase has influence? (almost) nothing to do with it P3 Crossing Minimization P4 Node Placement certainly have an impact, straight edges may increase width still, the topology is already fixed P5 Edge Routing edges may occupy space between layers This leaves us with ... P1 Cycle Removal P2 Layer Assignment 6

  8. L AYERING estimated Height vs effective Width 7

  9. E XISTING W ORK L AYERING P. Eades and K. Sugiyama, How to draw a directed graph, Journal of Information Processing, 1990. E. R. Gansner, E. Koutsofios, S. C. North, and K.-P. Vo, A technique for drawing directed graphs , IEEE Transactions on Software Engineering , 1993. E. G. Coffman and R. L. Graham, Optimal scheduling for two-processor systems, Acta Informatica, 1972. "M INIMUM W IDTH " P. Healy and N. Nikolov, How to layer a directed acyclic graph, Graph Drawing, 2001. P. Healy and N. Nikolov, A branch-and-cut approach to the directed acyclic graph layering problem, Graph Drawing, 2002. N. Nikolov, A. Tarassov, and J. Branke, In search for efficient heuristics for minimum-width graph layering with consideration of dummy nodes, Journal of Experimental Algorithmics, 2005. A SPECT R ATIO L. Nachmanson, G. Robertson, and B. Lee, Drawing graphs with GLEE , Graph Drawing, 2008. 8

  10. N OT A DDRESSED SO F AR Input graph must be acyclic 1 Height bound by the longest path 2 Width bound by highest node degree 9

  11. D IG -C OLA "We have found that allowing small deviation sometimes gives us the necessary freedom for overcoming local inefficiencies in the layout, without affecting visualization of the overall directionality." T. Dwyer and Y. Koren, D IG -C O L A : Directed Graph Layout through Constrained Energy Minimization, INFOVIS, 2005. all edges point downwards some edges point upwards less crossings 10

  12. S OMETHING N EW 11

  13. W ARNING From now on, drawing are left to right instead of top down . Hence ... Height is Width and Width is Height (I will most definitely use them wrongly at some point ...) 12

  14. O BSERVATION 0 reversed edges, 71 edge length 2 reversed edges, 35 edge length 6 reversed edges, 16 edge length 13

  15. D IRECTED L AYERING ( DLP ) Given a directed acyclic graph 𝐻 = 𝑊, 𝐹 , find a valid layering 𝑀: 𝑊 → ℕ . M INIMIZE ෍ 𝑀 𝑥 − 𝑀(𝑤) 𝑤,𝑥 ∈𝐹 S UBJECT TO 𝑀 𝑥 − 𝑀 𝑤 ≥ 1 ∀ 𝑤, 𝑥 ∈ 𝐹 E. R. Gansner, E. Koutsofios, S. C. North, and K.-P. Vo, A technique for drawing directed graphs , IEEE Transactions on Software Engineering , 1993. 14

  16. G ENERALIZED L AYERING ( GLP ) Given a directed acyclic graph 𝐻 = 𝑊, 𝐹 , find a feasible layering 𝑀: 𝑊 → ℕ . M INIMIZE 𝑥 𝑚𝑓𝑜 ෍ 𝑀 𝑥 − 𝑀(𝑤) + 𝑥 𝑠𝑓𝑤 𝑤, 𝑥 ∈ 𝐹: 𝑀 𝑤 > 𝑀(𝑥) 𝑤,𝑥 ∈𝐹 S UBJECT TO ∀ 𝑤, 𝑥 ∈ 𝐹 𝑀 𝑥 − 𝑀 𝑤 𝑀 𝑥 − 𝑀 𝑤 ≥ 1 ≥ 1 15

  17. IP M ODEL I NPUT Graph 𝐻 = 𝑊, 𝐹 𝜕 𝑠𝑓𝑤 , 𝜕 𝑚𝑓𝑜 weighting constants I NTEGER V ARIABLES 𝑚 𝑤 takes values in 1, … , 𝑜 ( 𝑊 = 𝑜 ) ∀ 𝑤 ∈ 𝑊 indicating node 𝑤 is placed in layer 𝑚(𝑤) B OOLEAN V ARIABLES 1 iff 𝑓 𝑣, 𝑤 ∈ 𝐹 reversed , 0 otherwise 𝑠(𝑣, 𝑤) ∀ (𝑣, 𝑤) ∈ 𝐹 M INIMIZE 𝜕 𝑚𝑓𝑜 ෍ 𝑚 𝑣 − 𝑚(𝑤) + 𝜕 𝑠𝑓𝑤 ෍ 𝑠(𝑣, 𝑤) 𝑣,𝑤 ∈𝐹 𝑣,𝑤 ∈𝐹 S UBJECT TO 1 ≤ 𝑚 𝑤 ≤ 𝑜 ∀ 𝑤 ∈ 𝑊 𝑚 𝑣 − 𝑚(𝑤) ≥ 1 ∀ (𝑣, 𝑤) ∈ 𝐹 𝑜 ⋅ 𝑠 𝑣, 𝑤 + 𝑚 𝑤 ≥ 𝑚 𝑣 + 1 ∀ 𝑣, 𝑤 ∈ 𝐹 16

  18. H EURISTIC 1 Remove leaf nodes iteratively Construct initial feasible layering, 2 deduce edge directions 3 Run DLP 4 Greedily improve result 5 Reattach leaf nodes 17

  19. L AYERING C ONSTRUCTION S TEP 2 I DEA v u, a i , a o Place nodes on a line (assign indexes), try to keep edges short u unassigned neighbors and the number of left edges small a i assigned, incoming a o assigned, outgoing L OOP select candidate with smallest | u | (start with random node) if | a i |< | a o | assign index to the left of currently placed nodes else assign to the right A. J. McAllister, J. Pantrigo, R. Mart, A. Duarte, and E. Pardo, A new heuristic algorithm for the linear arrangement Scatter search for the cutwidth minimization problem, Technical Report, University of New Brunswick, 1999. problem, Annals of Operations Research, 2012. 18

  20. L AYERING I MPROVEMENT S TEP 4 I DEA Identify badly placed nodes and move them to a different layer M OVE 0, if WS = ∅ 𝑚 𝑤 − min 𝑚 WS + 1, if WP = ∅ move 𝑤 = ൞ 𝑚 𝑤 − max 𝑚 WP − 1, else P ROFIT profit 𝑤, 𝑛, 𝑦 = ቊ0, if 𝑛 ≤ 1 𝑛 ⋅ ( W x| − 𝐅 ) + WS |x , else move n4 = 2 profit n4 , 2, 2 = 2 + 1 = 3 19

  21. E XAMPLE O RIGINAL C ONSTRUCTION DLP & I MPROVEMENT 7 left edges, 34 edge length 6 left edes, 32 edge length 20

  22. R ESULTS 21

  23. T OPOLOGICAL M ETRICS 1-10 1-20 1-30 1-40 1-50 E A G A Heur Heur* 72.64 Random 60.53 58.21 56.14 52.79 48.48 46.73 Dummy Nodes 34.45 141.3 82.47 North 75.66 68.91 65.73 55.47 53.53 39.91 10.36 8.67 Random 3.71 2.89 2.93 2.64 2.54 2.44 Reversed Edges 8.55 7.07 North 2.74 1.47 1.02 0.72 0.56 0 22

  24. G EOMETRICAL M ETRICS 1-10 1-20 1-30 1-40 1-50 E A G A Heur Heur* Random 1,084 1,025 1,027 980 1,004 943 930 843 Width (px) 1,727 1,469 1,409 1,334 1,224 1,216 1,137 1,068 North 737,159 720,798 708,361 700,385 691,216 672,717 656,070 631,737 Random Area (px) 874,374 695,494 691,372 660,842 641,581 622,838 629,778 587,727 North 23

  25. W RAP U P 24

  26. N OTES GLP does not consider node sizes and is too slow Heuristic fails for paths and trees Averages of estimated and effective values show the same tendency Still, for 64% of the graphs: estimated increased and effective decreased Q UESTIONS Do people accept reversed edges? Are there better metrics for compactness? Does an iterative procedure/portfolio of algorithms help? 25

  27. A PPENDIX 26

  28. D IFFERENT P HASE S TRATEGIES Polyline Orthogonal BK LS BK LS EaGa 1-30 Heur Width (px) 1,165 1,043 943 898 824 817 790 746 732 711 678 652 Area (px) 20,19418,68315,575 13,58212,64211,272 12,38311,035 10,075 10,666 9,917 9,295 Aspect Ratio 0.96 0.9 0.84 0.7 0.67 0.67 0.68 0.64 0.64 0.63 0.59 0.55 Random graphs 27

Recommend


More recommend