0

I need help to draw this in Latex. All the connected arrows are meant to be singular arrows. Apologies to be bad writing but I also need these additional arrows and numbers.

I am not sure how to do this so any help would be greatly appreciated. Thank you!

System of machines

  • 5
    Welcome to TeX.SE! This site is full of similar examples. Just use one as a starting point and see how far you get. If you get stuck, you will have a nice basis for a question that will very quickly be answered. –  Jan 29 '19 at 17:57
  • 4
    maybe some starting point: https://tex.stackexchange.com/questions/233191/simple-tikz-diagram-help-needed-with-several-issues https://tex.stackexchange.com/questions/209355/drawing-a-block-diagram-using-tikz https://tex.stackexchange.com/questions/205591/how-to-create-simple-data-diagram – samcarter_is_at_topanswers.xyz Jan 29 '19 at 18:00
  • 3

1 Answers1

3

I will be happy to remove this if you feel that this is not an adequate start. You may use this to ask a new question. Yet I will be reluctant to address additional requests here.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{positioning,quotes}
\begin{document}
\begin{tikzpicture}[box/.style={draw,minimum width=1cm,minimum height=8mm},font=\sffamily]
 \begin{scope}[every node/.style={box}]
  \node (1){1};
  \node[right=1cm of 1] (5){5};
  \node[below=3mm of 5] (6){6};
  \node[above=11mm of 5] (2){2};
  \node[above=2mm of 2,xshift=8mm] (4){4};
  \node[right=1cm of 2] (3){3};
  \node[right=2.5cm of 5] (7){7};
  \node[right=1cm of 7] (8){8};
  \node[above=2mm of 8] (9){9};
  \node[below=2mm of 8] (10){10};
 \end{scope}
 \begin{scope}[every edge/.append style={-latex},auto,
  hv/.style={to path={-| (\tikztotarget) \tikztonodes}},
  vh/.style={to path={|- (\tikztotarget) \tikztonodes}},
  hvh/.style args={#1/#2/#3}{to path={-| ([xshift=#1]\tikztotarget)
  node[pos=0.75,#3]{#2} --(\tikztotarget) \tikztonodes}},]
  \draw (1) ++ (-1,0) edge (1) 
  (1) edge[vh] (2) (4) edge[hv] (2) (3) edge[vh,"0.4" right] (4)
  (1) edge (5) (2) edge (3) (5) edge (7) (7) edge (8) (8) edge ++ (2.2,0)
  (3) edge[hv] (7)
   (9) edge[hvh={-3mm//}] (8.160) (8.200) edge[hvh={-3mm//}] (10.180)
   (8.20) edge[hvh={7mm/0.3/}] (9.0)  (8.-20) edge[hvh={5mm/0.2/}] (10.0);
 \end{scope}
 \begin{scope}[-latex]
  \draw (1.south) -- ++ (-45:0.6) node[pos=1.35]{0.2};
  \draw (2.south) -- ++ (-135:0.6) node[pos=1.35]{0.4};
  \draw (3.south) -- ++ (-45:0.6) node[pos=1.35]{0.2};
  \draw (4.north) -- ++ (45:0.6) node[pos=1.35]{0.2};
  \draw (5.north) -- ++ (45:0.6) node[pos=1.35]{0.1};
  \draw (6.south) -- ++ (-45:0.6) node[pos=1.35]{0.2};
  \draw (7.south) -- ++ (-45:0.6) node[pos=1.35]{0.1};
  \draw (8.10) -- ++ (0.8,0) -- ++ (45:0.6) node[pos=1.35]{0.2};
  \draw (9.north) -- ++ (45:0.6) node[pos=1.35]{0.3};
  \draw (10.south) -- ++ (-45:0.6) node[pos=1.35]{0.1};
 \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

  • 1
    thank you so much! I am going to open a new question on how to assign "weights" to the lines. – Brandon Haberman Jan 30 '19 at 03:11
  • 1
    @BrandonHaberman I quickly added some. (And I fear your follow-up question may not be very well-received by everyone because some may feel you should try yourself first.) –  Jan 30 '19 at 03:37
  • Thank you for the comments. I was trying to add the weights but it was not working properly. Do you have advice on how to approach this for next time? – Brandon Haberman Jan 30 '19 at 04:01