\documentclass[letterpaper,11pt]{article}
%\VignetteIndexEntry{Introduction to PBSddesolve}
%\VignettePackage{PBSddesolve}
\usepackage{Sweave}

% For colors
\usepackage{color}
\definecolor{red}{rgb}{0.8039216,0.2156863,0}
\definecolor{green}{rgb}{0, 1, 0}
\definecolor{blue}{rgb}{0, 0, 1}

% Definitions
\newcommand{\pbsd}{\texttt{PBSddesolve}}
\newcommand{\pbsm}{\texttt{PBSmodelling}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\bold}[1]{\textbf{#1}}
%\newcommand{\ital}[1]{\textit{#1}}
%\newcommand{\under}[1]{{\underline {#1}}}
%\newcommand{\red}[1]{{\textcolor{red} {#1}}}

% Keep on one page
\usepackage[letterpaper, top=0.5in, bottom=0.5in, left=1in, right=1in, footskip=0in, headheight=0.5in]{geometry}

\usepackage{hyperref}
\hypersetup{colorlinks=true, plainpages=true, linkcolor=black, citecolor=black, urlcolor=blue}

\renewcommand{\rmdefault}{phv}% Helvetica
\renewcommand{\sfdefault}{phv}% Helvetica
%\renewcommand{\ttdefault}{pcr}% Courier
\usepackage[scaled=1.05]{inconsolata}
\renewcommand{\ttdefault}{zi4}% Inconsolata

\usepackage{titlesec}
\titlespacing*{\section}
{0pt}{1\baselineskip}{0.5\baselineskip}

\begin{document}

\title{Introduction to PBSddesolve}
\author{Jon T. Schnute, Alex Couture-Beil, and Rowan Haigh}
\date{February 1, 2023}
\maketitle

\section{What is PBSddesolve?}

\pbsd{} generates numerical solutions for systems of delay differential equations (DDEs) and ordinary differential equations (ODEs).
The numerical routines come from Simon Wood's program \href{https://www.maths.ed.ac.uk/~swood34/simon/dde.html}{\code{solve95}}, originally written in C for the Microsoft Windows operating system.
With \pbsd{}, a user can write the gradient code for a system of DDEs or ODEs in the R language, rather than in C.
The code will then run on all platforms supported by R, and the results can be inspected using R's extensive graphics capabilities.
Simon generously gave us permission to publish \pbsd{} (including his embedded routines) under the GNU GENERAL PUBLIC LICENSE Version 2.

\section{What is PBS?}

The initials \bold{PBS} refer to the \href{http://www.pac.dfo-mpo.gc.ca/science/facilities-installations/index-eng.html#pbs}{Pacific Biological Station}, a major fisheries laboratory operated by Fisheries and Oceans Canada on the Pacific coast in Nanaimo, British Columbia, Canada.

\section{Where is the User's Guide?}

The R library directory \code{./library/PBSddesolve/doc} includes a complete User's Guide\\ \code{PBSddesolve-UG.pdf}. 
To use this package effectively, please consult the Guide.
Simon's user guide for \code{solve95} can also be found in this directory.

\section{What demos are available?}

\pbsd{} includes four examples (\code{`blowflies'}, \code{`cooling'}, \code{`icecream'}, \code{`lorenz'}) that are fully documented in the User's Guide.
\vspace*{1ex} They can be run two ways:\\
\noindent 1. Using the `utils' package `demo' function, run the command:\\
\vspace*{1ex} \code{demo(icecream, package=`PBSddesolve', ask=FALSE)}\\
\noindent 2. Using the package `PBSmodelling', run the commands:\\
\vspace*{1ex} \code{require(PBSmodelling); runDemos()}\\
The latter produces a GUI that shows all demos available from locally installed packages.
Choose \pbsd{}. 
Note that the examples are run in the temporary working environment \code{.PBSddeEnv}.

\section{References}
%\vspace*{3ex} \noindent {\bf \Large References}

Schnute, J.T., Couture-Beil, A., and Haigh, R. (2016) A user's guide to the R package\\ \pbsd{}, version 1.12.1, April 18, 2016. 17\,p.\\\\[-0.75ex]
Wood, S.N. (1999) \code{Solv95}: a numerical solver for systems of delay differential equations with switches. Saint Andrews, UK. 10\,p.

\end{document}
