defense/src/fig/app/tspgraspels.tex

331 lines
17 KiB
TeX

\begin{tikzpicture}
\input{src/tikz/tsp}
\tspnodes
\def\bhstep{2.6}
\def\shstep{.75}
\def\vstep{-1.5}
\def\ratioodd{.666}
\def\ratioeven{.85}
%{{{ first line "
\def\cl{1}
\begin{scope}[visible on=<1->,every path/.append style={visible on=<1->}]
\foreach \i in {0,...,\last} {
\foreach \j in {0,...,3} {
\coordinate (p-\cl-\i-\j) at ($(p\i)!\ratioodd!(0,0)+(\bhstep*\j,\vstep*\cl)$);
\node[tsp/node,minimum size=2pt] at (p-\cl-\i-\j) {};
}
}
%{{{ boxes "
\begin{scope}[on background layer]
\def\cc{0}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{1}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{2}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{3}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
%}}}
\foreach [count=\i from 0] \o in {0,9,1,8,7,6,4,2,3,5} { \coordinate (s-\cl-\i-0) at (p-\cl-\o-0); }
\foreach [count=\i from 0] \o in {4,5,3,6,8,7,1,2,0,9} { \coordinate (s-\cl-\i-1) at (p-\cl-\o-1); }
\foreach [count=\i from 0] \o in {2,1,0,9,8,7,4,3,5,6} { \coordinate (s-\cl-\i-2) at (p-\cl-\o-2); }
\foreach [count=\i from 0] \o in {8,7,6,4,5,1,9,0,2,3} { \coordinate (s-\cl-\i-3) at (p-\cl-\o-3); }
\begin{scope}[on background layer]
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-0)}] (s-\cl-0-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-1)}] (s-\cl-0-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-2)}] (s-\cl-0-2) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-3)}] (s-\cl-0-3) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
\end{scope}
%}}}
%{{{ second line "
\def\cl{2}
\begin{scope}[visible on=<2->,every path/.append style={visible on=<2->}]
\foreach \j in {0,...,3} {
\foreach \l in {0,...,2} {
\foreach \i in {0,...,\last} {
\coordinate (p-\cl-\i-\j-\l) at ($(p\i)!\ratioeven!(0,0)+(\bhstep*\j+\shstep*\l-.47,\vstep*\cl+.5)$);
\node[tsp/node,minimum size=1pt] at (p-\cl-\i-\j-\l) {};
}
% box
\begin{scope}[on background layer]
\ifthenelse{\(\j=0 \AND \l=1\) \OR \(\j=1 \AND \l=0\) \OR \(\j=2 \AND \l=2\) \OR \(\j=3 \AND \l=2\)}
{\tikzset{local/.style={only on=<3>{tsp/best,thin}}}}
{\tikzset{local/.style={}}}
\node[fit=(p-\cl-0-\j-\l)(p-\cl-1-\j-\l)(p-\cl-2-\j-\l)(p-\cl-3-\j-\l)(p-\cl-4-\j-\l)(p-\cl-5-\j-\l)(p-\cl-6-\j-\l)(p-\cl-7-\j-\l)(p-\cl-8-\j-\l)(p-\cl-9-\j-\l),
local,rectangle,rounded corners,inner sep=1pt] (sol-\cl-\j-\l) {};
\end{scope}
}
}
%{{{ first column "
\foreach [count=\i from 0] \o in {0,9,8,1,7,6,4,2,3,5} { \coordinate (s-\cl-\i-0-0) at (p-\cl-\o-0-0); }
\foreach [count=\i from 0] \o in {0,9,1,8,7,6,4,5,3,2} { \coordinate (s-\cl-\i-0-1) at (p-\cl-\o-0-1); }
\foreach [count=\i from 0] \o in {0,2,1,8,7,6,4,9,3,5} { \coordinate (s-\cl-\i-0-2) at (p-\cl-\o-0-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-0-0)}] (s-\cl-0-0-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-0-1)}] (s-\cl-0-0-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-0-2)}] (s-\cl-0-0-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
%{{{ second column "
\foreach [count=\i from 0] \o in {4,5,3,6,8,7,1,9,0,2} { \coordinate (s-\cl-\i-1-0) at (p-\cl-\o-1-0); }
\foreach [count=\i from 0] \o in {4,3,5,6,8,7,1,2,0,9} { \coordinate (s-\cl-\i-1-1) at (p-\cl-\o-1-1); }
\foreach [count=\i from 0] \o in {4,5,3,2,8,7,1,6,0,9} { \coordinate (s-\cl-\i-1-2) at (p-\cl-\o-1-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-1-0)}] (s-\cl-0-1-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-1-1)}] (s-\cl-0-1-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-1-2)}] (s-\cl-0-1-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
%{{{ third column "
\foreach [count=\i from 0] \o in {2,1,0,4,8,7,9,3,5,6} { \coordinate (s-\cl-\i-2-0) at (p-\cl-\o-2-0); }
\foreach [count=\i from 0] \o in {2,3,0,9,8,7,4,1,5,6} { \coordinate (s-\cl-\i-2-1) at (p-\cl-\o-2-1); }
\foreach [count=\i from 0] \o in {2,1,0,9,8,7,4,6,5,3} { \coordinate (s-\cl-\i-2-2) at (p-\cl-\o-2-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-2-0)}] (s-\cl-0-2-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-2-1)}] (s-\cl-0-2-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-2-2)}] (s-\cl-0-2-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
%{{{ fourth column "
\foreach [count=\i from 0] \o in {8,1,6,4,5,7,9,0,2,3} { \coordinate (s-\cl-\i-3-0) at (p-\cl-\o-3-0); }
\foreach [count=\i from 0] \o in {8,4,6,7,5,1,9,0,2,3} { \coordinate (s-\cl-\i-3-1) at (p-\cl-\o-3-1); }
\foreach [count=\i from 0] \o in {5,7,6,4,8,1,9,0,2,3} { \coordinate (s-\cl-\i-3-2) at (p-\cl-\o-3-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-3-0)}] (s-\cl-0-3-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-3-1)}] (s-\cl-0-3-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-3-2)}] (s-\cl-0-3-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
\end{scope}
%}}}
%{{{ third line "
\def\cl{3}
\begin{scope}[visible on=<4->,every path/.append style={visible on=<4->}]
\foreach \i in {0,...,\last} {
\foreach \j in {0,...,3} {
\coordinate (p-\cl-\i-\j) at ($(p\i)!\ratioodd!(0,0)+(\bhstep*\j,\vstep*\cl+.5)$);
\node[tsp/node,minimum size=2pt] at (p-\cl-\i-\j) {};
}
}
\foreach [count=\i from 0] \o in {0,9,1,8,7,6,4,5,3,2} { \coordinate (s-\cl-\i-0) at (p-\cl-\o-0); }
\foreach [count=\i from 0] \o in {4,5,3,6,8,7,1,9,0,2} { \coordinate (s-\cl-\i-1) at (p-\cl-\o-1); }
\foreach [count=\i from 0] \o in {2,1,0,9,8,7,4,6,5,3} { \coordinate (s-\cl-\i-2) at (p-\cl-\o-2); }
\foreach [count=\i from 0] \o in {5,7,6,4,8,1,9,0,2,3} { \coordinate (s-\cl-\i-3) at (p-\cl-\o-3); }
\foreach \j in {0,...,3} {
\foreach \i in {0,...,\last} {
\node[tsp/node,minimum size=2pt] at (p-\cl-\i-\j) {};
}
}
%{{{ boxes "
\begin{scope}[on background layer]
\def\cc{0}% best
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
only on=<4-7>{tsp/best},only on=<8>{tsp/localbest},rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{1}% best
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
only on=<4-7>{tsp/best},only on=<8>{tsp/localbest},rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{2}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
only on=<4-6>{tsp/best},rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{3}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
only on=<4-6>{tsp/best},rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
%}}}
\begin{scope}[on background layer]
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-0)}] (s-\cl-0-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-1)}] (s-\cl-0-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-2)}] (s-\cl-0-2) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-3)}] (s-\cl-0-3) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
\end{scope}
%}}}
%{{{ fourth line "
\def\cl{4}
\begin{scope}[visible on=<5->,every path/.append style={visible on=<5->}]
\foreach \j in {0,...,3} {
\foreach \l in {0,...,2} {
\foreach \i in {0,...,\last} {
\coordinate (p-\cl-\i-\j-\l) at ($(p\i)!\ratioeven!(0,0)+(\bhstep*\j+\shstep*\l-.47,\vstep*\cl+1)$);
\node[tsp/node,minimum size=1pt] at (p-\cl-\i-\j-\l) {};
}
% box
\begin{scope}[on background layer]
\ifthenelse{\(\j=0 \AND \l=2\) \OR \(\j=1 \AND \l=0\) \OR \(\j=2 \AND \l=1\) \OR \(\j=3 \AND \l=0\)}
{\tikzset{local/.style={only on=<6>{tsp/best,thin}}}}
{\tikzset{local/.style={}}}
\node[fit=(p-\cl-0-\j-\l)(p-\cl-1-\j-\l)(p-\cl-2-\j-\l)(p-\cl-3-\j-\l)(p-\cl-4-\j-\l)(p-\cl-5-\j-\l)(p-\cl-6-\j-\l)(p-\cl-7-\j-\l)(p-\cl-8-\j-\l)(p-\cl-9-\j-\l),
local,rectangle,rounded corners,inner sep=1pt] (sol-\cl-\j-\l) {};
\end{scope}
}
}
%{{{ first column "
\foreach [count=\i from 0] \o in {0,1,9,8,7,6,4,5,3,2} { \coordinate (s-\cl-\i-0-0) at (p-\cl-\o-0-0); }
\foreach [count=\i from 0] \o in {0,9,3,8,7,6,4,5,1,2} { \coordinate (s-\cl-\i-0-1) at (p-\cl-\o-0-1); }
\foreach [count=\i from 0] \o in {0,9,1,8,7,6,5,4,3,2} { \coordinate (s-\cl-\i-0-2) at (p-\cl-\o-0-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-0-0)}] (s-\cl-0-0-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-0-1)}] (s-\cl-0-0-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-0-2)}] (s-\cl-0-0-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
%{{{ second column "
\foreach [count=\i from 0] \o in {5,4,3,6,8,7,1,9,0,2} { \coordinate (s-\cl-\i-1-0) at (p-\cl-\o-1-0); }
\foreach [count=\i from 0] \o in {8,5,3,6,4,7,1,9,0,2} { \coordinate (s-\cl-\i-1-1) at (p-\cl-\o-1-1); }
\foreach [count=\i from 0] \o in {7,5,3,6,8,4,1,9,0,2} { \coordinate (s-\cl-\i-1-2) at (p-\cl-\o-1-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-1-0)}] (s-\cl-0-1-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-1-1)}] (s-\cl-0-1-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-1-2)}] (s-\cl-0-1-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
%{{{ third column "
\foreach [count=\i from 0] \o in {2,8,0,9,1,7,4,6,5,3} { \coordinate (s-\cl-\i-2-0) at (p-\cl-\o-2-0); }
\foreach [count=\i from 0] \o in {2,1,0,9,8,7,6,4,5,3} { \coordinate (s-\cl-\i-2-1) at (p-\cl-\o-2-1); }
\foreach [count=\i from 0] \o in {2,1,0,5,8,7,4,6,9,3} { \coordinate (s-\cl-\i-2-2) at (p-\cl-\o-2-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-2-0)}] (s-\cl-0-2-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-2-1)}] (s-\cl-0-2-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-2-2)}] (s-\cl-0-2-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
%{{{ fourth column "
\foreach [count=\i from 0] \o in {5,6,7,4,8,1,9,0,2,3} { \coordinate (s-\cl-\i-3-0) at (p-\cl-\o-3-0); }
\foreach [count=\i from 0] \o in {5,7,6,4,8,1,3,0,2,9} { \coordinate (s-\cl-\i-3-1) at (p-\cl-\o-3-1); }
\foreach [count=\i from 0] \o in {5,7,6,4,2,1,9,0,8,3} { \coordinate (s-\cl-\i-3-2) at (p-\cl-\o-3-2); }
\begin{scope}[on background layer]
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-3-0)}] (s-\cl-0-3-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-3-1)}] (s-\cl-0-3-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,very thin,foreach/.style={insert path=--(s-\cl-#1-3-2)}] (s-\cl-0-3-2) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
%}}}
\end{scope}
%}}}
%{{{ fifth line "
\def\cl{5}
\begin{scope}[visible on=<7->,every path/.append style={visible on=<7->}]
\foreach \i in {0,...,\last} {
\foreach \j in {0,...,3} {
\coordinate (p-\cl-\i-\j) at ($(p\i)!\ratioodd!(0,0)+(\bhstep*\j,\vstep*\cl+1)$);
\node[tsp/node,minimum size=2pt] at (p-\cl-\i-\j) {};
}
}
\foreach [count=\i from 0] \o in {0,9,1,8,7,6,5,4,3,2} { \coordinate (s-\cl-\i-0) at (p-\cl-\o-0); }
\foreach [count=\i from 0] \o in {5,4,3,6,8,7,1,9,0,2} { \coordinate (s-\cl-\i-1) at (p-\cl-\o-1); }
\foreach [count=\i from 0] \o in {2,1,0,9,8,7,6,4,5,3} { \coordinate (s-\cl-\i-2) at (p-\cl-\o-2); }
\foreach [count=\i from 0] \o in {5,6,7,4,8,1,9,0,2,3} { \coordinate (s-\cl-\i-3) at (p-\cl-\o-3); }
\foreach \j in {0,...,3} {
\foreach \i in {0,...,\last} {
\node[tsp/node,minimum size=2pt] at (p-\cl-\i-\j) {};
}
}
%{{{ boxes "
\begin{scope}[on background layer]
\def\cc{0}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{1}
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{2}% best all
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
only on=<7-8>{tsp/best},rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
\begin{scope}[on background layer]
\def\cc{3}% best
\node[fit=(p-\cl-0-\cc)(p-\cl-1-\cc)(p-\cl-2-\cc)(p-\cl-3-\cc)(p-\cl-4-\cc)(p-\cl-5-\cc)(p-\cl-6-\cc)(p-\cl-7-\cc)(p-\cl-8-\cc)(p-\cl-9-\cc),
only on=<7>{tsp/best},only on=<8>{tsp/localbest},rectangle,rounded corners] (sol-\cl-\cc) {};
\end{scope}
%}}}
\begin{scope}[on background layer]
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-0)}] (s-\cl-0-0) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-1)}] (s-\cl-0-1) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-2)}] (s-\cl-0-2) [foreach/.list={1,...,\last}] -- cycle;
\draw[tsp/edge,semithick,foreach/.style={insert path=--(s-\cl-#1-3)}] (s-\cl-0-3) [foreach/.list={1,...,\last}] -- cycle;
\end{scope}
\end{scope}
%}}}
%{{{ links "
\foreach \cl/\nl/\vi in {1/2/2,3/4/5} {
\foreach \j in {0,...,3} {
\foreach \l in {0,...,2} {
\draw[<-,>=stealth,visible on=<\vi->] (sol-\nl-\j-\l) -- (sol-\cl-\j);
}
}
}
\foreach \cl/\nl/\vi in {2/3/4,4/5/7} {
\foreach \j in {0,...,3} {
\foreach \l in {0,...,2} {
\draw[->,>=stealth,visible on=<\vi->] (sol-\cl-\j-\l) -- (sol-\nl-\j);
}
}
}
%}}}
%{{{
\begin{scope}[on background layer]
\foreach \i in {0,...,3} {
\node[fit=(sol-1-\i)(sol-2-\i-0)(sol-2-\i-1)(sol-2-\i-2)(sol-5-\i),
draw,rectangle,rounded corners,dashed,thin,inner sep=2pt,visible on=<9->] (els-\i) {};
\node[node distance=.5pt,above=of els-\i,visible on=<9->] (els-\i-label) {\scriptsize ELS};
}
\node[fit=(els-0-label)(els-1-label)(els-2-label)(els-3-label),fill=green!70!black,rectangle,rounded
corners,opacity=.1,fit margins={top=.25pt,bottom=.25pt,left=11pt,right=11pt},visible on=<9->] {};
\foreach \i in {0,...,3} {
\foreach \cl in {2,4} {
\node[fit=(sol-\cl-\i-0)(sol-\cl-\i-1)(sol-\cl-\i-2),fill=green!70!black,rectangle,rounded
corners,opacity=.1,inner sep=2pt,visible on=<9->] {};
}
}
\end{scope}
%}}}
\only<10>{
}
\end{tikzpicture}