# economic circuit

Having seen some examples of electronic circuits, I would like to make an economic one like this one:

I haven't found any relevant example, so would like your help.

In case that somebody is interested in economics, a more representative circular flow is the following one:

While I was trying to create the second figure I met a problem and my code doesn't work.

    \documentclass[12pt,a4paper]{article}
\usepackage[english,greek]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{tkz-tab}
\usetikzlibrary{shapes,snakes}
\usepackage{smartdiagram}
\usepackage{geometry}
\usetikzlibrary{positioning}
\geometry{left=0.75in,right=0.75in,top=0.65in,bottom=0.65in}
\usepackage{tkz-euclide}
\usetikzlibrary{shapes.geometric}
\usepackage{tkz-fct} \usetkzobj{all}
\usetikzlibrary{calc,decorations.pathreplacing}
\usetikzlibrary{decorations.markings}
\usepackage{pgfplots}
\usepackage{verbatim}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\usepackage{filecontents}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{center}
\begin{tikzpicture}
\node (c1)[shape=circle,draw]  {
$\left. \begin{array}{c} \textit{Επιχειρήσεις}\\ \textit{\footnotesize (Παραγωγοί)} \\ \end{array} \right.$
};
\node[rectangle,draw,rounded corners] (c2) [right=of c1] {Κράτος};
\node (c3) [shape=circle,draw]   [right=of c2] {
$\left. \begin{array}{c} \textit{Νοικοκυριά}\\ \textit{\footnotesize (Καταναλωτές)} \\ \end{array} \right.$
};
\node(c4)[shape=circle,draw, above=of c2]  {
$\left. \begin{array}{c} \textit{Αγορά}\\ \textit{Αγαθών}\\ \textit{Υπηρεσιών} \end{array} \right.$
};

\node (c5)[shape=circle,draw, below=of c2]  {
$\left. \begin{array}{c} \textit{Αγορά}\\ \textit{Παραγωγικών} \\ \textit{Συντελεστών} \end{array} \right.$
};

\draw [<-,thick,color=Green] (c4) to [bend right=45]  (c1);
\draw [<-,thick,color=Green] (c3) to [bend right=45]  (c4);
\draw [<-,thick,color=Green] (c5) to [bend right=45]  (c3);
\draw [<-,thick,color=Green] (c1) to [bend right=45]  (c5);

\draw [->,thick, color=Red,postaction={decorate,decoration={raise=5ex,text along path,text align=center,text={ Δ}}}]      (c4) to [bend left=45] (c1);
\end{tikzpicture}
\end{center}

\end{document}

-
My 2 cents: you could use gnuplot instead, but I think you could only get rectangles and straight lines. – Luigi Jun 22 '13 at 18:13
this will be very straight forward in tikz or pstricks- the example at the beginning of 3.1 of the pgf manual should get you started- it'd be great if you could try that, post your code, and then ask for help on any areas that you're stuck with :) – cmhughes Jun 22 '13 at 18:15
I seriously doubt circuitikz is of any help here, but it certainly is quite straightforward to do in tikz. – Count Zero Jun 22 '13 at 18:26
The other examples looks like something that can also be done in TikZ very easily. It is also possible to (ab)use tikz-cd for that … A \matrix or the positioning library are helpful tools. – Qrrbrbirlbel Jun 23 '13 at 16:17
TikZ won't allow you create that ugliness and giving up error based on its own horror :) – percusse Jul 11 '15 at 12:31

The circuits library is not really suited for this kind of diagram.

This can easily be achieved with three nodes and a few edges. The shapes.geometric library provides the ellipse shape.

The auto=right option positions all nodes along a path on the right side (the default is left). The swap option changes this for only one node to the other side.

## Code

\documentclass[tikz, convert=false]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[
main node/.style={
draw,
shape=ellipse,
minimum width=2cm,
minimum height=1cm
},
>=latex,
auto=right
]
\node[main node] (daervz) {daervz};
\node[main node] (y) at  (50:4) {y};
\node[main node] (x) at (130:4) {x};

\path[
nodes={font=\scriptsize},
->
] (x)      edge[bend left=50]  node[swap] {Goods} (y)
edge[bend right=50] node       {ddaf}  (daervz)
edge[bend right=10] node[swap] {z}     (y)
(daervz) edge[bend right=50] node       {dddda} (y)
edge[bend left]     node       {dda}   (x)
(y)      edge[bend left]     node       {dda}   (daervz)
edge[bend left]     node       {k}     (x)
edge[bend right]    node       {z}     (x)
;
\end{tikzpicture}
\end{document}


## Output

-
thank you very much. – giannis Jun 23 '13 at 7:14

With PSTricks. Just for fun!

\documentclass[preview,border={10pt 10pt 10pt 40pt}]{standalone}
\usepackage{pst-node}
\def\obj#1{\makebox[1cm]{\strut#1}}

\begin{document}
\offinterlineskip
\begin{psmatrix}[colsep=1cm,rowsep=3cm,mnode=oval]
[name=l]\obj{x} & & [name=r]\obj{y}\\
& [name=b]\obj{daervz} \\
\end{psmatrix}
\psset{arrows=->}
% upper connections
\ncarc[arcangle=40]{l}{r}\naput{Goods}
\ncarc[arcangle=-20]{r}{l}\nbput[labelsep=3pt]{z}
\ncarc[arcangle=-20]{l}{r}\naput{z}
\ncarc[arcangle=50]{r}{l}\nbput[labelsep=3pt]{k}
% left connections
\ncarc[arcangle=-50]{l}{b}\nbput{ddaf}
\ncarc[arcangle=20]{b}{l}\nbput{dda}
% right connections
\ncarc[arcangle=-50]{b}{r}\nbput{dddda}
\ncarc[arcangle=20]{r}{b}\nbput{dda}
\end{document}


## Simplified version:

We can save more keystroke by using shortput=nab option as follows.

\documentclass[preview,border={10pt 10pt 10pt 40pt}]{standalone}
\usepackage{pst-node}
\def\obj#1{\makebox[1cm]{\strut#1}}

\begin{document}
\offinterlineskip
\begin{psmatrix}[colsep=1cm,rowsep=3cm,mnode=oval]
[name=l]\obj{x} & & [name=r]\obj{y}\\
& [name=b]\obj{daervz} \\
\end{psmatrix}
\psset{arrows=->,shortput=nab}
% upper connections
\ncarc[arcangle=40]{l}{r}^{Goods}
\ncarc[arcangle=-20]{r}{l}_[labelsep=3pt]{z}
\ncarc[arcangle=-20]{l}{r}^{z}
\ncarc[arcangle=50]{r}{l}_[labelsep=3pt]{k}
% left connections
\ncarc[arcangle=-50]{l}{b}_{ddaf}
\ncarc[arcangle=20]{b}{l}_{dda}
% right connections
\ncarc[arcangle=-50]{b}{r}_{dddda}
\ncarc[arcangle=20]{r}{b}_{dda}
\end{document}

-
It shows me an error: Undefined control sequence. <recently read> \c@lor@to@ps – giannis Jun 22 '13 at 19:12
@giannis: Compile it with latex-dvips-ps2pdf steps. – kiss my armpit Jun 22 '13 at 19:19