I have tried to calculate the intersection, and add a red dot, between a curve called "mincut" and a line called "arc-67".
It doesn't work and gives an error like this: ! Package pgf Error: No shape named `intersection-1' is known.
Trying a simpler code which can be found in the documentation doesn't give any error at all. Can this be some sort of compatibility issue by loading too many Tikz packages?
\documentclass[border=5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{adjustbox}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usetikzlibrary{shapes,arrows,fit,automata}
\usetikzlibrary{arrows.meta,
calc,
positioning,
quotes
}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,
node distance = 20mm and 40mm,
semithick]
\tikzstyle{every state}=[circle, black, draw=red, very thick]
\tikzset{
basic/.style={
draw=blue,
line width=1pt,
->, % alwways draw arrow tip
>=stealth, % style of arrow tip
shorten >=2pt, % shorten a bit, so that it doesn't quite
shorten <=2pt, % touch the nodes
preaction={ % provide a wider white background for
draw=white, % each arrow for the intersection effect
line width=3pt,
-, % no arrow tip for background
}
}
}
\tikzstyle{mincut}=[dashed, green!40!black, very thick,-,line width=3pt]
\tikzstyle{inc_flow}=[basic,line width=3pt]
\tikzstyle{nobasic}=[basic,dashed]
\def\circledarrow#1#2#3{ % #1 Style, #2 Center, #3 Radius
\draw[#1,<-] (#2) +(80:#3) arc(80:-260:#3);
}
\node[state] (1-1) [ label=left:{\large $(4^-,3) $}] {1};
\node[state] (4-1) [right= of 1-1, label=above left:{\large $(2^+,3) $}] {4};
\node[state] (2-1) [above= of 4-1, label=above:{\large $(s^+,3) $}] {2};
\node[state] (3-1) [right=of 2-1, label=above:{\large $ $}] {3};
\node[state] (5-1) [below= of 3-1, label=left :{\large $ (2^+,2) $}] {5};
\node[state] (6-1) [below right=2 and 1.7 of 4-1, label=below:{\large $(4^+,2) $}] {6};
\node[state] (7-1) [right= of 5-1, label=right:{\large $ $}] {7};
\node[state] (s-1) [left=8 of 2-1, label=above:{\large $ (-,\infty) $}] {s};
\node[state] (e-1) [below= of 7-1, label=below:{\large $ $}] {e};
%%%
% grafo con costos relativos
%%%
% \foreach \inode in {s,1,2,3,4,5,6,7,e}{
% \node[state] (\inode-1) [below=8 of \inode, label=left:{\large $ $}] {\inode};
% }
\path[basic] (s-1) edge node[sloped,above] {\large $5,0,5$} (1-1);
\path[basic] (s-1) edge node[sloped,above] {\large $3,0,0$} (2-1);
\path[basic,out=30,in=150] (s-1) edge node[sloped,above] {\large $3,0,2$} (3-1);
\path[basic,out=270,in=180] (s-1) edge node[sloped,above] {\large $2,0,2$} (6-1);
\path[nobasic] (1-1) edge node[sloped,above] {\large $2,2$} (2-1);
\path[basic] (1-1) edge node[sloped,above] {\large $3,0,3$} (4-1);
\path[basic] (1-1) edge node[sloped,above] {\large $2,0,2$} (6-1);
\path[basic] (2-1) edge node[sloped,above] {\large $3,0,0$} (4-1);
\path[basic] (2-1) edge node[sloped,above, near end] {\large $ 2,0,0 $} (5-1);
\path[nobasic,name path=arc-32] (3-1) edge node[sloped,above] {\large $3,2 $} (2-1);
\path[basic] (3-1) edge node[sloped,above] {\large $3,0,2$} (7-1);
\path[nobasic,name path=arc-43] (4-1) edge node[sloped,above, near end] {\large $ 3,1 $} (3-1);
\path[basic] (4-1) edge node[sloped,above] {\large $ 2,0,0 $} (6-1);
\path[basic] (4-1) edge node[sloped,above,near start] {\large $ 3,0,3 $} (e-1);
\path[nobasic,name path=arc-57] (5-1) edge node[sloped,above] {\large $ 4,2 $} (7-1);
\path[basic] (5-1) edge node[sloped,above, near end] {\large $ 4,0,4 $} (e-1);
\path[basic] (6-1) edge node[sloped,above,near start] {\large $ 4,0,4 $} (5-1);
\path[nobasic,name path=arc-67] (6-1) edge node[sloped,above, near end] {\large $ 3,1 $} (7-1);
\path[basic] (7-1) edge node[sloped,above] {\large $ 9,0,2 $} (e-1);
\draw[mincut,name path=mincut] (12,-4) .. controls (12,0) and (8,2) .. (9,6);
% testing to draw dot at intersections
\fill[red,name intersections={of=mincut and arc-67}]
(intersection-1) circle (2pt) node {1};
\end{tikzpicture}
\end{document}
