\documentclass[signature]{deltares_report}
\usepackage[titletoc]{appendix}

%-----------------------------------------------

\begin{document}
\pagestyle{empty}
%

\newcommand{\ProgramName}{DAM\xspace}

\title{\ProgramName}
\subtitle{Architecture Overall}
\projectnumber{1210702-000}
\client{Deltares - Geo engineering DKS}
\reference{1210702-000-GEO-0005}
\classification{-}

\date{Jan. 2017}
\version{0.1}

\keywords{Dike, safety assessment, design, software, macro stability, piping}

\references{Refer to \autoref{Literature}.}

\summary{This document contains a description of the overall architecture for \ProgramName, an application that computes the strength of a complete dikering with respect to several failure mechanisms, such as macro stability and piping.\\
\\
\textbf{\footnotesize{Samenvatting}} \\
Dit document bevat een beschrijving van de totale architectuur van \ProgramName, een User Interface applicatie die een gebruiker in staat stelt om voor een dijktraject berekeningen uit te voeren voor verschillende faalmechanismen, waaronder macrostabiliteit en piping.}

\versioni{0.1}
\datei{Jan 2017}
\authori{Tom The}
\revieweri{John Bokma}
\approvali{Maya Sule}

\status{draft}
\disclaimer{This is a draft report, intended for discussion purposes only. No part of this report may be relied upon by either principals or third parties.}

\deltarestitle


%------------------------------------------------------------------------------
\chapter{Introduction} \label{Introduction}

\section{Purpose and scope of this document} \label{sec:1.1}

This document contains the overall architecture of \ProgramName, a software package for the automated calculation of the strength of dikes, and all of its components. \ProgramName was developed by Deltares with and for STOWA for all water authorities.


\section{Other system documents} \label{sec:1.2}

The full documentation on the program comprises the following documents.

\renewcommand{\arraystretch}{1.3}

\begin{table}[H]
%\caption{xxx}
%\label{xxx}
\begin{tabular}{|p{60mm}|p{80mm}|} \hline
\textbf{Title} & \textbf{Content} \\ \hline
\ProgramName - Architecture Overall \newline \citep{DAM_ArchitectureOverall} & Description of overall architecture of \ProgramName and its components. \\ \hline
\ProgramName Engine - Technical Design \newline \citep{DAMEngine_TechnicalDesign} & Description of the implementation of the architecture and technical design of the \ProgramName Engine. \\ \hline
\ProgramName Engine - Technical documentation \newline \citep{DAMEngine_TechnicalDocumentation} & Description of the arguments and usage of different software components of the \ProgramName Engine, generated from in-line comment with Doxygen. \\ \hline
\ProgramName Engine - Test Plan \newline \citep{DAMEngine_TestPlan} & Description of the different regression and acceptation tests of the \ProgramName Engine, including target values.  \\ \hline
\ProgramName Engine - Test Report \newline \citep{DAMEngine_TestReport} & Description of the test results (benchmarks and test scripts) of the \ProgramName Engine. \\ \hline
\ProgramName UI - Functional Design \newline  \citep{DAMUI_FunctionalDesign} & Description of the requirements and functional design of the DAM User Interface. \\ \hline
\ProgramName UI - Technical Design \newline  \citep{DAMUI_TechnicalDesign} & Description of the implementation of the architecture and technical design of the DAM User Interface. \\ \hline
\ProgramName UI - Technical documentation \newline \citep{DAMUI_TechnicalDocumentation} & Description of the arguments and usage of different software components of the DAM User Interface, generated from in-line comment with Doxygen. \\ \hline
\ProgramName UI - Test Plan \newline \citep{DAMUI_TestPlan} & Description of the different regression and acceptation tests, including target values for the DAM User Interface.  \\ \hline
\ProgramName UI - Test Report \newline \citep{DAMUI_TestReport} & Description of the test results (benchmarks and test scripts) of the DAM User Interface. \\ \hline
\ProgramName UI - User Manual  \newline \citep{DAMUI_Manual} & Description of the different functionalites available in the \textit{User Interface} and background information. \\ \hline
\end{tabular}
\caption{\small \ProgramName system documents.}
\label{tbl-Documents}
\end{table}

%------------------------------------------------------------------------------
\chapter{Technical requirements}
\label{sec:TechnicalRequirements}

\section{Platform}
\label{sec:Platform}
Operating system: Windows 2008, Windows 7- 32 bits or Windows 7- 64 bits.\newline	
Read/write permission on user selectable folder for saving and calculating projects.\newline	
Administrator rights are required for installation of the application.\newline
Required: Microsoft DotNet framework, version 4.5.\newline

\section{System requirements}
\label{sec:SystemRequirements}
Processor: Intel Core i5 or better.\newline
Clockspeed processor: 2.4 GHz or better.\newline
Memory (RAM): 4 GB or more.\newline
Free harddisk space: 20 GB or more.\newline
Monitor:	22 inch monitor, resolution 1920x1080. \newline

\section{Regional settings}
\label{sec:RegionalSettings}

The user can select between 2 languages in the application:
\begin{itemize}
	\item Dutch (NL)
	\item English (UK)
\end{itemize}
The application should behave correctly with regional settings set to:
\begin{itemize}
	\item UK
	\item NL
\end{itemize}

\section{Additional requirements}
\label{sec:AdditionalRequirements}
\begin{itemize}
	\item DAM must support the use of multiple processor cores, when they are available, to speed up the calculation.
	\item DAM is a standalone application, but must support the use of network storage.
\end{itemize}



%------------------------------------------------------------------------------
\chapter{\ProgramName and its components} \label{ProgramAndComponents}

\ProgramName contains several components. Please see \autoref{fig-DamComponents} for an overview of the components.

\begin{figure}[H]
  \begin{center}
    \includegraphics[width=15cm]{pictures/DamComponents.pdf}
  \end{center}

  \caption{\small \ProgramName and its components.}
  \label{fig-DamComponents}
\end{figure}

The arrows illustrate the dependencies of the components. 
A dependency also implies communication and interaction between the respective components. 
The exact definition of how to communicate and interact between these components is described in the technical design of each component 
(e.g for the DAM Engine \citep{DAMEngine_TechnicalDesign}). \newline
In the following sections the components are described.

 
\section{\ProgramName clients} \label{sec:2.1}
\ProgramName clients are the modules that mostly interact with the user or sometimes with another system. 
These can be full graphical user interfaces (like DAM UI as shown in \autoref{fig-DamUIMainForm} and DamLive Showcase as shown in \autoref{fig-DamLiveShowcase} and \autoref{fig-DamLiveSensor}), commandline parameter tools (like KernelComparisonRunner.exe) or a module that can be used by other systems (like DAMLive, that is to be used as a module in a FEWS system).

\begin{figure}[H]
  \begin{center}
    \includegraphics[width=15cm]{pictures/DamUIMainForm.png}
  \end{center}

  \caption{\small \ProgramName User Interface.}
  \label{fig-DamUIMainForm}
\end{figure}

\begin{figure}[H]
  \begin{center}
    \includegraphics[width=15cm]{pictures/DamLiveShowcase.jpg}
  \end{center}

  \caption{\small \ProgramName Live Showcase User Interface.}
  \label{fig-DamLiveShowcase}
\end{figure}

\begin{figure}[H]
  \begin{center}
    \includegraphics[width=4cm]{pictures/DamLiveSensor.jpg}
  \end{center}

  \caption{\small \ProgramName Live sensor.}
  \label{fig-DamLiveSensor}
\end{figure}


These clients interact directly with the \ProgramName Engine (see next section).


\section{\ProgramName Engine} \label{sec:2.2}

The \ProgramName Engine is the engine for the \ProgramName computation. It contains several submodules, depending on which computation has to be made.
As can be seen in  \autoref{fig-DamComponents} the submodules are
\begin{itemize}
	\item Assessment regional dikes
	\item Design primary dikes
	\item Operational module (for realtime calculations)
\end{itemize}
Depending on the client, 1 or more of these submodules can be addressed by the client.
The \ProgramName Engine has no knowledge of the clients that use the Engine and there will be no code dependencies from the Engine to the clients.

\section{Failure mechanisms} \label{sec:2.3}
The \ProgramName Engine uses external failure mechanisms. These are completely independent, and have no knowledge of the \ProgramName Engine. So there will be no code dependencies from the failure mechanisms to the \ProgramName Engine. Furthermore development, maintenance and support of these failure mechanisms are not in the scope of the DAM system.

%------------------------------------------------------------------------------
\chapter{Architectural Choices} \label{ArchitecturalChoices}

\section{Module dependencies} \label{sec:ModuleDependencies}
As can be seen in  \autoref{fig-DamComponents} the arrows pointing between the main parts of the system are only 1 way. This means that e.g. the \ProgramName clients may address the \ProgramName Engine, but the \ProgramName Engine may not address the \ProgramName  clients. 

\section{External libraries and components} \label{sec:3.2}
\ProgramName uses third-party libraries and components. Only open sources and free components, that are free to redistribute, are allowed to be used. 

Furthermore \ProgramName uses the Delta Shell Light (DSL) library, that is developed by Deltares.

Due to choices that have been made in the past, the UI modules of DSL use DevExpress, which is a commercial library. Free redistribution of the DevExpress is allowed by the development license that is used by Deltares.

In the future the dependency on DevExpress should be removed, e.g. by using other, open source, UI libraries.

In the next sections the libraries that are used by the components are summarized.

\section{\ProgramName UI (DSL)} \label{sec:ProgramUI}
This client uses the full Delta Shell Light (DSL) library
\begin{itemize}
	\item DSL-Core: standard library with general common functionality
	\item DSL-Probabilistic: probabilistic functionality
	\item DSL-Geographic: GIS functionality
	\item DSL-Geo: geotechnics functionality
	\item DSL-GeoIO: geotechnics import and database functionality
	\item DSL-FormsStandard: standard UI functionality
	\item DSL-FormsMaps: extends FormsStandard with GIS functionality
	\item DSL-FormsGeo: extends FormsStandard with geotechnical functionality
\end{itemize}

Other libraries that are used are
\begin{itemize}
	\item Dot Spatial: GIS library
	\item Commandline Parser: library for parsing commandline options
	\item Lumenworks: CSV import library
	\item SQLite: SQLite database access library
	\item Firebird: Firebird database access library
\end{itemize}

\section{\ProgramName Live} \label{sec:ProgramLive}
\ProgramName Live only uses part (non-UI modules) of the DSL library
\begin{itemize}
	\item DSL-Core
	\item DSL-Geographic
\end{itemize}

\section{\ProgramName Live Showcase} \label{sec:ProgramLiveShowcase}
\ProgramName Live only uses part (non-UI modules) of the DSL library
\begin{itemize}
	\item DSL-Core
\end{itemize}

\section{\ProgramName Engine} \label{sec:ProgramEngine}
The \ProgramName Engine only uses part (non-UI modules) of the DSL library
\begin{itemize}
	\item DSL-Core
	\item DSL-Probabilistic
	\item DSL-Geo
\end{itemize}

Other libraries that are used are
\begin{itemize}
	\item Math.Net: mathematical library
\end{itemize}


%------------------------------------------------------------------------------
\chapter{Version control}  \label{VersionControl}

Asversion control system Subversion with the Tortoise client will be used. The layout of the SVN repository will reflect the components of \ProgramName as shown in \autoref{fig-DamComponents}.

The failure mechanisms are not part of \ProgramName itself and thus not of the \ProgramName repository. Instead, the failure mechanisms will be stored in their own repositories. \ProgramName will refer to the failure mechanisms as external libraries.

\section{\ProgramName repository main layout} \label{sec:4.1}

In \autoref{fig-SVNMainLayout} the main layout is shown.


\begin{figure}[H]
  \begin{flushleft}
    \includegraphics{pictures/DamSVNMainLayout.png}
  \end{flushleft}

  \caption{\small \ProgramName SVN main layout.}
  \label{fig-SVNMainLayout}
\end{figure}

The 4 main parts are 
\begin{itemize}
	\item dam clients - the client applications that use the \ProgramName Engine.
	\item dam clients library - shared libraries by the \ProgramName clients.
	\item dam engine - the computational engine of \ProgramName.
	\item doc - general documentation for \ProgramName (like this document).
\end{itemize}
With the exception of "`dam clients"', each of these main parts has its own trunk/branches/tags layout.

The map "'dam tools"' is for storing independent tools that are not part of \ProgramName itself, but support the work processes of \ProgramName (e.g. Dam Edit Design).

The map "`project data"' is for archiving \ProgramName project data.

\section{\ProgramName repository clients layout} \label{sec:4.2}

Each \ProgramName client has its own entry in the clients map. In \autoref{fig-SVNClientLayout} the layout of the \ProgramName clients map is shown.

\begin{figure}[H]
  \begin{flushleft}
    \includegraphics{pictures/DamSVNClientLayout.png}
  \end{flushleft}
  \caption{\small \ProgramName SVN clients layout.}
  \label{fig-SVNClientLayout}
\end{figure}

Each of the "`dam clients"' has its own trunk/branches/tags layout.

The currently known applications are 
\begin{itemize}
	\item Dam UI - the current \ProgramName desktop application.
	\item DamLive - the current runner for the Fews operational system.
	\item DamLiveShowcase - a demo application to show DamLive with live sensors.
	\item KernelComparisonRunner - a commandline utility for comparing the results of different macrostability kernels.
\end{itemize}

\section{\ProgramName repository clients library layout} \label{sec:4.3}

In \autoref{fig-SVNClientLibraryLayout} the layout of the \ProgramName clients library map is shown.

\begin{figure}[H]
  \begin{flushleft}
    \includegraphics{pictures/DamSVNClientLibraryLayout.png}
  \end{flushleft}
  \caption{\small \ProgramName SVN clients library layout.}
  \label{fig-SVNClientLibraryLayout}
\end{figure}

At this moment only one project is foreseen to be put in the "`dam clients library"' map is:
\begin{itemize}
	\item Deltares.Dam.Data
\end{itemize}

\section{\ProgramName repository full layout} \label{sec:4.4}

The full layout of the  \ProgramName repository will be as shown in \autoref{fig-SVNLayout}.
\begin{figure}[H]
  \begin{flushleft}
    \includegraphics{pictures/DamSVNLayout.png}
  \end{flushleft}

  \caption{\small \ProgramName SVN full layout.}
  \label{fig-SVNLayout}
\end{figure}


%------------------------------------------------------------------------------
\chapter{Literature}  \label{Literature}

\bibliography{../DAM_references/dam_references}

\pagestyle{empty}
\mbox{}

%------------------------------------------------------------------------------
\end{document}
