\subsection{Output requirements}

This section lists requirements related 
to the output of the program.

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP1\\
& \\
Name: & Writing output into a file\\
& \\
Description: & The program must be able to write output into a file. \\
& \\
Rationale: & Files are much easier to use than standard output. The program output may be 
thousands of lines.\\
& \\
Priority: & Essential\\
& \\
Stability: & Stable\\
& \\
Source: & Marko Salmenkivi \\
\hline
\end{tabular}
\vspace{.5cm}

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP2\\
& \\
Name: & Output file names\\
& \\
Description: & The user must be able to specify the file names of the output files.\\
& \\
Rationale: & \\
& \\
Priority: & Essential\\
& \\
Stability: & Stable\\
& \\
Source: &  Marko Salmenkivi\\
\hline
\end{tabular}
\vspace{.5cm}

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP3\\
& \\
Name: & The output\\
& \\
Description: & The output of the program consists of points of the given variables' posterior distributions. The columns contain values of the parameters and the lines represent different iterations. \\
& \\
Rationale: & This is the primary aim of the program. \\
& \\
Priority: & Essential\\
& \\
Stability: & Stable \\
& \\
Source: & Marko Salmenkivi\\
\hline
\end{tabular}
\vspace{.5cm}

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP4\\
& \\
Name: & Information written to output files\\
& \\
Description: & There should be some information about the simulation in the beginning of the output file: the number of iterations and burn-in iterations, the thinning factor and the name of the model (if specified). There should also be information about the names of the variables whose values the output describes. The lines that contain this information must begin with a \#-sign.\\
& \\
Rationale: & The user would like to compare the outputs of different simulations. This information helps the user to identify different simulations.\\
& \\
Priority: & Essential\\
& \\
Stability: & Unstable - More or different information might be desired.\\
& \\
Source: & Marko Salmenkivi\\
\hline
\end{tabular}
\vspace{.5cm}

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP5\\
& \\
Name: & Summary of the simulation\\
& \\
Description: & The program should write a summary about the simulation into a separate file. The summary contains the number of proposed changes and the frequency of successful changes for each parameter.\\
& \\
Rationale: & The user migh want to gain information about which parameters are difficult to update.\\
& \\
Priority: & Conditional\\
& \\
Stability: & Stable\\
& \\
Source: & Marko Salmenkivi\\
\hline
\end{tabular}
\vspace{.5cm}

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP6\\
& \\
Name: & File access check\\
& \\
Description: & The program must check if the output file is available to be written before beginning the simulation. If not, the program must print an error message.\\
& \\
Rationale: & It would be very frustrating if instead of results after running a simulation the user would get nothing.\\
& \\
Priority: & Conditional\\
& \\
Stability: & Stable\\
& \\
Source: & Joonas Kukkonen\\
\hline
\end{tabular}
\vspace{.5cm}

% DEPRECATED
%\begin{tabular}[]{| l p{10cm} |}
%\hline
%Id: & OP7 \\
%& \\
%Name: & Run-time file access check \\
%& \\
%Description: & If a file cannot be written to during the simulation, the %program should prompt for a new file. \\
%& \\
%Rationale: & If, for example, disk space runs out on a disk, it would be useful to specify a file on another partition.\\
%& \\
%Priority: & Optional\\
%& \\
%Stability: & Stable\\
%& \\
%Source: & Joonas Kukkonen\\
%\hline
%\end{tabular}
%\vspace{.5cm}

\begin{tabular}[]{| l p{10cm} |}
\hline
Id: & OP8\\
& \\
Name: & Continuing the simulation \\
& \\
Description: & The last values of the simulation could be saved into a separate file and it could be possible to automatically use them as initial values for another run of the simulation. (That means that the initial values could be read from a separate file.) \\
& \\
Rationale: & This makes it possible to run a simulation easily in multiple parts.\\
& \\
Priority: & Optional\\
& \\
Stability: & Stable\\
& \\
Source: & Marko Salmenkivi\\
\hline
\end{tabular}
\vspace{.5cm}

%\begin{itemize}
%\item The program must be able to write the output to a file. The format will be...?
%\item The output will be points in the given variable's (variables'?) posterior distribution. The variables are defined how...?
%\item The simulation technical parameters will affect the format of the output.
%\item The user must be able to specify the file the output will be written to.
%\item There must be some information about the simulation in the beginning of the output file...?
%\item The program must ensure that the output file is available to be written to before beginning the simulation.
%\item The program must ask for a new output file, if the given output file cannot be written in.
%\end{itemize}
