Gunnar

mikronova/funnel-core

.nornir/assets/plandag-slack.svg

<svg viewBox="0 0 580 170" width="580" height="170" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Plan-DAG slack: the critical set i-001, n-002, n-003, n-004 (zero slack, red) forms the longest lineage; n-001 is off it with slack 2 (amber)">
  <defs>
    <marker id="arrows" 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="#c0392b"/>
    </marker>
    <marker id="arrowsm" 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>
  </defs>
  <!-- critical lineage edges (red): mother -> n-002 -> n-003 -> n-004 -->
  <g stroke="#c0392b" stroke-width="1.6" fill="none">
    <line x1="112" y1="72" x2="146" y2="100" marker-end="url(#arrows)"/>
    <line x1="250" y1="103" x2="286" y2="83" marker-end="url(#arrows)"/>
    <line x1="390" y1="80" x2="426" y2="80" marker-end="url(#arrows)"/>
  </g>
  <!-- off-critical edge (dimmed): mother -> n-001 (the slack branch) -->
  <line x1="112" y1="72" x2="146" y2="43" stroke="#b8b8c4" stroke-width="1.1" fill="none" marker-end="url(#arrowsm)"/>

  <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="13" text-anchor="middle">
    <!-- critical set: red border -->
    <rect x="12" y="65" width="100" height="30" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.3"/>
    <text x="62" y="85" fill="#000000">i-001</text>
    <rect x="150" y="88" width="96" height="30" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.3"/>
    <text x="198" y="108" fill="#000000">n-002</text>
    <rect x="290" y="65" width="100" height="30" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.3"/>
    <text x="340" y="85" fill="#000000">n-003</text>
    <rect x="430" y="65" width="100" height="30" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.3"/>
    <text x="480" y="85" fill="#000000">n-004</text>
    <!-- the one node with float: amber -->
    <rect x="150" y="28" width="96" height="30" rx="6" fill="#fbf3e0" stroke="#d9a441" stroke-width="1.2"/>
    <text x="198" y="48" fill="#000000">n-001</text>
    <text x="198" y="18" fill="#b6862d" font-size="10">slack 2</text>
  </g>

  <!-- legend -->
  <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="10">
    <rect x="150" y="132" width="12" height="10" rx="2" fill="#fdece9" stroke="#c0392b" stroke-width="1.1"/>
    <text x="167" y="141" fill="#6b6b80">critical_nodes() — slack 0</text>
    <rect x="330" y="132" width="12" height="10" rx="2" fill="#fbf3e0" stroke="#d9a441" stroke-width="1.1"/>
    <text x="347" y="141" fill="#6b6b80">has float (slack &gt; 0)</text>
  </g>
  <text x="290" y="164" font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#c0392b" text-anchor="middle">slack(n) = D &#8722; earliest(n) &#8722; longest-from(n); zero slack ⇒ on a longest path ⇒ critical</text>
</svg>