4
\begin{document}
\pagestyle{empty}
  % Define block styles
 \tikzstyle{decision} = [diamond, draw, fill=white!20, 
text width=5.5em, text badly centered, node distance=5cm, inner sep=0pt]
 \tikzstyle{block} = [rectangle, draw, fill=white!20, 
text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=5cm,
minimum height=5em]

 \begin{tikzpicture}[node distance = 4cm, auto]
% Place nodes
\node [block] (sume) {1.-Sume variables de holgura (forma estándar)};
\node [block, below of=sume] (calcu) {2.-Calcule una primer solución básica factible};
\node [decision, below of=calcu] (decide) {3.-¿Existe una solución básica factible adyacente que sea mejor?};
\node [block, right of=decide, node distance=5cm] (no) {5.-Entonces la solucion basica factible actual es óptima};
\node [block, left of=decide, node distance=5cm] (yes) {4.-Entonces calcule el valor de la funcion $Z$ para la nueva solucion básica factible};


% Draw edges
\path [line] (sume) -- (calcu);
\path [line] (calcu) -- (decide);    
\path [line] (decide) -- node {Si} (yes);
\path [line] (yes) -| (calcu);    
\path [line] (decide) -- node {No} (no);

\end{tikzpicture}


\end{document}

I want to create this flowchart

This is the first time I'll create a flowchart in Latex, I did this so far, and the result looks terrible. Can someone help me to make this look similar to the image I have?.

enter image description here

  1. This is the result from what I did, the problem is that the arrow that goes from 4 to 2 is flip, How can I solve that
  2. What instruction makes the arrow look thicker?
  • 3
    Please reduce your code and ask specific questions! For example: "How do I change the arrow head between these two nodes?" Like this, it is more a code review or do-it-for-me question which does not show much effort. What have you tried? Where are your problems? – LaRiFaRi Sep 29 '14 at 08:05

1 Answers1

4

Would this be what you seek?

  1. the problem is that the arrow that goes from 4 to 2 is flip, How can I solve that

    \path [line] (yes.west) --+(-1cm,0) |- (h); % draw from (yes.west) to the left 1cm and then go vertically up and horizontally to (h) point where the code uses node to define (h)

  2. What instruction makes the arrow look thicker? Modify the line style defined in the tizstyle to add thick, or very thick, or line width=xx pt

  3. Please check Should \tikzset or \tikzstyle be used to define TikZ styles?

  4. If your question about making the arrow look thicker is about the arrowhead then please check Is it possible to change the size of an arrowhead in TikZ/PGF?

yields image below

enter image description here Code

\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{matrix, shapes, arrows,calc, positioning}

\begin{document}
\pagestyle{empty}
  % Define block styles
 \tikzstyle{decision} = [diamond, draw, fill=white!20, 
text width=3cm, text badly centered, node distance=5cm, inner sep=0pt]
 \tikzstyle{block} = [rectangle, draw, fill=white!20, 
text width=3cm, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=5em]

 \begin{tikzpicture}[node distance = 4cm, auto]
% Place nodes
\node [block] (sume) {1.-Sume variables de holgura (forma estándar)};
\node [block, below of=sume] (calcu) {2.-Calcule una primer solución básica factible};
\node [decision, below of=calcu] (decide) {3.-¿Existe una solución básica factible adyacente que sea mejor?};
\node [block, below right =1cm and 1 cm of decide, node distance=5cm] (no) {5.-Entonces la solucion basica factible actual es óptima};
\node [block, below left = 1cm and 1cm of decide, node distance=5cm] (yes) {4.-Entonces calcule el valor de la funcion $Z$ para la nueva solucion básica factible};


% Draw edges
\path [line] (sume) -- (calcu);
\path [line] (calcu) --node[pos=0.5](h){} (decide);    
\path [line] (decide) -| node[pos=0.2,above] {Si} (yes);
\path [line] (yes.west) --+(-1cm,0) |- (h);    
\path [line] (decide) -| node[pos=0.2,above] {No} (no);

\end{tikzpicture}


\end{document}
Jesse
  • 29,686