0

I am relatively new to LaTeX and need this diagram for my Bachelor Thesis. I tried to make it using TikZ but I just managed to create the block and some input and output parameters. How do I make the rest and color it. It must not have those little circles for the control parameters. They can be replaced by other things.

Thanks!

Flow Diagram, Mobility Load Balancing

I tried to make make the input and output parameters. How do I make the arrows longer?

\coordinate[above left =of mlb.west]   (a1);
\coordinate[below = of a1]              (a2);
\coordinate[above right =of mlb.east]  (b1);
\coordinate[below = of b1]              (b2);

\foreach \i [count=\xi from 1] in {X,Y}
\draw[L]  (a\xi) node[left] {\i} -- (a\xi-| mlb.west);
\foreach \i [count=\xi from 1] in {A,B}
    \draw[L] (mlb.east |- b\xi) -- (b\xi) node[right] {\i};

enter image description here

  • 3
    Welcome to LaTeX! Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – Moriambar Apr 29 '17 at 12:44
  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. In particular, please add a minimal working example (MWE). – CarLaTeX Apr 29 '17 at 12:44
  • 4
    If you already managed to create the block etc, we don't you share this code with us, so we have something to start with? – samcarter_is_at_topanswers.xyz Apr 29 '17 at 13:06
4

Since you are beginner (at least on this site) I will show (one among possibles) starting point for drawing your image. From it is (to my opinion) straightforward to finish your image. If you will stuck in this, ask new question ...

enter image description here

\documentclass[tikz,
               border=3mm]{standalone}
\usetikzlibrary{arrows.meta, 
                backgrounds, 
                calc,chains,
                fit,
                positioning,
                }

\begin{document}
\begin{tikzpicture}[
node distance = 3mm and 2mm,
  start chain = going right,
% nodes definitions
     P/.style = {% Parameters circles
                circle, draw, fill=white,
                minimum size=5mm, inner sep=0pt, outer sep=0pt,
                node distance=0pt, node contents={}, on chain},
     F/.style = {% Fit box
                draw, dashed, inner xsep=1mm, inner ysep=0mm, yshift=2.5mm},
% lines/arrows definition
     L/.style = {-Stealth, thick}
                    ]
% parameters circles
\foreach \i in {1,...,5}{\node (n\i) [P];}
% MLB box
% it width is length from west side to east side of P nodes
\path   let \p1 = (n1.west),
            \p2 = (n5.east),
            \n1 = {veclen(\x2-\x1,\y2-\y1)} in
        node (mlb)  [minimum width=\n1, inner ysep=5mm,
                     draw, font=\Huge\bfseries,
                     below=0mm of n3] {MLB};
% control parameters
    \begin{scope}[inner ysep=1pt]
\node (n11) [above left =of n1 ]    {Max\_Load@TeNB};
\node (n12) [above      =of n11]    {xxxxxxxxxxxxxx};
\node (n13) [above=of n12.north -| n3]  {Max\_Load};
\node (n15) [above right=of n5 ]    {xxxxxxxxxxxxxx};
\node (n14) [above      =of n15]    {xxxxxxxxxxxxxx};
% parameters title
\node (n16) [above left=of n1.west |- n13,
             font=\large\bfseries]  {Control Parameter};
    \end{scope}
% frame around parameters lie on background layer
\scoped[on background layer]
    \node   [F, fit=(n1) (n16.west) (n14)] {};
% lines
\draw[L]    (n11) -| (n1);
\draw[L]    (n12) -| (n2);
\draw[L]    (n13) -- (n3);
\draw[L]    (n14) -| (n4);
\draw[L]    (n15) -| (n5);
    \end{tikzpicture}
\end{document}

Edit: Since so far no response, it seems that the step for finishing of image is to height :-)

Let consider input parameters (on the left side of MLD). texts are about 1cm left from MLD node, dashed line around is positioned slightly different than around control parameters. For this it is sensible to change node distance and some F shape's options. Considering this input options can be write as:

    \begin{scope}[node distance=0mm and 9mm,
                  F/.append style={inner ysep=1mm,yshift=-1mm}  ]
\node (n21) [above left=of mlb.west] {Cell Load};    
\node (n22) [below left=of mlb.west] {UE Measurements};
\node (n23) [below left=of mlb.west |- n22.south,
             font=\bfseries] {Input Parameters};
    \node   [F, fit=(n21.east) (n23)] {};
    \end{scope}
% coordinate (n21 -| mlb.west) is projection of n21.east on the west border of mlb node
\draw[L]    (n21) -- (n21 -| mlb.west);    
\draw[L]    (n22) -- (n22 -| mlb.west);

Considering this addition in above MWE with added colored MLB node gives:

\documentclass[tikz,
               border=3mm]{standalone}
\usetikzlibrary{arrows.meta,
                backgrounds,
                calc,chains,
                fit,
                positioning,
                }

\begin{document}
\begin{tikzpicture}[
node distance = 3mm and 2mm,
  start chain = going right,
% nodes definitions
     P/.style = {% Parameters circles
                circle, draw, fill=white,
                minimum size=5mm, inner sep=0pt, outer sep=0pt,
                node distance=0pt, node contents={}, on chain},
     F/.style = {% Fit box
                draw, dashed, inner xsep=1mm, inner ysep=0mm, yshift=2.5mm},
% lines/arrows definition
     L/.style = {-Stealth, thick}
                    ]
% parameters circles
\foreach \i in {1,...,5}{\node (n\i) [P];}
% MLB box
% it width is length from west side to east side of P nodes
\path   let \p1 = (n1.west),
            \p2 = (n5.east),
            \n1 = {veclen(\x2-\x1,\y2-\y1)} in
        node (mlb)  [minimum width=\n1, inner ysep=5mm,
                     draw, font=\Huge\bfseries,
                     top color=white, bottom color=gray!50, middle color=gray!15,  % added colors to shape
                     below=0mm of n3] {MLB};
% control parameters
    \begin{scope}[inner ysep=1pt]
\node (n11) [above left =of n1 ]    {Max\_Load@TeNB};
\node (n12) [above      =of n11]    {xxxxxxxxxxxxxx};
\node (n13) [above=of n12.north -| n3]  {Max\_Load};
\node (n15) [above right=of n5 ]    {xxxxxxxxxxxxxx};
\node (n14) [above      =of n15]    {xxxxxxxxxxxxxx};
% parameters title
\node (n16) [above left=of n1.west |- n13,
             font=\large\bfseries]  {Control Parameter};
    \end{scope}
% frame around parameters lie on background layer
\scoped[on background layer]
    \node   [F, fit=(n1) (n16.west) (n14)] {};
% lines
\draw[L]    (n11) -| (n1);
\draw[L]    (n12) -| (n2);
\draw[L]    (n13) -- (n3);
\draw[L]    (n14) -| (n4);
\draw[L]    (n15) -| (n5);
    \begin{scope}[node distance=0mm and 9mm,
                  F/.append style={inner ysep=1mm,yshift=-1mm}  ]
\node (n21) [above left=of mlb.west] {Cell Load};
\node (n22) [below left=of mlb.west] {UE Measurements};
\node (n23) [below left=of mlb.west |- n22.south,
             font=\bfseries] {Input Parameters};
    \node   [F, fit=(n21.east) (n23)] {};
    \end{scope}
% coordinate (n21 -| mlb.west) is projection of n21.east on the west border of mlb node
\draw[L]    (n21) -- (n21 -| mlb.west);
\draw[L]    (n22) -- (n22 -| mlb.west);    \end{tikzpicture}
\end{document}

[1]: https://i.stack.imgur.com/ixJqG.png

|improve this answer|||||
  • 1
    Any news, @Maru? – Zarko May 1 '17 at 14:46
  • I'm glad to hear this! Happy TeXing – Zarko May 2 '17 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.