流程图绘制(复杂箭头)

流程图绘制(复杂箭头)

我能做的最好的

主要问题是,我不知道如何绘制其余的箭头,尤其是右下角.我把能画的都画了。

\documentclass[a4paper]{article}

\usepackage[top=1cm,bottom=1cm,left=1cm,landscape]{geometry}

\usepackage{tikz}
\usetikzlibrary{arrows,arrows.meta}
%\input{arrowsnew}

\begin{document}


\tikzstyle{mbigblock} = [rectangle, draw, text width=13cm, text centered, rounded corners, minimum height=1em]
\tikzstyle{block}  = [rectangle, draw, text width=3.5cm, text centered, minimum height=1em]
\tikzstyle{lblock} = [rectangle, draw, text width=5cm, text centered, minimum height=1em]
\tikzstyle{rblock} = [rectangle, draw, text width=3.5cm, text centered, minimum height=1em]

\begin{tikzpicture}[node distance=2cm]

% middle boxes
\node (m1) [mbigblock] {Choose an exhaustive summary, $\kappa$, with $p$ parameters $\theta$};
\node (m2) [mbigblock,below of=m1,node distance=1cm] {Find the rank, $r$, of the derivative matrix $D=\partial \kappa / \partial \theta$};
\node (m3)  [block,below of=m2] {Model is full rank and at least locally identifiable (Th2 a. i.)};
\node (m4)  [block,below of=m3] {Does the model extend?};
\node (m5)  [block,below of=m4] {Can the extension theorem be used?};
\node (m6)  [block,below of=m5] {If $D_{ex}$ is full rank, the model is full rank in general (Th3)};
\node (m7)  [block,below of=m6,text width=2cm] {Is $r_s \geq p$?};
\node (m8l) [block,below left  of=m7,node distance=2.5cm,text width=3cm] {Model is full rank and at least locally identifiable (Th 8b).};
\node (m8r) [block,below right of=m7,node distance=2.5cm,text width=3cm] {Model is parameter redundant and non--identifiable (Th 8b).};
\node (m9)  [block,below of=m7,node distance=3.5cm,text width=2cm] {Is $r_s = p$?};
\node (m10l) [block,below left  of=m9,node distance=2.5cm,text width=3cm] {Solve PDE to find a reduced--form exhaustive summary};
\node (m10r) [block,below right of=m9,node distance=2.5cm,text width=3cm] {$s$ is a reduced--form exhaustive summary};

% left boxes
\node (l1) [lblock,left  of=m3,node distance=8cm] {Model is parameter redundant and not identifiable. There are $r$ estimable parameters. (Th2a.ii)};
\node (l2) [lblock,below of=l1,node distance=3cm] {Solve $\alpha^T D=0$ and PDE(9) to find the set of estimable parameters, $\beta$(Th2b). Let $\theta=\beta$ and find the new $D$. What follows applies to the new set of parameters, from this results for the original $\theta$ can be deduced.};
\node (l3) [lblock,below of=l2,node distance=5cm] {Write $D=PLUR$. Does Det$(U)=0$ have any solutions (for which $R$ is defined)(Th4)? If appropriate write $D_{ex}=P_{ex}L_{ex}U_{ex}R_{ex}$. Does Det$(U_{ex})=0$ have any solutions (Th6)};
\node (l4l) [block,below left  of=l3,node distance=4cm,text width=6em] {Conditionally Full Rank};
\node (l4r) [block,below right of=l3,node distance=4cm,text width=6em] {Essentially Full Rank};
\node (l5l) [block,below of=l4l,text width=6em] {Determine parameter redundant submodels if appropriate.};
\node (l5r) [block,below of=l4r,text width=6em,minimum height=6em] {Test for global identifiability};




% right boxes
\node (r1) [block,right of=m3,node distance=8cm] {Choose a reparameterisation $s$ of length $p_s$};
\node (r2) [block,below of=r1,node distance=4cm] {Rewrite $\kappa$ in terms of $s$. Find the rank $r_s$, of the derivative matrix $D_s=\partial \kappa(s)/\partial s$};
\node (r3) [block,below of=r2,node distance=3cm] {Is rank$(\partial s / \partial \theta)=p_s$ ?};
\node (r4) [block,right of=m9,node distance=8cm,text width=2cm] {Is $r_s=p_s$};
\node (r5l) [block,below left  of=r4,node distance=2.5cm,text width=3cm] {Solve PDE to find an exhaustive summary};
\node (r5r) [block,below right of=r4,node distance=2.5cm,text width=3cm] {$s$ is an exhaustive summary (remark 6)};

% Middle flows
\draw[->] (m1) -- (m2) ;
\draw[->] (m2) -- node[left] {$r=p$} (m3) ;
\draw[->] (m3) -- (m4) ;
\draw[->] (m4) -- node[left] {Yes} (m5) ;
\draw[->] (m5) -- node[left] {Yes} (m6) ;

\draw[->] (m7) -| node[left]  {Yes} (m8l);
\draw[->] (m7) -| node[right] {No } (m8r);

\draw[->] (m9) -| node[left]  {No}  (m10l);
\draw[->] (m9) -| node[right] {Yes} (m10r);


% Right flows
\draw[->] (r1) -- (r2) ;
\draw[->] (r2) -- (r3) ;
\draw[->] (r3) -- (r4) ;
\draw[->] (r4) -| node[left]  {No}  (r5l);
\draw[->] (r4) -| node[right] {Yes} (r5r);

% Left flows
\draw[->] (l1) -- (l2) ;

%\draw[->] (l3) |-| node[left]  {Yes} (l4l);
%\draw[->] (l3) |-| node[right] {No } (l4r);

\draw[->] (l4l) -- (l5l) ;
\draw[->] (l4r) -- (l5r) ;


% Middle to left
% \draw[->] (m4.west) -| (l3.east) ;


% Middle to right

% Right to middle
\draw[->] (r3.west) -| (m7.north) ;

\end{tikzpicture}

\end{document}

这是我所能画的极限。我不知道如何放置“之字形”箭头。我不知道如何将两个“平行”箭头放在同一个箭头下方。

有人可以帮我完成流程图吗?

谢谢!我的流程图

答案1

绘制外线的一种方法是定义中间坐标:

\coordinate (Above m1) at ($(m1.north)+(0,1.0cm)$);
\coordinate (Below r5l) at ($(r5l.south) + (0,-1.0cm)$);
\draw[ultra thick, blue, ->]  
    (r5l.south) -- (Below r5l)
    -- ++ (7.5cm,0)
    |- (Above m1)
    -- (m1.north)
    ;

对于“之字形”:

\draw [ultra thick, orange, ->]
    (m4.west) --
    ++(-2.0cm,0) |-
    (l3.east)
    ;
\draw [ultra thick, orange, ->] (m6.west) -- ++(-2.0cm,0);

在此处输入图片描述

使用类似的技术您应该能够绘制其余的箭头。

笔记:

  • ++(x,y)语法表示位于当前位置的坐标,应用了平移(x,y)。所以++(-2.0cm,0)表示指向2.0cm左边。
  • A\coordinate为特定点定义一个名称。因此,\coordinate (Above m1) at ($(m1.north)+(0,1.0cm)$)定义一个名为 的坐标,它对应于和(Above m1)的向量加法。因此在的点上方。(m1.north)(0,1.0cm)1.0cmnorthm1

代码:

\documentclass[a4paper]{article}

\usepackage[top=1cm,bottom=1cm,left=1cm,landscape]{geometry}

\usepackage{tikz}
\usetikzlibrary{calc}
%\usetikzlibrary{arrows,arrows.meta}
%\input{arrowsnew}

\begin{document}


\tikzstyle{mbigblock} = [rectangle, draw, text width=13cm, text centered, rounded corners, minimum height=1em]
\tikzstyle{block}  = [rectangle, draw, text width=3.5cm, text centered, minimum height=1em]
\tikzstyle{lblock} = [rectangle, draw, text width=5cm, text centered, minimum height=1em]
\tikzstyle{rblock} = [rectangle, draw, text width=3.5cm, text centered, minimum height=1em]

\begin{tikzpicture}[node distance=2cm,scale=0.8]

% middle boxes
\node (m1) [mbigblock] {Choose an exhaustive summary, $\kappa$, with $p$ parameters $\theta$};
\node (m2) [mbigblock,below of=m1,node distance=1cm] {Find the rank, $r$, of the derivative matrix $D=\partial \kappa / \partial \theta$};
\node (m3)  [block,below of=m2] {Model is full rank and at least locally identifiable (Th2 a. i.)};
\node (m4)  [block,below of=m3] {Does the model extend?};
\node (m5)  [block,below of=m4] {Can the extension theorem be used?};
\node (m6)  [block,below of=m5] {If $D_{ex}$ is full rank, the model is full rank in general (Th3)};
\node (m7)  [block,below of=m6,text width=2cm] {Is $r_s \geq p$?};
\node (m8l) [block,below left  of=m7,node distance=2.5cm,text width=3cm] {Model is full rank and at least locally identifiable (Th 8b).};
\node (m8r) [block,below right of=m7,node distance=2.5cm,text width=3cm] {Model is parameter redundant and non--identifiable (Th 8b).};
\node (m9)  [block,below of=m7,node distance=3.5cm,text width=2cm] {Is $r_s = p$?};
\node (m10l) [block,below left  of=m9,node distance=2.5cm,text width=3cm] {Solve PDE to find a reduced--form exhaustive summary};
\node (m10r) [block,below right of=m9,node distance=2.5cm,text width=3cm] {$s$ is a reduced--form exhaustive summary};

% left boxes
\node (l1) [lblock,left  of=m3,node distance=8cm] {Model is parameter redundant and not identifiable. There are $r$ estimable parameters. (Th2a.ii)};
\node (l2) [lblock,below of=l1,node distance=3cm] {Solve $\alpha^T D=0$ and PDE(9) to find the set of estimable parameters, $\beta$(Th2b). Let $\theta=\beta$ and find the new $D$. What follows applies to the new set of parameters, from this results for the original $\theta$ can be deduced.};
\node (l3) [lblock,below of=l2,node distance=5cm] {Write $D=PLUR$. Does Det$(U)=0$ have any solutions (for which $R$ is defined)(Th4)? If appropriate write $D_{ex}=P_{ex}L_{ex}U_{ex}R_{ex}$. Does Det$(U_{ex})=0$ have any solutions (Th6)};
\node (l4l) [block,below left  of=l3,node distance=4cm,text width=6em] {Conditionally Full Rank};
\node (l4r) [block,below right of=l3,node distance=4cm,text width=6em] {Essentially Full Rank};
\node (l5l) [block,below of=l4l,text width=6em] {Determine parameter redundant submodels if appropriate.};
\node (l5r) [block,below of=l4r,text width=6em,minimum height=6em] {Test for global identifiability};




% right boxes
\node (r1) [block,right of=m3,node distance=8cm] {Choose a reparameterisation $s$ of length $p_s$};
\node (r2) [block,below of=r1,node distance=4cm] {Rewrite $\kappa$ in terms of $s$. Find the rank $r_s$, of the derivative matrix $D_s=\partial \kappa(s)/\partial s$};
\node (r3) [block,below of=r2,node distance=3cm] {Is rank$(\partial s / \partial \theta)=p_s$ ?};
\node (r4) [block,right of=m9,node distance=8cm,text width=2cm] {Is $r_s=p_s$};
\node (r5l) [block,below left  of=r4,node distance=2.5cm,text width=3cm] {Solve PDE to find an exhaustive summary};
\node (r5r) [block,below right of=r4,node distance=2.5cm,text width=3cm] {$s$ is an exhaustive summary (remark 6)};

\draw[ultra thick, red ]  (r5r.south) -- ++ (0,-1.0cm);

% Middle flows
\draw[->] (m1) -- (m2) ;
\draw[->] (m2) -- node[left] {$r=p$} (m3) ;
\draw[->] (m3) -- (m4) ;
\draw[->] (m4) -- node[left] {Yes} (m5) ;
\draw[->] (m5) -- node[left] {Yes} (m6) ;

\draw[->] (m7) -| node[left]  {Yes} (m8l);
\draw[->] (m7) -| node[right] {No } (m8r);

\draw[->] (m9) -| node[left]  {No}  (m10l);
\draw[->] (m9) -| node[right] {Yes} (m10r);


% Right flows
\draw[->] (r1) -- (r2) ;
\draw[->] (r2) -- (r3) ;
\draw[->] (r3) -- (r4) ;
\draw[->] (r4) -| node[left]  {No}  (r5l);
\draw[->] (r4) -| node[right] {Yes} (r5r);

% Left flows
\draw[->] (l1) -- (l2) ;

%\draw[->] (l3) |-| node[left]  {Yes} (l4l);
%\draw[->] (l3) |-| node[right] {No } (l4r);

\draw[->] (l4l) -- (l5l) ;
\draw[->] (l4r) -- (l5r) ;


% Middle to left
% \draw[->] (m4.west) -| (l3.east) ;


% Middle to right

% Right to middle
\draw[->] (r3.west) -| (m7.north) ;

%% Draw the outer lines
\coordinate (Above m1) at ($(m1.north)+(0,1.0cm)$);
\coordinate (Below r5l) at ($(r5l.south) + (0,-1.0cm)$);
\draw[ultra thick, blue, ->]  
    (r5l.south) -- (Below r5l)
    -- ++ (7.5cm,0)
    |- (Above m1)
    -- (m1.north)
    ;
    
\draw [ultra thick, orange, ->]
    (m4.west) --
    ++(-2.0cm,0) |-
    (l3.east)
    ;
\draw [ultra thick, orange, ->] (m6.west) -- ++(-2.0cm,0);

\end{tikzpicture}

\end{document}

答案2

通过有用的链接和彼得的例子,我终于完成了图表!

\documentclass[a4paper]{article}

\usepackage[top=1cm,bottom=1cm,left=1cm,landscape]{geometry}

\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\pagestyle{empty}

\tikzstyle{mbigblock} = [rectangle, draw, text width=13cm, text centered, rounded corners, minimum height=1em]
\tikzstyle{block}  = [rectangle, draw, text width=3.5cm, text centered, minimum height=1em]
\tikzstyle{lblock} = [rectangle, draw, text width=5cm, text centered, minimum height=1em]
\tikzstyle{rblock} = [rectangle, draw, text width=3.5cm, text centered, minimum height=1em]

\begin{tikzpicture}[node distance=2cm]

% middle boxes
\node (m1) [mbigblock] {Choose an exhaustive summary, $\kappa$, with $p$ parameters $\theta$};
\node (m2) [mbigblock,below of=m1,node distance=1cm] {Find the rank, $r$, of the derivative matrix $D=\partial \kappa / \partial \theta$};
\node (m3)  [block,below of=m2] {Model is full rank and at least locally identifiable (Th2 a. i.)};
\node (m4)  [block,below of=m3] {Does the model extend?};
\node (m5)  [block,below of=m4] {Can the extension theorem be used?};
\node (m6)  [block,below of=m5] {If $D_{ex}$ is full rank, the model is full rank in general (Th3)};
\node (m7)  [block,below of=m6,text width=2cm] {Is $r_s \geq p$?};
\node (m8l) [block,below left  of=m7,node distance=2.5cm,text width=3cm] {Model is full rank and at least locally identifiable (Th 8b).};
\node (m8r) [block,below right of=m7,node distance=2.5cm,text width=3cm] {Model is parameter redundant and non--identifiable (Th 8b).};
\node (m9)  [block,below of=m7,node distance=3.5cm,text width=2cm] {Is $r_s = p$?};
\node (m10l) [block,below left  of=m9,node distance=2.5cm,text width=3cm] {Solve PDE to find a reduced--form exhaustive summary};
\node (m10r) [block,below right of=m9,node distance=2.5cm,text width=3cm] {$s$ is a reduced--form exhaustive summary};

% left boxes
\node (l1) [lblock,left  of=m3,node distance=8cm] {Model is parameter redundant and not identifiable. There are $r$ estimable parameters. (Th2a.ii)};
\node (l2) [lblock,below of=l1,node distance=3cm] {Solve $\alpha^T D=0$ and PDE(9) to find the set of estimable parameters, $\beta$(Th2b). Let $\theta=\beta$ and find the new $D$. What follows applies to the new set of parameters, from this results for the original $\theta$ can be deduced.};
\node (l3) [lblock,below of=l2,node distance=5cm] {Write $D=PLUR$. Does Det$(U)=0$ have any solutions (for which $R$ is defined)(Th4)? If appropriate write $D_{ex}=P_{ex}L_{ex}U_{ex}R_{ex}$. Does Det$(U_{ex})=0$ have any solutions (Th6)};
\node (l4l) [block,below left  of=l3,node distance=4cm,text width=6em] {Conditionally Full Rank};
\node (l4r) [block,below right of=l3,node distance=4cm,text width=6em] {Essentially Full Rank};
\node (l5l) [block,below of=l4l,text width=6em] {Determine parameter redundant submodels if appropriate.};
\node (l5r) [block,below of=l4r,text width=6em,minimum height=6em] {Test for global identifiability};




% right boxes
\node (r1) [block,right of=m3,node distance=8cm] {Choose a reparameterisation $s$ of length $p_s$};
\node (r2) [block,below of=r1,node distance=4cm] {Rewrite $\kappa$ in terms of $s$. Find the rank $r_s$, of the derivative matrix $D_s=\partial \kappa(s)/\partial s$};
\node (r3) [block,below of=r2,node distance=3cm] {Is rank$(\partial s / \partial \theta)=p_s$ ?};
\node (r4) [block,right of=m9,node distance=8cm,text width=2cm] {Is $r_s=p_s$};
\node (r5l) [block,below left  of=r4,node distance=2.5cm,text width=3cm] {Solve PDE to find an exhaustive summary};
\node (r5r) [block,below right of=r4,node distance=2.5cm,text width=3cm] {$s$ is an exhaustive summary (remark 6)};

% Middle flows
\draw[thick,->] (m1) -- (m2) ;
\draw[thick,->] (m2) -- node[left] {$r=p$} (m3) ;
\draw[thick,->] (m3) -- (m4) ;
\draw[thick,->] (m4) -- node[left] {Yes} (m5) ;
\draw[thick,->] (m5) -- node[left] {Yes} (m6) ;

\draw[thick,->] (m7) -| node[left]  {Yes} (m8l);
\draw[thick,->] (m7) -| node[right] {No } (m8r);

\draw[thick,->] (m8l.south) -- ++(0,-0.3cm) -| (m9);
\draw[thick,->] (m8r.south) -- ++(0,-0.3cm) -| (m9);

\draw[thick,->] (m9) -| node[left]  {No}  (m10l);
\draw[thick,->] (m9) -| node[right] {Yes} (m10r);


% Right flows
\draw[thick,->] (r1) -- (r2) ;
\draw[thick,->] (r2) -- (r3) ;
\draw[thick,->] (r3) -- (r4) ;
\draw[thick,->] (r4) -| node[left]  {No}  (r5l);
\draw[thick,->] (r4) -| node[right] {Yes} (r5r);


% Left flows
\draw[thick,->] (l1) -- (l2) ;

\draw[thick,->] (l3.south) - ++ (0,-0.4cm) -| node[left]  {Yes} (l4l);
\draw[thick,->] (l3.south) - ++ (0,-0.4cm) -| node[right] {No } (l4r);

\draw[thick,->] (l4l) -- (l5l) ;
\draw[thick,->] (l4r) -- (l5r) ;


% Middle to left
\draw[thick,->] (m2.west) -| node[left] {$r<p$} (l1.north) ;
\draw[thick, orange, ->]
    (m4.west) --
    ++(-2.0cm,0) |-
    (l3.east)
    ;
\draw[thick, orange, ->] (m6.west) -- ++(-2.0cm,0);


% Middle to right
\draw[thick,->] (m2.east) -| node[above] {Cannot find rank} (r1.north) ;


% Left to middle
%\coordinate (l2tom3) at ($(m3.south)+(0,-0.3cm)$);
\draw[thick,->]
    (l2.east) 
    -- ++(0.5cm,0) 
    |- ($(m3.south)+(0,-0.5cm)$) %(l2tom3)
    ;

% Right to middle
\draw[thick,->] (r3.west) -| (m7.north) ;


%% Draw the outer lines
%\coordinate (Above m1) at ($(m1.north)+(0,1.0cm)$);

\draw[thick, red]  (m10r.south) -- ++ (0,-0.5cm);
\draw[thick, red]  (r5l.south) -- ++ (0,-0.5cm);
\draw[thick, red]  (r5r.south) -- ++ (0,-0.5cm);

\draw[thick, blue, ->]  
    (m10l.south) 
    -- ++ (0,-0.5cm)
    -- ++ (13.5cm,0)
    |- ($(m1.north)+(0,0.5cm)$)
    -- (m1.north)
    ;


\end{tikzpicture}

\end{document}

最终数字

相关内容