\documentclass[10pt,letterpaper]{article}
\usepackage[top=0.85in,left=2.75in,footskip=0.75in]{geometry}

% Use adjustwidth environment to exceed column width (see example table in text)
\usepackage{changepage}

% Use Unicode characters when possible
\usepackage[utf8x]{inputenc}

% textcomp package and marvosym package for additional characters
\usepackage{textcomp,marvosym}

% fixltx2e package for \textsubscript
\usepackage{fixltx2e}

% amsmath and amssymb packages, useful for mathematical formulas and symbols
\usepackage{amsmath,amssymb}

% cite package, to clean up citations in the main text. Do not remove.
\usepackage{cite}

% Use nameref to cite supporting information files (see Supporting Information section for more info)
\usepackage{nameref,hyperref}

% line numbers
\usepackage[right]{lineno}

% ligatures disabled
\usepackage{microtype}
\DisableLigatures[f]{encoding = *, family = * }

\usepackage{multirow}
%\usepackage{multicolumn}

\usepackage{chngcntr}

\usepackage{soul, color, xcolor}

%this makes the \clines more thick
\newlength{\arrayrulewidthOriginal}
\newcommand{\Cline}[2]{%
  \noalign{\global\setlength{\arrayrulewidthOriginal}{\arrayrulewidth}}%
  \noalign{\global\setlength{\arrayrulewidth}{#1}}\cline{#2}%
  \noalign{\global\setlength{\arrayrulewidth}{\arrayrulewidthOriginal}}}

% Remove comment for double spacing
%\usepackage{setspace} 
%\doublespacing

% Text layout
\raggedright
\setlength{\parindent}{0.5cm}
\textwidth 5.25in 
\textheight 8.75in

% Bold the 'Figure #' in the caption and separate it from the title/caption with a period
% Captions will be left justified
\usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,justification=raggedright,singlelinecheck=off]{caption}
\renewcommand{\figurename}{Fig}

% Use the PLoS provided BiBTeX style
\bibliographystyle{plos2015}

% Remove brackets from numbering in List of References
\makeatletter
\renewcommand{\@biblabel}[1]{\quad#1.}
\makeatother

% Leave date blank
\date{}

% Header and Footer with logo
\usepackage{lastpage,fancyhdr,graphicx}
\usepackage{epstopdf}
\pagestyle{myheadings}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{27.023pt}
\lhead{\includegraphics[width=2.0in]{PLOS-submission.eps}}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}}
\fancyheadoffset[L]{2.25in}
\fancyfootoffset[L]{2.25in}
\lfoot{\sf PLOS}

%% Include all macros below

\newcommand{\lorem}{{\bf LOREM}}
\newcommand{\ipsum}{{\bf IPSUM}}

%% Algorithm package
\usepackage{algorithmic}

%% END MACROS SECTION


\begin{document}

\section*{S2 Appendix.}
\label{S2_Appendix}
{\bf Ultradian endocrine model} 

The primary state variables are the glucose 
concentration
$G$, the plasma insulin concentration $I_{p}$, and the interstitial 
insulin concentration $I_{i}$; these three state variables are appended
with a three stage filter $(h_1,h_2,h_3)$ which reflects the response
of the plasma insulin to glucose levels \cite{sturis_91}. The resulting 
ordinary differential equations take the form \cite{keenerII}:
\begin{subequations}
\label{eq:model1}
\begin{eqnarray}
\frac{dI_p}{dt} & = &  f_1(G)-E\bigl(\frac{I_{p}}{V_{p}}-\frac{I_i}{V_{i}}\bigr)-\frac{I_{p}}{t_{p}}\\
\frac{dI_i}{dt} & = & E\bigl(\frac{I_{p}}{V_{p}}-\frac{I_i}{V_{i}}\bigr)-\frac{I_{i}}{t_{i}}\\
\frac{dG}{dt} & = & f_4(h_3)+I_{G}(t)-f_2(G)-f_3(I_i)G\\
\frac{dh_1}{dt} & = & \frac{1}{t_d}\bigl(I_p-h_1\bigr) \\
\frac{dh_2}{dt} & = & \frac{1}{t_d}\bigl(h_1-h_2\bigr) \\
\frac{dh_3}{dt} & = & \frac{1}{t_d}\bigl(h_2-h_3\bigr)
\end{eqnarray}
\end{subequations}


The \emph{major} parameters include: \emph{(i)} $E$, a rate constant for exchange of
insulin between the plasma and remote compartments; \emph{(ii)} $I_G$,
the exogenous (externally driven) glucose delivery rate; \emph{(iii)}
$t_p$, the time constant for plasma insulin degradation; \emph{(iv)}
$t_i$, the time constant for the remote insulin degradation;
\emph{(v)} $t_d$, the delay time between plasma insulin and glucose
production; \emph{(vi)} $V_p$, the volume of insulin distribution in
the plasma; \emph{(vii)} $V_i$, the volume of the remote insulin
compartment; \emph{(viii)} $V_g$, the volume of the glucose space \cite{dyn_pheno} .
$f_1(G)$ represents the rate of insulin production;
$f_2(G)$ represents insulin-independent glucose utilization;
$f_3(I_i)G$ represents insulin-dependent glucose utilization;
$f_4(h_3)$ represents delayed insulin-dependent glucose utilization;

\begin{eqnarray}
f_1(G) & = & \frac{R_m}{1+ \exp(\frac{-G}{V_g c_1} + a_1)} \\
f_2(G) & = & U_b(1-\exp(\frac{-G}{C_2V_g})) \\
f_3(I_i) & = & \frac{1}{C_3 V_g}( U_0 + \frac{U_m - U_0}{1 + (\kappa I_i)^{-\beta}}) \\
f_4(h_3) & = & \frac{R_g}{1 + \exp(\alpha (\frac{h_3}{C_5 V_p}  -1))} \\
\kappa & = & \frac{1}{C_4} (\frac{1}{V_i} - \frac{1}{E t_i})
\end{eqnarray}


The nutritional driver of the model $I_G(t)$ is defined over $N$ discrete nutrition events \cite{dyn_pheno}, where $k$ is the decay constant and event $j$ occurs at time $t_j$ with carbohydrate quantity $m_j$
\begin{equation}
I_G(t) = \sum^N_{j=1}{\frac{m_j k}{60}\exp(k(t_j-t))} \text{where } N=\#\{t_j<t\}
\end{equation}

\begin{figure}
\centering
\includegraphics[width=7.8cm,height=6.5cm]{UltradianSteadyState.png}
\caption{Simulation of post-prandial ultradian glucose oscillations returning to equilibrium.
This simulation was performed for a 45 g carbohydrate meal, and employed the initial conditions
and parameter values reported by Sturis \emph{et al.} \cite{sturis_91} }
\label{fig:ultradian_dynamics}
\end{figure}


\begin{table}[!ht]
\begin{adjustwidth}{-2.25in}{0in} % Comment out/remove adjustwidth environment if table fits in text column.
\centering
\caption{Full list of parameters for the ultradian glucose-insulin model \cite{keenerII}. Note that IIGU and IDGU denote insulin-independent glucose utilization and insulin-dependent glucose utilization, respectively.}
\begin{tabular}{|p{1.2cm}|p{2.7cm}|p{8cm}|}
\hline
\multicolumn{3}{|p{8cm}|}{\textbf{Ultradian model parameters}} \\ \hline
\Cline{2pt}{1-3} \hline
\Cline{2pt}{1-3}
Name & Nominal Value  & Meaning \\ \hline \hline
$V_p$  & $3$ l  & plasma volume  \\ \hline \hline
$V_i$  & $11$ l  & interstitial  volume \\ \hline \hline
$V_g$ & $10$ l  & glucose space \\ \hline \hline
$E$  & $0.2$ l min$^{-1}$ &   exchange rate for insulin between remote
and plasma compartments \\ \hline \hline
$t_p$  & $6$ min  & time constant for plasma insulin degradation (via
kidney and liver filtering) \\ \hline \hline
$t_i$  & $100$ min & time constant for remote insulin degradation (via
muscle and adipose tissue) \\ \hline \hline
$t_d$  & $12$ min  & delay between plasma insulin and glucose
production \\ \hline \hline
$k$  & $0.5$ min$^{-1}$  & rate of decayed appearance of ingested glucose \\ \hline \hline
$R_m$  & $209$ mU min$^{-1}$  & linear constant affecting insulin secretion  \\ \hline \hline
$a_1$  & $6.6$ & exponential constant affecting insulin secretion \\ \hline \hline
$C_1$  & $300$ mg l$^{-1}$ & exponential constant affecting insulin secretion \\ \hline \hline
$C_2$  & $144$ mg l$^{-1}$  & exponential constant affecting IIGU \\ \hline \hline
$C_3$  & $100$ mg l$^{-1}$  & linear constant affecting IDGU \\ \hline \hline
$C_4$  & $80$ mU l$^{-1}$ & factor affecting IDG \\ \hline \hline
$C_5$  & $26$ mU l$^{-1}$  & exponential constant affecting IDGU \\ \hline \hline
$U_b$  & $72$ mg min$^{-1}$  & linear constant affecting IIGU \\ \hline \hline
$U_0$  & $4$ mg min$^{-1}$ & linear constant affecting IDGU \\ \hline \hline
$U_m$  & $94$ mg min$^{-1}$  &  linear constant affecting IDGU \\ \hline \hline
$R_g$  & $180$ mg min$^{-1}$  & linear constant affecting IDGU \\ \hline \hline
$\alpha$  & $7.5$ & exponential constant affecting IDGU \\ \hline \hline
$\beta$  & $1.772$ & exponent affecting IDGU \\ \hline \hline
\end{tabular}
\label{table:model_parameters}
\end{adjustwidth}
\end{table}

\clearpage


\begin{thebibliography}{10}

% \bibitem{kalman_nn_ukf}
% Wan EA, Merwe RVD.
% \newblock The Unscented Kalman Filter.
% \newblock In: Kalman Filtering and Neural Networks. Wiley; 2001. p. 221--280.

% \bibitem{dual_ukf}
% Gove J, Hollinger D.
% \newblock Application of a dual unscented {K}alman for simultaneous state and
%   parameter estimation problems of surface-atmospher exchange.
% \newblock J Geophys Res. 2006;111:DO8S07.

\bibitem{sturis_91}
Sturis J, Polonsky KS, Mosekilde E, Cauter EV.
\newblock Computer model for mechanisms underlying ultradian oscillations of
  insulin and glucose.
\newblock Am J Physiol Endocrinol Metab. 1991;260:E801--E809.

\bibitem{keenerII}
Keener J, Sneyd J.
\newblock Mathematical physiology II: Systems physiology.
\newblock Springer; 2008.

\bibitem{dyn_pheno}
Albers D, Elhadad N, Tabak E, Perotte A, Hripcsak G.
\newblock Dynamical Phenotyping: Using Temporal Analysis of Clinically
  Collected Physiologic Data to Stratify Populations.
\newblock PLoS One. 2014;6:e96443.

% \bibitem{dalla_man}
% Man CD, Rizza R, Corbelli C.
% \newblock Meal simulation model of the glucose-insulin system.
% \newblock IEEE Transactions on biomedical engineering. 2007;54:1740--1749.

% \bibitem{dalla_man_system_2006}
% Dalla~Man C, Camilleri M, Cobelli C.
% \newblock A {System} {Model} of {Oral} {Glucose} {Absorption}: {Validation} on
%   {Gold} {Standard} {Data}.
% \newblock IEEE Transactions on Biomedical Engineering. 2006;53(12):2472--2478.
% \newblock doi:{10.1109/TBME.2006.883792}.


\end{thebibliography}


\nolinenumbers


\end{document}