% work flow

This section has the purpose to give a graphical representation of how the workflow should be and it focuses on the distribution and optimization model developed in this thesis work.

\begin{figure}[H]
\resizebox{0.89\textwidth}{!}{
	\centering
	
	% Define block styles
	\tikzstyle{limiter} = [ellipse, draw, text width=5em, text badly centered, inner sep=0pt, minimum height=3em]
	\tikzstyle{biglimiter} = [ellipse, draw, text width=6em, text badly centered, inner sep=0pt, minimum height=5.5em]
	\tikzstyle{block} = [rectangle, draw, text width=6em, text centered, rounded corners, minimum height=3em]
	\tikzstyle{decision} = [diamond, draw, text width=5em, text badly centered, inner sep=0pt]
	\tikzstyle{transparent} = [rectangle, text width=5.5em, text centered, rounded corners, minimum height=3em]
	
	\begin{tikzpicture}[node distance = 2cm, auto, >=Stealth]
	% Place nodes	
	
	\node [limiter] (start) {START};
	
	\node [block, below of=start] (input) {Input reading};
	\node [limiter, left of=input, node distance = 3.5cm] (policy) {Policy};
	\node [limiter, right of=input, node distance = 3.5cm] (filtering) {Filtering points};
	
	\node [block, below of=input] (path) {Traffic path process};
	\node [transparent, left of=path, node distance = 3.5cm](structure) {Cloud deployment};
	\node [limiter, right of=path, node distance = 3.5cm] (bad-rules) {Rules that cannot be injected};
	
	\node [block, below of=path] (opt) {Model optimization process};
	
	\node [decision, below of=opt, node distance = 2.8cm] (sat) {Is the model satifiable?};
	
	\node [biglimiter, right of=sat, node distance = 3.5cm] (nope) {Requirements has to be relaxed};
	
	\node [block, below of=sat, node distance = 2.8cm] (distr) {Rule setting process};
	
	\node [limiter, below of=distr] (out) {Output};
	
	% arrows
	
	\draw[->] (start) -- (input);
	\draw[<-] (input) -- (policy);
	\draw[<-] (input) -- (filtering);
	\draw[->] (input) -- (path);
	\draw[<->, dashed] (path) -- (structure);
	\draw[->] (path) -- (bad-rules);
	\draw[->] (path) -- (opt);
	\draw[->] (opt) -- (sat);
	\draw[->] (sat) -- node {no} (nope);
	\draw[->] (sat) -- node {yes} (distr);
	\draw[->] (distr) -- (out);
	
	\end{tikzpicture}
}
\caption{Optimization model workflow.
	\label{fig:workflow}}
\end{figure}

The workflow has two inputs that are the policies, with their rules, and the filtering points, which means all the points with filtering capabilities.
In the Figure~\ref{fig:workflow} there are three outputs, the first one shows the rules that cannot be injected, the second one is a bad outcome, because the requirements are too strict and there is no solution to the optimization problem. The last output is the list of filtering point with their ordered list of rules.