\documentclass{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{Apr. 2023}
\version{1.1}

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

\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{1.1}
\datei{Apr. 2023}
\author{Tom The}
\organisationi{Deltares}
\documentid{DAM - Architecture Overall.pdf}
\partner{John Bokma}
\authori{Tom The}
\revieweri{John Bokma}
\approvali{Arthur Baart}
\publisheri{-}
\contact{Kin Sun Lan}

\status{final}
\disclaimer{}

\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]
\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 - Functional Design \newline  \citep{DAMEngine_FunctionalDesign} & Description of the requirements and functional design of the \ProgramName Engine. \\ \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 PythonInterface Documentation \newline \citep{DAM_PythonInterfaceDocumentation} & Description of the functionality of the Dam PythonInterface. \\ \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 functionalities 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 7- 32 bits or Windows 7- 64 bits, Dutch or UK version.\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}
\phantom{}\vspace{-\baselineskip}
\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 Dikes assessment
	\item Dikes assessment regional
	\item Dikes operational (for realtime calculations)
	\item Dikes design
	\item Dikes NWO (Niet Waterkerende Objecten)
\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.

%------------------------------------------------------------------------------
\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. 
A complete overview of the \ProgramName components and their dependencies is shown in \autoref{fig-DamComponentDependencies}.

\begin{figure}[H]
	\begin{center}
		\includegraphics[width=15cm]{pictures/DAM Component dependencies.pdf}
	\end{center}
	
	\caption{\small \ProgramName component dependencies.}
	\label{fig-DamComponentDependencies}
\end{figure}
\section{External libraries and components} \label{sec:Libraries}
\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 Kernel Comparison Runner} \label{sec:KernelComparisonRunner}
\ProgramName Kernel Comparison Runner 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}

As version 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:RepositoryMainLayout}

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 DamClients - the client applications that use the \ProgramName Engine.
	\item DamClientsLibrary - shared libraries by the \ProgramName clients.
	\item DamEngine - the computational engine of \ProgramName.
	\item DamOverall - general documentation for \ProgramName (like this document).
\end{itemize}
The maps "`DamClientsLibrary"', "`DamEngine"' and "`DamOverall"' have their own trunk/branches/tags layout.

The remaining parts are
\begin{itemize}
	\item DamClassic - the orginal (15.1) version of \ProgramName (which has UI and calculation engine in one solution); it has its own trunk/branches/tags layout.
	\item DamTools - independent tools that are not part of \ProgramName itself, but support the work processes of \ProgramName (e.g. Dam Edit Design).
	\item IssueRelatedData - data which belong to Jira issues; \ProgramName uses Jira as issuetracking system, which supports attachments, but \ProgramName attachments can be very large, so it is better to save the attachments in this location; the attachments are stored in a map with the name of the issue number (e.g. MWDAM-982)
	\item ProjectData - used for archiving \ProgramName project data.
\end{itemize}

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

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:RepositoryClientsLibrary}

In \autoref{fig-SVNClientLibraryLayout} the layout of the DAMUI 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 two projects are foreseen to be put in the "`dam clients library"' src map:
\begin{itemize}
	\item Deltares.Dam.Data contains the business layer.
	\item Deltares.Maps contains the map layer. 
\end{itemize}

\Note{At the moment DamClientsLibrary is part of the DamUI repository for practical reasons.
If the developement of the clients are finished, the source code should be moved from DamUI to its own source tree.}

\section{\ProgramName repository \ProgramName Engine} \label{sec:RepositoryDamEngine}

In \autoref{fig-SVNDamEngineLayout} the layout of the \ProgramName Engine map is shown.

\begin{figure}[H]
  \begin{flushleft}
    \includegraphics{pictures/DamSVNDamEngineLayout.png}
  \end{flushleft}
  \caption{\small \ProgramName Engine layout.}
  \label{fig-SVNDamEngineLayout}
\end{figure}

At this moment the projects foreseen to be put in the "`dam engine"' src map are:
\begin{itemize}
	\item Deltares.DamEngine.Calculators: this map contains classes to perform the actual calculations for the \ProgramName Engine.
	\item Deltares.DamEngine.Data: this map contains pure data classes.
	\item Deltares.DamEngine.Interface: this map contains classes to interface to the engine.
	\item Deltares.DamEngine.Io: this map contains classes performing Input/Output to and from the engine.
\end{itemize}

Each project will have a corresponding test project.


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

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{Releasing a product} 
\label{ProductRelease}

This is a description of the steps needed to create a \ProgramName release.
An external release is normally a release of a \ProgramName client (\ProgramName UI or \ProgramName Live).
The order of releasing the several modules of the \ProgramName system is important because of the dependencies between the several modules.
So keep the order of releasing as is specified in this chapter.

It is not always necessary to release all modules, but a module needs to be released, when a dependent module has been released. 
See \autoref{DllChecklist} for an overview of dlls.

\section{Macrostability C\# Wrapper (Deterministic Only)} 
This is a wrapper around the Macrostability kernel.
The release of this wrapper is fully described in the 
\href{https://repos.deltares.nl/repos/FailureMechanisms/doc/trunk/WTI General/BOIReleaseProcedure/BOIReleaseProcedure.pdf}{BOI release procedure}.
The following releases in the following order must be performed:
\begin{itemize}
	\item Geo Common (optional), see section 6.2 of BOI release document
	\item Waternet Creator (optional), see section 6.3 of BOI release document
	\item Macrostability kernel, see section 6.4 of BOI release document
	\item CSharpWrapper, see section 6.6 of BOI release document
\end{itemize}

\Note{If the Geo Common is not released, then the Waternet Creator does not need to be released.}

\section{WTIPiping} 
This kernel is responsible for the piping failure mechanism.
It is used by the \ProgramName Engine.

The release of this kernel is required when:
\begin{itemize}
	\item there is a new version of this kernel and it has been decided that DAM should use that version.
	\item the Geo Common is released in order to avoid the dll hell associated with multiple versions of the same GeoCommon dlls. 
\end{itemize}

When required, this kernel should be released according to the steps for a BOI-release described in chapter 7 of the 
\href{https://repos.deltares.nl/repos/FailureMechanisms/doc/trunk/WTI General/BOIReleaseProcedure/BOIReleaseProcedure.pdf}{BOI release procedure}.

\section{StixFileWriter} 
\label{ReleaseStixFileWriter}
This module is responsible for creating the D-Stability output files.
It is used by the \ProgramName Engine.
 
The steps that are needed to release this module can be found in \cite{StixFileWriter_ReleaseProcedure}

\section{Dam Engine} 
This module has the following dependencies (see also \autoref{app:DamEngine}):
\begin{itemize}
	\item WTIPiping.
	\item StixFileWriter.
	\item MacrostabilityCSharpWrapper.
\end{itemize}
Check for each dependency if there is a more recent (release) version available and if we can update to that version.

The following steps are needed to release this module.
\begin{enumerate}
	\item In the trunk, update the nuget packages of WTIPiping in the solution to the latest signed release version of the package.
	\item In the trunk, update the nuget packages of StixFileWriter in the solution to the latest signed release version of the package. 
	\item In the trunk, update all File Headers for CopyRight to the current year. \\
	\Note{This can be done with the ``Reformat and Cleanup'' Deltares command.}	
	\item In the trunk, update version number in file .$\backslash$src$\backslash$build$\backslash$Base.targets to XX.YY.0.
	\item Create branch DamEngine XX.Y. Set explicit revision for the external doc$\backslash$DAM\_references.
	\item Set version number in branch to XX.Y.1 in .$\backslash$src$\backslash$build$\backslash$Base.targets.
	\item Change the 'current' external in the branch ’signing’ of DAM Engine to the src folder of the new branch DAM XX.Y.
	\item Create a new Dam Engine TeamCity Project XX.Y by copying all the sub projects except:
	\begin{itemize}
		\item Dam Engine Run Code Coverage
		\item Dam Engine SonarCloud
		\item Dam Engine Work in progress
	\end{itemize}
	Adapt the TeamCity configuration for each subproject to use the branch XX.Y.	
	\item Run the TeamCity Dam Engine>>Create Release project under Dam Release. This triggers the Signing DAM Engine project.
	\item Pin the signed artifacts on TC with XX.Y.1 (select apply on all snapshot dependencies).
	\item Get the artifacts and update the release folder of the branch with this.
	\item Create a tag XX.Y.1.
	\item In the branch, reset version to XX.Y.0.
	\item Merge release folder from branch to trunk.
\end{enumerate}

\section{Dam UI}
This application depends on the following Deltares components (see also \autoref{app:DamUI}):
\begin{itemize}
	\item Dam Engine
	\item DSL (Delta Shell Light) libraries
\end{itemize}
Check for each dependency if there is a more recent (release) version available and if we can update to that version.

\subsection{Step 1: Create branch}
Actions:
\begin{enumerate}
	\item In the trunk, update the Tutorials in the release folder.
	\item In the trunk, update the nuget packages of the DamEngine with the artifacts of the latest pin of the DamEngine package (in the Teamcity "Create Release" pipeline).
	\item In the trunk, update the nuget packages of the artifacts of the latest pin of the DSL packages.
	\item In the trunk, make sure lib/Authorization contains the new version 
	(see last pin in \url{https://dpcbuild.deltares.nl/project/SigningAndCertificates_LicenseSystem?branch=&mode=builds}).
	\item In the trunk, update all File Headers for CopyRight to the current year.\\
	\Note{This can be done with the ``Reformat and Cleanup'' Deltares command.}	
	\item In the trunk, update version number in file .$\backslash$src$\backslash$build$\backslash$Base.targets to XX.YY.0.
	\item In the trunk, update version number in file .$\backslash$src$\backslash$DamClientsLibrary$\backslash$build$\backslash$Base.targets to XX.YY.0.
	\item In the trunk, update ProductVersion in file .$\backslash$setup$\backslash$DAM.Setup.wixproj to XX.YY.0.
	\item In the trunk, update ProductVersion in file .$\backslash$setup$\backslash$ApplicationDefines.wxi to XX.YY.0.
	\item Update/check minimum version of common files AA.B in .$\backslash$setup$\backslash$ApplicationDefines.wxs (MinimumCommonFilesVersion) in the trunk.
	\item Update/check minimum version of DSFlex CC.DD.0.0 in .$\backslash$setup$\backslash$ApplicationDefines.wxs (MinimumDSFlexVersion). 
	\item For the setup, replace all GUIDS in .$\backslash$setup$\backslash$ApplicationDefines.wxi by newly created GUIDS (use an online GUID generator such as found at www.guidgenerator.com). 
	Be sure to use Uppercase, Braces and Hyphens when generating the GUIDS.
	\item In the trunk, update version number of User Manual to XX.Y.
	\item Create a branch DamUI XX.Y. Set explicit revision for all the externals.
	\item Set version number in branch to XX.Y.1 in the following files:
	\begin{itemize}
		\item in .$\backslash$src$\backslash$build$\backslash$Base.targets.
		\item in .$\backslash$src$\backslash$DamClientsLibrary$\backslash$build$\backslash$Base.targets.
		\item in .$\backslash$setup$\backslash$DAM.Setup.wixproj (ReleaseVersion).
		\item in .$\backslash$setup$\backslash$ApplicationDefines.wxs (ReleaseVersion).
	\end{itemize}
	\item Create release notes in branch. Include release notes from DSL, Macrostability, WTIPiping if they are applicable.
	\item Change the 'current' external in the branch ’signing’ of DAM UI to the src folder of the new branch DamUI XX.Y.
	\item Create a new Dam UI TeamCity Project XX.Y by copying the entire trunk project (with all sub projects) and adapt the TeamCity configuration for the subproject to use the branch XX.Y. 
	Remove all dependencies and triggers associated to DAM Engine trunk.
	\item  Inform the DAM-team by email about the creation of this branch. 
	Also say that developers/testers must work in this branch from now 
	(only if commits are related to the current release) and then merge in trunk.
\end{enumerate}
	
\subsection{Step 2: Specify checklist}
Actions:
\begin{enumerate}
	\item Run the TeamCity DAM UI>>Create Release project under Dam Release. This triggers the Signing DAM UI project.
	\item Fill in the details to perform a checklist test in Step 3 and notify tester(s) that test can be started.
\end{enumerate}

\subsection{Step 3 (tester): Perform checklist test}
Perform the checklist test. \\
Assign this issue to the reporter for review. 
But when you find a blocking error (access violation, critical error, floating point operation....) contact the reporter immediately.

Actions:
\begin{enumerate}
	\item Use the installer from the branch XX.Y <add link to the TeamCity project>.
	\item Replace Dam.exe with from build \#x (v XX.Y.1.xxxx) in the signing project <add link to the TeamCity project>.
	\item Fill in the test document DAM UI - Test document.pdf taken from the branch XX.Y <add link to the TeamCity project>.
	\item Add the results to the test folder of the branch with the full version in the name: DAM UI - Test documentXX.Y.1.xxxx.pdf. \newline
	Note, the checklist will only be done once during the release process. 
	Depending on the findings, the PL creates new issues to be fixed. 
	If it needs to be fixed in this release, fix in branch and merge to the trunk, otherwise fix later in trunk.
\end{enumerate}

\subsection{Step 4: Prepare setup}
Actions:
\begin{enumerate}
	\item Pin the signed artifacts on TeamCity DAM UI>>Create Release project with XX.Y.1 (select apply on all snapshot dependencies).
	\item Get the artifacts and update the release$\backslash$Install\_Version folder of the branch with this.\newline
	\Note{Do not forget to delete obsolete files and add newly added files (e.g. when the DevExpress library has been updated).}
	\item When the user manual and release notes are final, set pin on the Documentation project of the branch in TeamCity.
	\item Get the artifacts (i.e. User Manual and Release Notes) from the pinned version and commit them in the release folder of the branch:
	\begin{itemize}
		\item User Manual in release/Install\_Version/Manual
		\item Release Notes, FD and TD in release/Documents
	\end{itemize}
\end{enumerate}

\subsection{Step 5: Specify acceptance test with setup }
Actions:
\begin{enumerate}
	\item Run the TeamCity DAM UI Setup>>Create Release project under Dam Release. This triggers the Signing Setup project.
	\item Fill in the details to perform an acceptance test in Step 6 and notify tester(s) that test can be started
\end{enumerate}

\subsection{Step 6 (tester): Perform acceptance test with setup}
Perform acceptance test with the signed setup AND the final signed common files setup. \\
Assign this issue to the reporter for review.

Actions:
\begin{enumerate}
	\item Use the installer (v XX.Y.1) from build \#x in the signing project <add link to the TeamCity project>.
	\item Use common files (v XX.Y.1) from build \#x in the signing project <add link to the TeamCity project>.
\end{enumerate}

Note that when after this test a killing bug is found and fixed, the acceptance test must
be redone. Depending on the findings, the PL creates new issues to be fixed. 
If it needs to be fixed in this release, fix in branch and merge to the trunk, otherwise fix later in trunk.

\subsection{Step 7: Accept setup}
When results of acceptance test are accepted by the PL:
\begin{enumerate}
	\item Set pin on signed setup in the TeamCity DAM UI Setup>>Create Release project (select apply on all snapshot dependencies).
	\item Download the pinned setup from TeamCity and put setup Dam.msi and release notes in TestInstalls (N:$\backslash$Teams$\backslash$DSC TeCo$\backslash$Test Installs$\backslash$GEO).
	\item Add the setup to the release folder of the branch. 
\end{enumerate}

\subsection{Step 8: Tag and final actions}
Actions:
\begin{enumerate}	
	\item Create a tag XX.Y.1.
	\item In the branch, reset version to XX.Y.0 in the following files:
	\begin{itemize}
		\item in .$\backslash$src$\backslash$build$\backslash$Base.targets
		\item in .$\backslash$src$\backslash$DamClientsLibrary$\backslash$build$\backslash$Base.targets
		\item in .$\backslash$setup$\backslash$DAM.Setup.wixproj (ProductVersion)
		\item in .$\backslash$setup$\backslash$ApplicationDefines.wxi (ProductVersion)
	\end{itemize}
	\item Merge release folder from branch to trunk.
	\item Release version XX.Y in Jira (select Project, Settings (wheel), Versions. Select version XX.Y, choose action Release).
	\item In the trunk, update the damx files in folder data$\backslash$Versions$\backslash$V XX.Y.1 if present, 
	otherwise create the folder, and use these new files in both following unit tests (eventually extend the existing tests):
		\begin{itemize}
		\item	LoadCompatibilityTest.CanLoadDesignStabilityVersion...
		\item	LoadCompatibilityTest.CanLoadDesignPipingVersion...
	\end{itemize}
\end{enumerate}

\subsection{Step 9: Update public wiki page}
Update the publicwiki page: \url{https://publicwiki.deltares.nl/spaces/DAM/pages/75827288/DAM}
\begin{enumerate}	
	\item Add the release notes for XX.Y.1.
	\item Replace Gebruikershandleiding.
\end{enumerate}

\section{DamLive}
This application depends on the following Deltares components (see also \autoref{app:DamLive}):
\begin{itemize}
	\item Dam Engine
	\item DSL (Delta Shell Light) libraries
\end{itemize}
Check for each dependency if there is a more recent (release) version available and if we can update to that version.

\subsection{Step 1: Create branch}
Actions:
\begin{enumerate}
	\item In the trunk, update the nuget packages of the DamEngine with the artifacts of the latest pin of the DamEngine packages (in the Teamcity "Create Release" pipeline).
	\item In the trunk, update the nuget packages of the artifacts of the latest pin of the DSL packages.
	\item In the trunk, make sure lib/Authorization contains the new version.
	\item In the trunk, update all File Headers for CopyRight to the current year. \\
	\Note{This can be done with the ``Reformat and Cleanup'' Deltares command.}
	\item In the trunk, update version number in file .$\backslash$src$\backslash$build$\backslash$Base.targets to XX.YY.0.
	\item In the trunk, create the release notes. 
	\item Create a branch DamLive XX.Y:
	\begin{itemize}
		\item Set explicit revision for the external DAM\_references
		\item Set explicit revision for the external DamClientsLibrary \textbf{only if} the release of DAM Live is done without the release of DAM UI.  
	\end{itemize}
	\item Set version number in branch to XX.Y.1 in .$\backslash$src$\backslash$build$\backslash$Base.targets
	\item Update DamClientsLibrary:	
	\begin{itemize}
		\item If the release of DAM Live is done together with the release of DAM UI,
		link the external of DamClientsLibrary to the tag of DAM UI 26.1.1.
		\item If the release of DAM Live is done without the release of DAM UI, 
		set version number in branch to XX.Y.1 in .$\backslash$src$\backslash$DamClientsLibrary$\backslash$build$\backslash$Base.targets
	\end{itemize}
	\item 
	\item Adapt/Correct all externals where needed to the proper tags (instead of trunk).
	\item Change the 'current' external in the branch ’signing’ of DAM Live to the src folder of the new branch DamLive XX.Y.
	\item Create a new Dam Live TeamCity Project XX.Y by copying the entire trunk project (with all sub projects) and adapt the TeamCity configuration for the subproject to use the branch XX.Y.
\end{enumerate}

\subsection{Step 2: Signing dll}
Actions:
\begin{enumerate}	
	\item When the release notes are final, set pin on the Documentation project of the branch in TeamCity.
	\item Get the artifacts (i.e. Release Notes) from the pinned version and commit them in the release/Documents folder of the branch.	
	\item Run the TC Create Release project. This triggers the Signing DAM Live project.
	\item Pin the signed artifacts on TC Create Release project with XX.Y.1 (select apply on all snapshot dependencies).
	\item Get the artifacts and update the release folder of the branch with this.
\end{enumerate}

\subsection{Step 3: Tag and final actions}
Actions:
\begin{enumerate}
	\item Create a tag XX.Y.1.
	\item In the branch, reset version to XX.Y.0
	\item Merge release folder from branch to trunk.	
	\item Release version XX.Y in Jira (select Project, Settings (wheel), Versions. Select version XX.Y, choose action Release).
\end{enumerate}

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

\bibliography{../DAM_references/dam_references}

\appendix

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Dll checklist} 
\label{DllChecklist} 

\section{Deltares.Geo.Common}
git: Geo-Common

\section{Deltares.WaternetCreator}
git: Waternet-Creator
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Deltares.Geo.Common & & nuget \\ \hline 
\end{tabularx}

\section{Deltares.MacroStability}
git: Macrostability-Kernel
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Deltares.Geo.Common & & nuget \\ \hline 
	Deltares.WaternetCreator & & nuget \\ \hline 
\end{tabularx}

\section{Deltares.MacroStability.CSharpWrapper (Deterministic)}
git: Macrostability-CSharpWrapper
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Deltares.Geo.Common & & lib\textbackslash MacroStabilityReliability \\ \hline 
	Deltares.MacroStability & & lib\textbackslash MacroStabilityReliability \\ \hline 
	Deltares.Mathematics & & lib\textbackslash MacroStabilityReliability \\ \hline 
	Deltares.SearchAlgorithms & & lib\textbackslash MacroStabilityReliability \\ \hline 
	Deltares.SoilStress & & lib\textbackslash MacroStabilityReliability \\ \hline 
	Deltares.WaternetCreator & & lib\textbackslash MacroStabilityReliability \\ \hline 
\end{tabularx}
\Note{The CSharpWrapper dll and all the dll's that depend on it are merged into one dll with the tool ILMerge. 
	The dll is called Deltares.MacroStability.CSharpWrapper.dll. 
	This merge is done in the Teamcity pipeline.
	This was done to avoid dll version conflicts. 
	The resulting dll only supports deterministic calculation.}

\section{Deltares.StixFileWriter}
git: Macrostability-StixFileWriter
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Components.Persistence.Stability.Version1 & & nuget \\ \hline 
	Components.Persistence.Stability.Version2 & & nuget \\ \hline 
	Deltares.MacroStability.CSharpWrapper & & lib\textbackslash MacrostabilityCSharp \newline WrapperDeterministic \\ \hline 
	DGeoSuite.Common & & nuget (implicit) \\ \hline 
	DGeoSuite.Common.Persistence & & nuget (implicit) \\ \hline 
\end{tabularx}

\section{Deltares.WTIPiping}
git: DikesPiping
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Deltares.Geo.Common & & nuget \\ \hline 
\end{tabularx}

\section{DamEngine}
\label{app:DamEngine}
svn: dam\textbackslash DamEngine
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Components.Persistence.Stability.Version1 & & nuget (implicit via StixFileWriter) \\ \hline 
	Components.Persistence.Stability.Version2 & & nuget (implicit via StixFileWriter) \\ \hline 
	Deltares.Geo.Common.Standard & & nuget (impicit via WTIPiping) \\ \hline 
	Deltares.StixFileWriter & & nuget \\ \hline 
	Deltares.MacroStability.CSharpWrapper & & nuget (in StixFileWriter) \\ \hline 
	Deltares.WTIPiping & & nuget \\ \hline 
	DGeoSuite.Common & & nuget (implicit via StixFileWriter)\\ \hline 
	DGeoSuite.Common.Persistence & & nuget (implicit via StixFileWriter) \\ \hline 
\end{tabularx}

\section{DamUI}
\label{app:DamUI}
svn: dam\textbackslash DamClients\textbackslash DamUI
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Components.Persistence.Stability.Version1 & & nuget (implicit)\\ \hline 
	Components.Persistence.Stability.Version2 & & nuget \\ \hline 
	Deltares.DamEngine.Calculators & & nuget (implicit) \\ \hline 
	Deltares.DamEngine.Data & & nuget \\ \hline 
	Deltares.DamEngine.Interface & & nuget \\ \hline 
	Deltares.DamEngine.Io & & nuget \\ \hline 
	Deltares.Geo.Common.Standard & & nuget (implicit) \\ \hline 
	Deltares.Geographic & & nuget (implicit)\\ \hline 
	Deltares.Geometry & & nuget (implicit)\\ \hline 
	Deltares.Geometry.Forms & & nuget (implicit)\\ \hline 
	Deltares.GeoTechnics & & nuget \\ \hline 
	Deltares.GeoTechnics.Forms & & nuget \\ \hline 
	Deltares.MacroStability.CSharpWrapper & & nuget (implicit) \\ \hline 
	Deltares.Mathematics.DSL & & nuget (implicit)\\ \hline 
	Deltares.Probabilistic & & nuget (implicit)\\ \hline 
	Deltares.Standard & & nuget \\ \hline 
	Deltares.Standard.Forms & & nuget (implicit)\\ \hline 
	Deltares.Standard.Forms.DExpress & & nuget (implicit)\\ \hline 
	Deltares.Standard.Forms.Maps & & nuget \\ \hline 
	Deltares.Standard.Maps & & nuget \\ \hline 
	Deltares.StixFileWriter & & nuget (implicit) \\ \hline 
	Deltares.WTIPiping & & nuget (implicit) \\ \hline 
	DGeoSuite.Common & & nuget (implicit)\\ \hline 
    DGeoSuite.Components.Persistence & & nuget (implicit) \\ \hline 
	Authorization\footnote{This a group of dll's\label{footnote_dlls}}& & lib\textbackslash Authorization \\ \hline 
	DevExpress\textsuperscript{\ref{footnote_dlls}}& & lib\textbackslash DevExpress \\ \hline 
	DotSpatial\textsuperscript{\ref{footnote_dlls}}& & lib\textbackslash DotSpatial \\ \hline 
\end{tabularx}

\section{DamLive}
\label{app:DamLive}
svn: dam\textbackslash DamClients\textbackslash DamLive
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|X|p{1.5cm}|p{4.1cm}|} \hline
	\textbf{dll} & \textbf{version} & \textbf{location} \\ \hline
	Components.Persistence.Stability.Version1 & & nuget (implicit) \\ \hline 
	Components.Persistence.Stability.Version2 & & nuget (implicit) \\ \hline 
	Deltares.DamEngine.Calculators & & nuget (implicit) \\ \hline 
	Deltares.DamEngine.Data & & nuget \\ \hline 
	Deltares.DamEngine.Interface & & nuget \\ \hline 
	Deltares.DamEngine.Io & & nuget \\ \hline 
	Deltares.Geo.Common.Standard & & nuget (implicit) \\ \hline 
	Deltares.Geographic & & nuget (implicit)\\ \hline 
	Deltares.Geometry & & nuget (implicit)\\ \hline 
	Deltares.GeoTechnics & & nuget \\ \hline 
	Deltares.MacroStability.CSharpWrapper & & nuget (implicit) \\ \hline 
	Deltares.Mathematics.DSL & & nuget (implicit)\\ \hline 
	Deltares.Probabilistic & & nuget (implicit)\\ \hline 
	Deltares.Standard & & nuget \\ \hline 
	Deltares.Standard.Maps & & nuget \\ \hline 
	Deltares.StixFileWriter & & nuget (implicit) \\ \hline 
	Deltares.WTIPiping & & nuget (implicit) \\ \hline 
	DGeoSuite.Common & & nuget (implicit)\\ \hline 
	DGeoSuite.Components.Persistence & & nuget (implicit) \\ \hline 
	Authorization\textsuperscript{\ref{footnote_dlls}} & & lib\textbackslash Authorization \\ \hline 
	DotSpatial\textsuperscript{\ref{footnote_dlls}} & & lib\textbackslash DotSpatial \\ \hline 
\end{tabularx}

\pagestyle{empty}
\mbox{}

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