我尝试在流程图的开头沿所提供的从“行为”到决策菱形的链接绘制图表,但失败了。我想画一个从方块到菱形的连接箭头,但不要越过其他方块。有人可以帮我做吗?
https://www.overleaf.com/1327913296kgkmkvmhqgmj
最好的问候布鲁诺
如果我了解weel,也许添加一些隐藏节点可能会有所帮助:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{csquotes}
\usetikzlibrary{shapes,arrows}
\input{config}
\begin{document}
\begin{figure}[!htp]
\centering
\begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
\node [cloud] (init) {Initialize};
\node [block, left of = init, node distance = 4cm] (estimate) {Estimate};
\node [block, below of = estimate, node distance = 3cm] (compute) {Compute};
\node [decision, below of = init] (decide_exploration) {$t \in (t_i, \, t_{i+1})$?};
\node [decision, below of = decide_exploration, node distance = 4cm] (decide_sample) {$t_s \in (t_s^0, \, t_s^0 + T_s)$?};
\node [block, right of = decide_sample, node distance = 4cm] (sample) {Sample};
\node [block, below of = decide_sample, node distance = 4cm] (control) {Act};
\node [below of = control, node distance = 2cm] (control2) {};
\node [right of = control2, node distance = 6cm] (control3) {};
\node [right of = decide_exploration, node distance = 2cm] (sample2) {};
% Draw edges
\path [line, dashed] (init) -- (estimate);
\path [line] (estimate) -- (compute);
\path [line] (compute) |- (control);
\path [line] (decide_exploration) -- node {yes} (decide_sample);
\path [line] (decide_exploration) -- node {no} (estimate);
\path [line] (decide_sample) -- node {yes} (control);
\path [line] (decide_sample) -- node {no} (sample);
\path [line] (sample) |- (control);
\path [line] (control) |-(6,-13) |-(sample2) |-(decide_exploration);
\end{tikzpicture}
\caption{Source seeking algorithm}
\label{fig:sseeking_algo}
\end{figure}
\end{document}
我为隐藏节点使用了一些有趣的名称,您可能会发现更重要的内容。
编辑:我编辑了最后一行,因此不再缺少角落。