流程图绘制与平方连接
Flowchart Draw with squared connections
我尝试在提供的link 上绘制一个图表,从"act" 到流程图开头的决策菱形向上,但我失败了。我想在不穿过其他块的情况下绘制一个从块到菱形的连接箭头。有人可以帮我做吗?
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}
我为隐藏节点使用了一些有趣的名字,你可能会发现一些更重要的东西..
编辑:我编辑了最后一行,所以角落不再丢失了。
我尝试在提供的link 上绘制一个图表,从"act" 到流程图开头的决策菱形向上,但我失败了。我想在不穿过其他块的情况下绘制一个从块到菱形的连接箭头。有人可以帮我做吗?
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}
我为隐藏节点使用了一些有趣的名字,你可能会发现一些更重要的东西..
编辑:我编辑了最后一行,所以角落不再丢失了。