Gunnar

mikronova/funnel-core

.nornir/assets/plandag-layers.svg

<svg viewBox="0 0 580 170" width="580" height="170" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Layered Plan-DAG layout: column 0 i-001, column 1 stacks n-001 and n-002 (peak width 2), column 2 n-003, column 3 n-004; four layers, peak width 2">
  <defs>
    <marker id="arrowl" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#b8b8c4"/>
    </marker>
    <marker id="arrowld" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#3c3c50"/>
    </marker>
  </defs>
  <!-- widest column band: layer 1 (peak width 2) -->
  <rect x="146" y="14" width="104" height="118" rx="8" fill="#eef3ff" stroke="#5b7cc4" stroke-width="0.8" stroke-dasharray="4 3"/>
  <text x="198" y="146" font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#5b7cc4" text-anchor="middle">width 2</text>

  <!-- mother edges (dimmed): i-001 -> each task -->
  <g stroke="#b8b8c4" stroke-width="1.1" fill="none">
    <line x1="112" y1="80" x2="146" y2="43" marker-end="url(#arrowl)"/>
    <line x1="112" y1="80" x2="146" y2="103" marker-end="url(#arrowl)"/>
  </g>
  <!-- dep chain (solid): n-002 -> n-003 -> n-004 -->
  <g stroke="#3c3c50" stroke-width="1.5" fill="none">
    <line x1="250" y1="103" x2="286" y2="83" marker-end="url(#arrowld)"/>
    <line x1="390" y1="80" x2="426" y2="80" marker-end="url(#arrowld)"/>
  </g>

  <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="13" text-anchor="middle">
    <!-- layer 0 -->
    <rect x="12" y="65" width="100" height="30" rx="6" fill="#f2f2f5" stroke="#8a8a99" stroke-width="1"/>
    <text x="62" y="85" fill="#000000">i-001</text>
    <!-- layer 1 (the widest column, two nodes) -->
    <rect x="150" y="28" width="96" height="30" rx="6" fill="#e9eefb" stroke="#5b7cc4" stroke-width="1.2"/>
    <text x="198" y="48" fill="#000000">n-001</text>
    <rect x="150" y="88" width="96" height="30" rx="6" fill="#e9eefb" stroke="#5b7cc4" stroke-width="1.2"/>
    <text x="198" y="108" fill="#000000">n-002</text>
    <!-- layer 2 -->
    <rect x="290" y="65" width="100" height="30" rx="6" fill="#f2f2f5" stroke="#8a8a99" stroke-width="1"/>
    <text x="340" y="85" fill="#000000">n-003</text>
    <!-- layer 3 -->
    <rect x="430" y="65" width="100" height="30" rx="6" fill="#f2f2f5" stroke="#8a8a99" stroke-width="1"/>
    <text x="480" y="85" fill="#000000">n-004</text>
  </g>

  <!-- column labels -->
  <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#8a8a99" text-anchor="middle">
    <text x="62" y="18">layer 0</text>
    <text x="198" y="18" fill="#5b7cc4">layer 1</text>
    <text x="340" y="18">layer 2</text>
    <text x="480" y="18">layer 3</text>
  </g>
  <text x="290" y="164" font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#3c3c50" text-anchor="middle">layers() — depth = column, deps to the left; height 4 = critical_path_len + 1, peak width() = 2</text>
</svg>