% !TeX encoding = UTF-8 Unicode
% !TeX root = manual.tex
% !TeX spellcheck = en_GB


\chapter{Introduction}
These packages provide functions for the computation of the joint spectral radius of a finite set of matrices using the modified invariant polytope algorithm
as well as functions for the work with multiple, multivariate, stationary subdivision schemes.
Some functions work also for symbolic matrices/subdivision schemes.

\section{System requirements}

In order to use the packages, you need at least Matlab R2016b.

The \texttt{sequence}- and the \texttt{subdivision}-package depend on the Matlab \texttt{Symbolic Math Toolbox} and the  
\texttt{Signal Processing Toolbox} but also run without the latter.
The \texttt{sequence}- and the \texttt{tjsr}-package depend on the Matlab \texttt{Parallel Computing Toolbox} but should run without it.
If these toolboxes are not installed, they can be installed as described in the Matlab documentation.

All other external, necessary toolboxes and functions are included in this package. These are
the \emph{TTEST}s~test-suite~v0.3, the \emph{SeDuMi} solver~v1.32 and the \emph{JSR-Toolbox}~v1.2b.

\section{Installation}
In order to install the \texttt{t}-packages do the following steps:

\begin{enumerate}

\item This package works with the \emph{Gurobi} solver and the Matlab \verb|linprog| solver, despite much slower with the latter since some optimizations of the modified invariant polytope algorithm are not possible to be realized with \verb|linprog|.

\item If you have not installed the \emph{Gurobi} solver yet and you want to use it, 
you should install it.
As of March~2019, the installation works as follows for academic users:
\begin{itemize}\label{install_gurobi}
    \item Download the Gurobi solver from 
    \href{http://www.gurobi.com/}{{\itshape http://www.gurobi.com/}} and
    extract the archive in a folder of your choice. 
    Do not choose a path which has blanks, i.e.\ instead of e.g.\ \texttt{/Gurobi 8/} use \texttt{/Gurobi\_8/}.
    
    \item Obtain a free academic licence. For that, open a shell, and execute in the
    \texttt{bin} subdirectory where you extracted the \texttt{Gurobi} files 
    the command which you find on the Gurobi page under the link 
    \emph{Free Academic License}. 
    The command looks like this 
    "\texttt{grbgetkey 1eb9501e-4e90-13e2-a19f-02e454bb2c50}".
    
    If this command fails, add "\texttt{./}" in front of the command, 
    i.e.\ instead of the above command, type 
    "\texttt{./grbgetkey 1eb9501e-4c91-11e9-a19f-02e454ff9c50}"
    If this command still fails, make sure you are connected to your universities network.
    
    If you are asked questions during the exectution of the command, always use the proposed default values, i.e.\ just press \emph{Enter}.
    
    \item At last, in Matlab run \verb|gurobi_setup| and \verb|savepath| afterwards.
        
\end{itemize}

\item \label{install_copy}
Copy the content of this archive 
(i.e.\ the folders \verb|TTEST| and \verb|ttoolboxes|)
into the directory of your choice.
In Matlab run the file \verb|setupt|, in the folder \texttt{ttoolboxes}.
This file adds all packages to the Matlab path and runs a self-test of all included functions.
If the test fails, you may run 
\texttt{runtests('testcell')},
\texttt{runtests('testdouble')},
\texttt{runtests('testm')},
\texttt{runtests('testsequence')},
\texttt{\justify runtests('testsubdivison')},
\texttt{runtests('testtjsr')},
\texttt{runtests('testtmisc')} or
\texttt{runtests('testTTEST')}
to test the individual packages.
\end{enumerate}

The Toolbox has been tested on several architectures (Windows, Linux, Mac) 
and Matlab versions (R2016b, R2017a, R2017b, R2018a, R2018b, R2019a).
If you encounter any problem, please contact the author at 
\begin{center}
\href{mailto:tommsch@gmx.at}{tommsch@gmx.at}.
\end{center}


%%%%%%%%%%%%%%%%%%%
% EOF
%%%%%%%%%%%%%%%%%%%