text:
\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{graphicx} % Allows including images
\usepackage[font=small,skip=10pt]{caption}
\usepackage[font=footnotesize,skip=0pt]{subcaption}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{multicol}

\usepackage{geometry}
 \geometry{
 a4paper,
 left=20mm,
 right=10mm,
 top=30mm,
 bottom=10mm,
 }
\setlength\parindent{0pt}

\newcolumntype{C}[1]{>{\centering \arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\left \arraybackslash}p{#1}}

\title{Report for CITY}
\author{}
\date{\today}

\begin{document}

\maketitle

\section*{Setup}

Start date: START-DATE

End date: END-DATE

%Transmission reduction:
%\begin{itemize}
%    \item Initial lock-down: INITIAL-LOCKDOWN-KAPPA
%    \item Lock-down: LOCKDOWN-KAPPA
%    \item Relaxation: RELAXATION-KAPPA
%\end{itemize}{}

\section*{Triggers}
\begin{figure}[!htb]
  \centering
  \setlength{\unitlength}{1cm}
    \begin{subfigure}[b]{0.475\linewidth}
    \centering
        \includegraphics[width=\linewidth]{IHD_PLOT_FILE}
        \caption{Hospitalizations  and deaths}
        \label{fig:IHD}
    \end{subfigure}
    ~
    \begin{subfigure}[b]{0.475\linewidth}
    \centering
         \includegraphics[width=\linewidth]{IYIH_PLOT_FILE}
        \caption{Daily admissions}
        \label{fig:IYIH}
    \end{subfigure}
    \caption{Triggers to enact lock-downs}\label{fig:SD90}
\end{figure}

INSERT-TRIGGER-DESCRIPTION

\newpage

\section*{Summary of statistics}

\begin{table}[th]
\centering
\begin{tabular}{p{4cm}cc}
\toprule
\multirow{3}{*}{Days   of lock-down} & Mean      & MEAN-LOCKDOWN                        \\ \cmidrule(l){2-3}
                                     & Median    & MEDIAN-LOCKDOWN                      \\ \cmidrule(l){2-3}
                                     & 5\%-95\% PI & (P5-LOCKDOWN - P95-LOCKDOWN)       \\ \midrule
\multirow{1}{*}{Paths in lock-down ( \% )} &      &         PATHS-IN-LOCKDOWN              \\   \midrule
\multirow{3}{\hsize}{Cumulative deaths}       & Mean      & MEAN-DEATHS \\ \cmidrule(l){2-3}
                                     & Median    & MEDIAN-DEATHS                        \\ \cmidrule(l){2-3}
                                     & 5\%-95\% PI & (P5-DEATHS - P95-DEATHS)           \\  \midrule
Risk Group                           & Age Group & \multicolumn{1}{c}{\% deaths}        \\  \midrule
\multirow{5}{*}{Low   risk}          & 0-4y      & DEATHS-A0-R0                         \\ \cmidrule(l){2-3}
                                     & 5-17y     & DEATHS-A1-R0                         \\ \cmidrule(l){2-3}
                                     & 18-49y    & DEATHS-A2-R0                         \\ \cmidrule(l){2-3}
                                     & 50-64y    & DEATHS-A3-R0                         \\ \cmidrule(l){2-3}
                                     & 65y+      & DEATHS-A4-R0                         \\ \midrule
\multirow{5}{*}{High   risk}         & 0-4y      & DEATHS-A0-R1                         \\ \cmidrule(l){2-3}
                                     & 5-17y     & DEATHS-A1-R1                         \\ \cmidrule(l){2-3}
                                     & 18-49y    & DEATHS-A2-R1                         \\ \cmidrule(l){2-3}
                                     & 50-64y    & DEATHS-A3-R1                         \\ \cmidrule(l){2-3}
                                     & 65y+      & DEATHS-A4-R1                         \\ \midrule
\multirow{5}{\hsize}{Probability of exceeding \% of hospital capacity} & 60\% & HOSP-P60   \\ \cmidrule(l){2-3}
                                     & 70\%      & HOSP-P70                                \\ \cmidrule(l){2-3}
                                     & 80\%      & HOSP-P80                                \\ \cmidrule(l){2-3}
                                     & 90\%      & HOSP-P90                                \\ \cmidrule(l){2-3}
                                     & 100\%     & HOSP-P100                                \\ \midrule
\multirow{3}{\hsize}{Peak COVID-19 daily hospitalizations \\ (heads in beds)} & Percentile 5 & HOSP-PEAK-P5  \\ \cmidrule(l){2-3}
                                     & Percentile 50      & HOSP-PEAK-P50    \\ \cmidrule(l){2-3}
                                     & Percentile 95     & HOSP-PEAK-P95     \\ \midrule
\multirow{3}{\hsize}{Date of peak}   & Percentile 5      & HOSP-PEAK-DATE-P5   \\ \cmidrule(l){2-3}
                                     & Percentile 50     & HOSP-PEAK-DATE-P50    \\ \cmidrule(l){2-3}
                                     & Percentile 95     & HOSP-PEAK-DATE-P95     \\  \bottomrule
\multirow{3}{\hsize}{Unserved patients} & Mean & UNSERVED-MEAN  \\ \cmidrule(l){2-3}
                                     & SD & UNSERVED-SD  \\ \cmidrule(l){2-3}
                                     & Percentile 90 & UNSERVED-P90  \\ \cmidrule(l){2-3}
                                     & Percentile 95      & UNSERVED-P95    \\ \cmidrule(l){2-3}
                                     & Percentile 99      & UNSERVED-P99    \\ \cmidrule(l){2-3}
                                     & Percentile 100     & UNSERVED-P100     \\ \midrule
\end{tabular}
\caption{Projected days of lock-down, probabilities of exceeding hospital capacity and COVID-19 mortality under the optimized strategies. All statistics are based on 300 simulations.}

\label{table:summary_table}
\end{table}

\end{document}


text:
\section*{Interpreter Support}

\begin{itemize}
\item \lstinline{apply_in_underlying_javascript(f, xs)}: \textit{primitive}, calls the function \lstinline{f}
with arguments \lstinline{xs}. For example:
\begin{lstlisting}
function times(x, y) {
   return x * y;
}
apply_in_underlying_javascript(times, list(2, 3)); // returns 6
\end{lstlisting}
\item \lstinline{parse(x)}: \textit{primitive}, returns the parse tree that results from parsing
the string \lstinline{x} as a Source program. The following two pages describe the shape of the parse tree.
\end{itemize}

\newpage
\KOMAoptions{paper=landscape,pagesize}
\recalctypearea

\begin{alignat*}{9}
&& \textit{program}    &&\quad ::= &\quad && \textit{statement} \ \ldots
                                                           && \texttt{list("sequence", list of <statement>)} \\[1mm]
&& \textit{statement}    &&\quad ::= &\quad && \textbf{\texttt{const}}\  \textit{name} \
                                           \textbf{\texttt{=}}\  \textit{expression} \ \textbf{\texttt{;}}
                                                           && \texttt{list("constant\_declaration", <name>, <expression>)} \\
&&                       && |   &\quad && \textit{let} \ \textbf{\texttt{;}}
                                                           &&  \textrm{see below}\\
&&                       && |   &\quad && \textit{assignment} \ \textbf{\texttt{;}}
                                                           && \textrm{see below}\\
&&                       && |   &\quad && \textit{expression} \textbf{\texttt{[}}
                                          \textit{expression} \textbf{\texttt{]}} \
                                           \textbf{\texttt{=}}\  \textit{expression} \ \textbf{\texttt{;}}
                                                           && \texttt{list("array\_assignment", <expression>, <expression>)} \\
&&                       && |   &\quad && \textbf{\texttt{function}}\  \textit{name} \
                                   \textbf{\texttt{(}}\  \textit{parameters} \ \textbf{\texttt{)}}\ \textit{block} \quad
                                                           &&  \textrm{treat as}:\ \textbf{\texttt{const}}\  \textit{name} \
                                   \textbf{\texttt{=}}\  \textit{parameters} \ \textbf{\texttt{=>}}\ \textit{block} \textbf{\texttt{;}} \\
&&                       && |   &\quad && \textbf{\texttt{return}}\  \textit{expression} \ \textbf{\texttt{;}}
                                                           && \texttt{list("return\_statement", <expression>)} \\
&&                       && |   &\quad && \textit{if-statement} \quad
                                                           && \textrm{see below}\\
&&                       && |   &\quad && \textbf{\texttt{while}}\
                                   \textbf{\texttt{(}}\  \textit{expression} \ \textbf{\texttt{)}} \
                                   \textit{block}
                                                           && \texttt{list("while\_loop", <expression>, <statement>)} \\
&&                       && |   &\quad && \textbf{\texttt{for}}\ \textbf{\texttt{(}} \
                                          (\ \textit{\hyperlink{for}{assignment}} \ | \  \textit{\hyperlink{for2}{let}}\ ) \textbf{\texttt{;}} \\
&&                       &&     &\quad && \ \ \ \ \ \ \ \ \ \ \textit{expression} \ \textbf{\texttt{;}} \\
&&                       &&     &\quad && \ \ \ \ \ \ \ \ \ \ \textit{assignment} \ \textbf{\texttt{)}} \
                                            \textit{block}
                                            && \texttt{list("for\_loop", <statement>, <expression>, <statement>,}\\
                                            &&&&&&&&&\ \ \ \ \ \ \texttt{ <statement>)} \\
&&                       && |   &\quad && \textbf{\texttt{break}}\ \textbf{\texttt{;}}
                                                           && \texttt{list("break\_statement")} \\
&&                       && |   &\quad && \textbf{\texttt{continue}}\ \textbf{\texttt{;}}
                                                           && \texttt{list("continue\_statement")} \\
&&                       && |   &\quad &&  \textit{block}
                                                           && \textrm{see below}\\
&&                       && |   &\quad &&  \textit{expression} \ \textbf{\texttt{;}}
                                                           && \textrm{see below}\\[1mm]
&& \textit{parameters}   && ::= &\quad &&  \epsilon\ | \  \textit{name} \
                                                   (\ \textbf{\texttt{,}} \ \textit{name}\ )\ \ldots
                                                            && \texttt{list of <name>} \\
&& \textit{if-statement} && ::= &\quad &&  \textbf{\texttt{if}}\
                                   \textbf{\texttt{(}}\ \textit{expression} \ \textbf{\texttt{)}}\
                                   \textit{block} \\
&&                       &&     &      && \textbf{\texttt{else}}\
                                          (\ \textit{block}
                                          \ | \
                                          \textit{\href{https://sicp.comp.nus.edu.sg/chapters/21\#footnote-1}{if-statement}} \ )
                                          && \texttt{list("conditional\_statement", <expression>, } \\
                                            &&&&&&&&&\ \ \ \ \ \ \texttt{<statement>, <statement>)} \\
&& \textit{block}        && ::= &      && \textbf{\texttt{\{}}\  \textit{program}   \ \textbf{\texttt{\}}} \quad
                                                           && \texttt{list("block", <statement>)} \\
&& \textit{let}          && ::= &\quad &&  \textbf{\texttt{let}}\  \textit{name} \
                                           \textbf{\texttt{=}}\  \textit{expression}
                                                            && \texttt{list("variable\_declaration", <name>, <expression>)} \\
&& \textit{assignment}   && ::= &\quad &&  \textit{name} \
                                           \textbf{\texttt{=}}\  \textit{expression}
                                                            && \texttt{list("assignment", <name>, <expression>)} \\
\end{alignat*}

\begin{alignat*}{9}
                                           && \textit{expression}   && ::= &\quad &&  \textit{number}   && \textrm{self-evaluating} \\
&&                       && |   &\quad && \textbf{\texttt{true}}\ |\ \textbf{\texttt{false}}
                                                           && \textrm{self-evaluating} \\
&&                       && |   &\quad && \textbf{\texttt{null}}
                                                           && \textrm{self-evaluating} \\
&&                       && |   &\quad &&  \textit{string}   && \textrm{self-evaluating} \\
&&                       && |   &\quad &&  \textit{name}   && \texttt{list("name", string)} \ \textrm{or}\ \texttt{list("name", string, location)} \\
&&                       && |   &\quad &&  \textit{expression} \  \textit{binary-operator} \
                                            \textit{expression} \qquad
                                                           && \texttt{list("application", <name>, list of <expression>)} \\
&&                       && |   &\quad &&   \textit{unary-operator} \
                                            \textit{expression}
                                                           && \texttt{list("application", <name>, list of <expression>)} \\
&&                       && |   &\quad &&   \textit{expression} \
                                            \textbf{\texttt{(}}\ \textit{expressions}\
                                            \textbf{\texttt{)}}
                                                           && \texttt{list("application", <expression>, list of <expression>)} \\
&&                       && |   &\quad &&   (\ \textit{name}\ | \
                                               \textbf{\texttt{(}}\ \textit{parameters}\ \textbf{\texttt{)}}\
                                            )\
                                            \texttt{\textbf{=>}}\ \textit{expression}
                                            && \texttt{list("function\_definition", <parameters>,}  \\
                                              && && & && && \texttt{list("return\_statement", <expression>))} \\
&&                       && |   &\quad &&   (\ \textit{name}\ | \
                                               \textbf{\texttt{(}}\ \textit{parameters}\ \textbf{\texttt{)}}\
                                            )\
                                            \texttt{\textbf{=>}}\ \textit{block}
                                                           && \texttt{list("function\_definition", <parameters>, <statement>)} \\
&&                       && |   &\quad &&   \textit{expression} \ \textbf{\texttt{?}}\
                                            \textit{expression}
                                            \ \textbf{\texttt{:}}\
                                            \textit{expression}\
                                                           && \texttt{list("conditional\_expression", <expression>,} \\
                                            &&&&&&&&&\ \ \ \ \ \ \texttt{<expression>, <expression>)} \\
&&                       && |   &\quad && \textit{expression} \textbf{\texttt{[}}
                                          \textit{expression} \textbf{\texttt{]}}
                                                           && \texttt{list("array\_access", <expression>, <expression>)} \\
&&                       && |   &\quad &&   \textbf{\texttt{[}}\
                                            \textit{expressions}\
                                            \textbf{\texttt{]}}
                                                           && \texttt{list("array\_expression", list of <expression>)} \\
&&                       && |   &\quad &&  \textbf{\texttt{(}}\  \textit{expression} \
                                            \textbf{\texttt{)}} && \textrm{treat as:}\ \textit{expression} \\[1mm]
&& \textit{binary-operator}    \
                        && ::= &\quad && \textbf{\texttt{+}}\ |\ \textbf{\texttt{-}}\ |\ \textbf{\texttt{*}}\ |\ \textbf{\texttt{/}}\ |\ \textbf{\texttt{\%}}\ |\
                                   \textbf{\texttt{===}}\ |\ \textbf{\texttt{!==}}\ \\
&&                       && |  &\quad &&  \texttt{\textbf{>}}\ |\ \texttt{\textbf{<}}\ |\ \texttt{\textbf{>=}}\ |\ \texttt{\textbf{<=}}\
                                          |\ \textbf{\texttt{\&\&}}\ |\ \texttt{\textbf{||}}
                                          && \texttt{list("name", string)} \\[1mm]
&& \textit{unary-operator}
                        && ::= &\quad && \textbf{\texttt{!}}\ |\ \textbf{\texttt{-}}
                        && \texttt{list("name", string)} \\
&& \textit{expressions}  && ::= &\quad && \epsilon\ | \ \textit{expression}\ (
                                                               \ \textbf{\texttt{,}} \
                                                                 \textit{expression} \
                                                                      )\ \ldots
                                                            && \texttt{list of <expression>} \\
\end{alignat*}

\newpage
\KOMAoptions{paper=portrait,pagesize}
\recalctypearea

ext: tex


text:
%%%%%%%%%%
% AVOIDS "x to a" definition derivative, lest fuss with f'(a) vs f'(x)
% AVOIDS "x to a" proof of power rule (slick, but less insight)
%%%%%%%%%%

\documentclass[17pt, handout]{beamer}
\usetheme{Pittsburgh}
\setbeamertemplate{enumerate items}[default]
%\setbeamercovered{transparent}
\usepackage[thicklines]{cancel}
\usepackage{mathtools, multicol, tikz-cd}
%\usepackage{stackengine}
%\stackMath
\theoremstyle{remark}
\newtheorem{exercise}{Exercise}
\newtheorem{plickers}{Exercise}
%\newtheorem{plickers}{Plickers Exercise}
\AtBeginSection[]{
	\begin{frame}\relax
	\tableofcontents[currentsection]
	\end{frame}
	}

\begin{document}
%\section{Power Rule}
\begin{frame}
\begin{theorem}[Power Rule]
\[\Big(x^n\Big)' = \pause nx^{n-1}\]
\end{theorem}

\pause
\begin{plickers}
Find the derivative of $f(x) = x^3$.
\begin{multicols}4
\begin{enumerate}[A.]
\item $3x^2$ \item $3x$ \item $6x$ \item $6$
\end{enumerate}
\end{multicols}
\end{plickers}
\end{frame}

\begin{frame}
\begin{fact}
\par\bigskip
$(x+h)^2 = \pause x^2 + 2xh + h^2$ \pause\par\bigskip
$(x+h)^3 = \pause x^3 + 3x^2h + 3xh^2 + h^3$ \pause\par\bigskip
$(x+h)^4 = x^4 + 4x^3h + 6x^2h^2 + 4xh^3 + h^4$ \pause\par\bigskip\bigskip

%$(x+h)^3 = \pause x^3 + 3x^2h +
%	\uncover<5->(
%	3x\uncover<-4>{h^2} +
%	h\uncover<-4>{^3}
%	\uncover<5->{)h^2}$ \pause[6]
%
%$(x+h)^3 = \pause x^3 + 3x^2h + \uncover<-4>{3xh^2 + h^3}$
%\pause\par
%$\phantom{(x+h)^3 = x^3 + 3x^2h + {}} \mathllap(3x\phantom{h^2}+h\phantom{^3})h^2$

$\phantom{(x+h)^n = {}}x^n \pause + nx^{n-1}h \pause \quad+\quad (\hspace{0.6ex}\cdots)h^2$

%\Large\quad$
%	x^n \quad nx^{n-1}\!h \quad (\,\cdots)h^2
%	$
\end{fact}
\end{frame}

%%%%%%%%%%%%%%%
% OLD STYLE PROOF
%%%%%%%%%%%%%%%
%\begin{frame}
%\begin{proof}
%Fix a positive integer $n$.
%\vspace{-1.5ex}
%\begin{align*}
%	f(x) &= x^n
%	&&\text{(given)} \\
%	f'(x) &= \lim_{h\to0} \textstyle \frac{f(x+h) - f(x)}h
%	&&\text{(definition)} \\
%	&= \lim_{h\to0} \textstyle \frac{(x+h)^n - x^n}h
%	&&\text{(sub in $f$)} \\
%	&= \lim_{h\to0} \textstyle \frac{x^n + nx^{n-1}h + (\,\cdots)h^2 \,\,-\,\, x^n}h
%	&&\text{(use fact)} \\
%	&= \lim_{h\to0} \textstyle \frac{nx^{n-1}h}h + \frac{(\,\cdots)h^2}h \\
%	&= nx^{n-1} &&\qedhere
%	\end{align*}
%\end{proof}
%\end{frame}

%%%%%%%%%%%%%%%
% NEW STYLE PROOF
%%%%%%%%%%%%%%%
%\newcommand\mystack[3]{\overset{\mathclap{\substack{\textstyle #3 \\[1.5ex] \textstyle #2 \vphantom) \\[1.5ex]}}}{\quad\,\,#1\quad\,\,}}
%\begin{frame}
%\begin{proof}
%Fix a positive integer $n$.
%Let $f(x) = x^n$.
%\begin{align*}
%	f'(x) &= \lim_{h\to0}
%	\frac{
%		\mystack{f(x+h)}{(x+h)^n}{
%			\bcancel{x^n}
%			+ nx^{n-1}\bcancel h
%			+ (\,\cdots)h^{\bcancel2}
%			}
%		- \mystack{f(x)}{x^n}{}
%		}{\bcancel h}
%	\\[1.5em] &= nx^{n-1} \qedhere
%	\end{align*}
%\end{proof}
%\end{frame}

%%%%%%%%%%%%%%%
% NEWer STYLE PROOF
%%%%%%%%%%%%%%%

\begin{frame}
\begin{block}{Proof (Power Rule)}
Fix a positive integer $n$.
Let $f(x) = x^n$. So,

\bigskip\pause
\phantom{=}
$\uncover<8->{\lim_{h\to0}}
	\uncover<5->{\Big(}
	f(x+h) \uncover<3->{{}- f(x)}
	\uncover<5->{\Big)\Big(\tfrac1h\Big)}$

\bigskip
= $\uncover<8->{\lim_{h\to0}}
	\uncover<5->{\Big(}
	\alt<-3>{x^n}{\bcancel{x^n}}
	+ nx^{n-1}\alt<-5>h{\bcancel h}
	+ (\cdots\hspace{-0.1ex})h\alt<-5>{^2}{^{\bcancel2}}
	\uncover<3->{{}-\alt<-3>{x^n}{\bcancel{x^n}}}
	\uncover<5->{\Big)\Big(\tfrac1{\alt<-5>h{\bcancel h}}\Big)}$

\bigskip\pause[7]
= $\uncover<8->{\lim_{h\to0}} \phantom{\Big(} nx^{n-1} + (\cdots\hspace{-0.1ex})h$

\bigskip\pause\pause
= $\phantom{\lim_{h\to0}\Big(}nx^{n-1}$
\end{block}
\end{frame}

\end{document}

max_stars_repo_name: gatewaycat/latex

max_issues_repo_name: gatewaycat/byzorn

max_forks_repo_name: gatewaycat/byzorn


text:
\section{Baseline without Middleware (75 pts)\label{sec:2}}

    This experiment serves to establish a baseline of the system without the involvement of a middleware. The
    experimental parameters for experiments run are documented in table \ref{tab:20_setup}.

    Two configurations are tested, one \srv{} with three \cli{}s and two \srv{}s with one \cli{}. The goal is to infer
    system limits and find out if even without the involvement of a middleware limits below the theoretical maximum are
    reached.

    As each memtier instance can only connect to a single target (i.e. \srv{}) to keep the behaviour consistent between
    experiments each \cli{} connects, to keep both cores saturated, either with two threads for a single virtual target
    (as is the case in experiment \ref{subsec:2_one-server}) or one thread for a single target (experiment
    \ref{subsec:2_two-servers} \textemdash here two physical targets exist).

    \begin{table}
        \scriptsize{
            \begin{tabular}{|l|c|}
                \hline Number of servers                & 1 (2.1) / 2 (2.2) \\
                \hline Number of client machines        & 3 (2.1) / 1 (2.2) \\
                \hline Instances of memtier per machine & 1 (2.1) / 2 (2.2) \\
                \hline Threads per memtier instance     & 2 (2.1) / 1 (2.2) \\
                \hline Virtual clients per thread       & [1, 2, 4, 8, 16, 32, 44, 56, 64] \\
                \hline Workload                         & Write-Only and Read-Only \\
                \hline Multi-Get behavior               & N/A \\
                \hline Multi-Get size                   & N/A \\
                \hline Number of middlewares            & N/A \\
                \hline Worker threads per middleware    & N/A \\
                \hline
            \end{tabular}
        }
            \caption{Experimental parameters for experiments 2.1 and 2.2.\label{tab:20_setup}}
    \end{table}

    \subsection{One Server\label{subsec:2_one-server}}

        \begin{figure*}
            \vspace*{-.5\baselineskip}
            \makebox[1\linewidth][c]{%
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-1_mt_throughput.png}
                    \caption{Measured throughput on memtier.\label{fig:21_mt_tp}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-1_mt_response_time.png}
                    \caption{Measured response time on memtier.\label{fig:21_mt_rt}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-1_mt_throughput-il.png}
                    \caption{Interactive Law \textendash{} Throughput.\label{fig:21_mt_tp_il}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-1_mt_response-time-il.png}
                    \caption{Interactive Law \textendash{} Response Time.\label{fig:21_mt_rt_il}}
                \end{subfigure}
            }
            \caption{Memtier measurements for Experiment 2.1. Error bars are plotted but not visible due to being too
                     small.}
            \label{fig:21_all}
        \end{figure*}

        \subsubsection{Explanation}

            The memcached server is from the start saturated for GET requests as increasing the amount of clients
            results in no gain of throughput. This behaviour is predicted by table \ref{tab:iperf_results} where the
            theoretical limit is 3055 requests. As such the phase of under-saturation is not observed. The system is at
            the very least saturated.  With the aforementioned 3055 requests a response time of \SI{1.96}{\milli\second}
            is expected for 6 clients. The measured data of \SI{2.04}{\milli\second} indicates a good degree of
            saturation but a clear statement as to how saturated is not possible. Including the response time graph it
            becomes clear that the system is still capable of handling more participants but the respective clients will
            have slower response times.

            The memcached server behaves differently for SET requests. From a visual observation it seems to only
            saturate at 192 clients with a throughput of 16334 requests\textemdash performance degrades thereafter.  As
            the theoretical limit for three memtier instances should be 18233 keys it is interesting to observe only a
            utilisation of 89\%. Observing dstat results shows the system reaching full saturation on the CPU end for
            counts of 192 clients and beyond (in those cases the system is actually overloaded), meaning even though the
            network still can accommodate requests the system is CPU bound. As such it is concluded that a single \srv{}
            cannot handle more than 192 clients reasonably.

            The interactive law without thinking time holds as seen in figures \ref{fig:21_mt_tp_il} and
            \ref{fig:21_mt_rt_il}.

            We conclude therefore that the bottleneck for memcached machines is the upload of data for GET requests and
            CPU performance for SET requests. The next experiment will clarify the bottleneck for memtier machines.

    \subsection{Two Servers\label{subsec:2_two-servers}}

        \begin{figure*}
            \vspace*{-.5\baselineskip}
                \centering
            \makebox[1\linewidth][c]{%
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-2_mt_throughput.png}
                    \caption{Measured throughput on memtier.\label{fig:22_mt_tp}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-2_mt_response_time.png}
                    \caption{Measured response time on memtier.\label{fig:22_mt_rt}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-2_mt_throughput-il.png}
                    \caption{Interactive Law \textendash{} Throughput.\label{fig:22_mt_tp_il}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=\textwidth]{../data_analysis/figures/2-2_mt_response-time-il.png}
                    \caption{Interactive Law \textendash{} Response Time.\label{fig:22_mt_rt_il}}
                \end{subfigure}
            }
            \caption{Memtier measurements for Experiment 2.2. Error bars are plotted but not visible due to being too
                     small.\label{fig:21_all}}
        \end{figure*}

        \subsubsection{Explanation}

            The throughput of the system behaves as expected when adding another \emph{Server} to the configuration
            and removing two \emph{Client}s. SETs are reaching the network bound (cf. table \ref{tab:iperf_results})
            as more \emph{Server}s exist which allow handling twice the amount of requests for the same instance of
            time whereas GET requests also show being limited by the upload bandwidth of both \emph{Server}s (cf.
            table \ref{tab:iperf_results}). After reaching the saturation points in throughput a measurable increase
            in latency can be seen for either request type. These behaviours align with expected behaviour and also
            reflect well when applying the interactive law (figures \ref{fig:21_mt_tp_il} and
            \ref{fig:21_mt_rt_il}).

            We conclude the bottleneck for \emph{Client}s is not immediately reached but very early on. With eight
            clients being the point of saturation for GET requests for two memcached servers it is natural to assume
            that four clients are saturating one memcached server. As such the assumption of memcached being already
            over-saturated in experiment \ref{subsec:2_one-server} can be drawn.

            Memtier machines have a maximum throughput of about 5800 requests per second in these experiments. Of
            note is that the throughput doesn't compare to the previous experiment linearly but can be explained by
            a variation due to network latencies and also multiple machines resulting in overlaps of commands to
            memcached whereby some waiting is required for near-simultaneous requests as each memcached instance is run
            single-threaded.

    \subsection{Summary\label{subsec:23_summary}}

        The maximum throughput is easy to find out by visual inspection of the graphs for GET requests (as no gain
        in throughput is observed after a certain point). SET requests have for the case of three \cli{}s and one
        \srv{} more ambiguous result. One can simply look for the maximum amount of requests through the system but
        not including the increasing response time would be naive. With the limited details the decision of maximum
        saturation is a combination of limited growth in throughput and still constant growth of response times. For
        the case of one \cli{} and two \srv{}s a visual inspection is sufficient.

        \begin{table}
            \small{
                \centering
                \captionsetup{justification=centering}
                \ra{1.1}
                \begin{tabular}{@{}llll@{}}
                    \toprule
                    \textbf{Experiment} & \textbf{Read-only workload} & \textbf{Write-only workload} &
                    \textbf{Configuration} \\
                    \midrule
                    One \srv & 2937.75 & 16334.11 & Clients = 6 / 192 \\
                    One \cli & 5816.28 & 5965.34  & Clients = 8 / 8 \\
                    \bottomrule
                \end{tabular}
                \caption{Evaluation of maximum throughputs of baseline experiment. Numbers are rounded to two
                         digits.\label{tab:21_throughput}}
            }
        \end{table}

        The difference of how GETs and SETs are bottlenecked has been described in subsections \ref{subsec:2_one-server}
        and \ref{subsec:2_two-servers} and expected at this point. Table \ref{tab:iperf_results} summarises the
        theoretical limits.

        For the case of GET with one memcached instance this limit matches with the observed result. For two
        memcached instances with a single memtier instance this limit is twice as high as two instances are queried.
        That experiment's respective SET behaviour can be explained by the upload limit of the respective machine (cf.
        table \ref{tab:iperf_results}) and not by memcached. This claim is strengthened by the fact that a single
        instance can handle up to 16334 writes in our experiments.

        In either case for the single memtier instance, an increase in steepness for the response time can be
        observed after the saturation point. The alignment of response times for both request types matches their
        respective throughput.

        The interactive law graphs align in all cases with the measured numbers and as such it can be deduced the
        thinking time is very close to 0 and all components introducing long response times are observable within this
        configuration.


text:
\documentclass[letterpaper,11pt]{article}
\usepackage[margin=2cm]{geometry}

\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{multicol}
\usepackage{listings}
\usepackage{color}
\usepackage[colorlinks=true]{hyperref}

\title{\textbf{Pattern Recognition Theory 18794 Homework 3}}
\author{Mengwen He (Alex)}

\begin{document}

\maketitle

\section*{Problem 1}

Neural networks, or at least the very basic elements that made up these networks, \textit{i.e.} the perceptron and ideas of learning machines, were proposed around the time the first computers were invented. Around the 80's and 90's neural networks, were not as popular. Why do you think so? And what has changed now that they have become so popular? Give a brief explanation or provide a discussion for each point. We are looking for two main reasons however, any valid reasons would be fine.

\textbf{Answer:}\\
\begin{enumerate}
	\item The back-propagation (BP) algorithm did not work well on multiple hidden layers (except for certain architectures like CNN), often getting stuck in local optima. This led to poor results in benchmark datasets. The major issue identified was the initiation of weights in a deep network.

	This problem has been overcome recently by using layer-wise greedy unsupervised learning to initialize weights for each layer.

	\item The computational power was not enough for training a deep neural network. For a little more complex problem, it could require more than one week to train a neural network around the 80's and 90's.

	However, with the advent of distributed and GPU systems, neural networks can be trained faster, and it may only cost one day to solve a very complex problem.

	\item The well-labeled big dataset was not available around the 80's and 90's, but the neural network highly relays on the training data size.

	Now, with the improved technology, it becomes easier to collect, store, label, and analyze the big data from the Internet.
\end{enumerate}

\section*{Problem 2}

\begin{enumerate}
	\item One of the key steps of a CNN convolution layer is weight sharing, \textit{i.e.} the same kernel or filer is convolved over the entire image. Assume that the image is size $w$ by $h$, and that the filter is $m$ by $n$. Now once you convolve the filer with the image you get an output or response map. What is the size of the output or response map in terms of $w,h,m,n$?

	\textbf{Answer:}\\
	If the stride of the filter is 1, and the zero padding is 0, then the size of the output is$(w-m+1)\times(h-n+1)$.

	\item Why is the weight sharing property useful? Mention and explain all the reasons you can think of. We are again looking for 2 main reasons, but feel free to suggest any valid reason. One hint for the two reasons in order to give you a direction, would be parameters and spatial 2D information. Bonus: correctly explain the two reasons and come up with other reasons as well.

	\textbf{Answer:}\\
	\begin{enumerate}
		\item Sharing the weights and biases in each layer greatly reduces the number of parameters involved in a convolution network, and it relays on a reasonable assumption: if one feature is useful to compute at some spatial position, then it should also be useful to compute at a different position. The reduction of the number of parameters will result in faster training.
		\item Sharing the weights and biases enables the neural network to learn a single filter for a object no matter where the object appears in the image (translation invariance). Since translation invariance is fundamental to image-based recognition, sharing weights across image space is very useful in computer vision tasks.
	\end{enumerate}

\end{enumerate}

\section*{Problem 3}

Let's say you are trying to recognize a dog using a computer vision algorithm. You would want the algorithm to output the label ``dog" no matter what kind the dog is, where the dog is in the image, and also what the dog is actually doing in the image. All these factors such as the kind of dog, the position of the dog in the image and the actual action of the dog can be said to be things you want to be invariant towards. They are in a bit more formal terms called nuisance transformations. Thus, in general, you would want your algorithm to be invariant to nuisance transformations in a pattern recognition task.

A CNN network has three main kinds of layers:
\begin{enumerate}
	\item A convolution layer
	\item A pooling layer
	\item A fully connected
\end{enumerate}

\begin{enumerate}
	\item Out of the three layers which layer do you think explicitly enforces or helps with generating invariance to nuisance transformations? Please provide a brief explanation as to how and why do you think that particular layer can generate invariance?

	\textbf{Answer:}\\
	The convolution layer explicitly helps with generating invariance to nuisance transformations. Because the filter will do correlation operation across the entire input image, this will find the feature say of the dog no matter where the dog appears in the image.

	\item In the midterm, we saw the virtual support method (VSV), which was trying to synthetically transform the support vector in order to produce different multiple transformed versions of the support vector points. The SVM is then run again on these support vectors. Thus the SVM is more invariant to the new transformations. Suggest one way to make a CNN more invariant to the nuisance transformations.

	\textbf{Answer:}\\
	Apply the nuisance transformations on the filter to generate virtual filters, and then use these virtual filters to extract the features in the convolution layer for the successive training.

	\item In the following tasks, what nuisance transformations would you expect:
	\begin{enumerate}
		\item \textbf{Face recognition:} the position of the face in the image.
		\item \textbf{Facial pose estimation:} people's different faces.
		\item \textbf{Speech recognition:} people's different voice tones.
		\item \textbf{Speaker identification:} the volume of the voice.
		\item \textbf{Hand written digit recognition:} people's different writing styles.
		\item \textbf{Handwriting recognition:} the stroke width.
	\end{enumerate}
\end{enumerate}

\section*{Problem 4}

Just to provide some brief intuition. The more complex the task, the more complex or deep the network you would want to use. Complexity of a task can be loosely said to be directly proportional to the amount of nuisance transformation that one might expect to exist in the data for that task.

\begin{enumerate}
	\item In each of the following, you will be given two tasks or datasets. Please mention which one out of the two tasks/datasets would you employ a more complicated or a deeper CNN and why?
	\begin{enumerate}
		\item
		\begin{enumerate}
			\item MNIST (\url{http://yann.lecun.com/exdb/mnist/})
			\item SVHN (\url{http://ufldl.stanford.edu/housenumbers/})
		\end{enumerate}
		The SVHN needs a deeper CNN, because the data of SVHN has more rotational transformations than that of MNIST.
		\item
		\begin{enumerate}
			\item Object recognition
			\item Face recognition
		\end{enumerate}
		Object recognition needs a deeper CNN, because the object data can be anything with variant transformations, but the face pose is always normally distributed.
		\item
		\begin{enumerate}
			\item Differentiating between two kinds of dogs
			\item Differentiating between one kind of dog and one kind of tree
		\end{enumerate}
		Differentiating between one kind of dog and one kind of tree needs a deeper CNN, because in addition to the nuisance transformation of dogs, the second task will contain the nuisance transformation of trees.

	\end{enumerate}
	\item One issue with deep learning and CNNs is that you need a lot of data to have the networks train enough to generalize well. Whereas, correlation filters and SVMs, and methods of the 90's and 2000's work well in cases where there is little data. It has been a challenge to apply deep learning to a few domains or tasks. Select the task in each case in which you think you'd use a SVM instead of a deep CNN, explain in brief why?
	\begin{enumerate}
		\item
		\begin{enumerate}
			\item Kinds of cats
			\item Classifying a particular kind of tumor using say a CT scan image
		\end{enumerate}
		It's better to use SVM for the tumor classifying, because the number of tumor CT scan images is relatively small. Very few people (compared to the entire population of human) will has tumor, and some of them will not go to hospital for variant reasons.
		\item
		\begin{enumerate}
			\item Age estimation of a person
			\item Face recognition
		\end{enumerate}
		It's better to use SVM for the face recognition, because the number of one person's face images is limited. It's hard to collect a huge number of face images of one person in a short time.
	\end{enumerate}
\end{enumerate}

\end{document}

max_stars_repo_name: MengwenHe-CMU/Courses

max_issues_repo_name: MengwenHe-CMU/Courses

max_forks_repo_name: MengwenHe-CMU/Courses


text:
% !TeX program = lualatex
\documentclass[]{article}

\usepackage{caption,subcaption,graphicx,float,url,amsmath,amssymb,amsthm,tocloft,cancel,thmtools,gensymb,braket,tikz-feynman,mathtools,color, colortbl}
\usepackage[toc,nonumberlist]{glossaries}
\usepackage{glossaries-extra}
\usepackage[toc,page]{appendix}

\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}

\newtheorem{thm}{Theorem}
\newtheorem{defn}[thm]{Definition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lemma}[thm]{Lemma}
\graphicspath{{figs/}}
\widowpenalty10000
\clubpenalty10000
\setcounter{tocdepth}{2}
\tikzfeynmanset{compat=1.1.0}
\definecolor{Gray}{gray}{0.5}
\DeclareMathOperator{\Tr}{Tr \;}
\newcommand{\Lagr}{\mathcal{L}}
\renewcommand{\thesection}{2.\arabic{section}}
\setlength{\cftsubsecindent}{0em}
\setlength{\cftsecnumwidth}{3em}
\setlength{\cftsubsecnumwidth}{3em}
%opening
\title{Quantum Field Theory\\
Part II: Dirac and the Spinor}
\author{Simon Crase (compiler)\\simon@greenweaves.nz}

\begin{document}

\maketitle

\begin{abstract}

This document contains derivations of equations from \cite[Part II: Dirac and the Spinor]{zee2010quantum}.

\end{abstract}

\tableofcontents

\section{The Dirac Equation}

\begin{align*}
	(i\gamma^\mu\partial_\mu-m)\psi=&0\\
	\implies&\\
	(i\gamma^\mu\partial_\mu+m)(i\gamma^\nu\partial_\nu-m)\psi=&0 \\
	\iff&\\
	\big(-\gamma^\mu\partial_\mu\gamma^\nu\partial_\nu+\cancel{m i\gamma^\nu\partial_\nu}-\cancel{mi\gamma^\mu\partial_\mu}-m^2\big)\psi=&0\\
	\iff&\\
	\big(\gamma^\mu\partial_\mu\gamma^\nu\partial_\nu+m^2\big)\psi=&0\\
	\iff&\\
	\big(\gamma^\mu\gamma^\nu\partial_\mu\partial_\nu+m^2\big)\psi=&0\\
	\iff&\\
	\big[(\frac{1}{2}(\gamma^\mu\gamma^\nu+\gamma^\nu\gamma^\mu)\partial_\mu\partial_\nu+m^2\big]\psi=&0\\
	\text{Define} \{\gamma^\mu,\gamma^\nu\}=\gamma^\mu\gamma^\nu+\gamma^\nu\gamma^\mu\.\iff&\\
	\big(\frac{1}{2}\{\gamma^\mu,\gamma^\nu\}\partial_\mu\partial_\nu+m^2\big)\psi=&0\\
	\text{setting } \{\gamma^\mu,\gamma^\nu\}=2\eta^{\mu\nu}\.\implies&\\
	(\partial^2 + m^2)\psi =& 0
\end{align*}
\cite{zee2010quantum} defines the $\gamma$s in terms of the Pauli matrices $\sigma/\tau$:
\begin{align*}
	\gamma^0 =& I \otimes \tau_3\\
	\gamma^j =& i \sigma^j \otimes \tau_2
\end{align*}

\subsection{Isomorphism $\frac{SU(2)}{Z^2} \cong SO(3)$}
In \cite[Section 3]{westra2008SU2} a $2\times 2$ unimodular unitary matrix has the form:
\begin{align*}
	U =& \begin{bmatrix}
		x&-y\\
		\bar{y}&\bar{x}
	\end{bmatrix} \text{. Substituting}\\
	x =& \cos{\theta} e^{i\phi}, \; y = \sin{\theta} e^{i\psi} \numberthis \label{eq:xy} \text{, gives} \\
	U=& \begin{bmatrix}
		\cos{\theta} e^{i\phi}&\sin{\theta}e^{i\psi}\\
		-sin{\theta}e^{-i\psi}&\cos{\theta} e^{-i\phi}
	\end{bmatrix}\\
	U^T =& \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}
\end{align*}
We follow \cite[Section 4]{westra2008SU2} and transform the Pauli Matrices.
\begin{align*}
	U \sigma^1 U^T  =&  \begin{bmatrix}
		\cos{\theta} e^{i\phi}&\sin{\theta}e^{i\psi}\\
		-\sin{\theta}e^{-i\psi}&\cos{\theta} e^{-i\phi}
	\end{bmatrix} \begin{bmatrix}
		0&1\\
		1&0
	\end{bmatrix} \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
	=&  \begin{bmatrix}
		\sin{\theta}e^{i\psi} & \cos{\theta} e^{i\phi}\\
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{-i\psi}
	\end{bmatrix} \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
	=& \begin{bmatrix}
		\cos\theta \sin\theta\big[e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big]&\cos^2\theta e^{2i\phi}-\sin^2\theta e^{2i\psi} \\
		\cos^2\theta e^{-2i\phi}-\sin^2\theta e^{-2i\psi}&-\cos\theta \sin\theta\big[e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big]
	\end{bmatrix} \numberthis \label{eq:U:sigma1:UT}
\end{align*}

The real part of the off diagonal elements of \eqref{eq:U:sigma1:UT} becomes:
\begin{align*}
	&\begin{bmatrix}
		.&\Re(\cos^2\theta e^{2i\phi}-\sin^2\theta e^{2i\psi}) \\
		\Re(\cos^2\theta e^{-2i\phi}-\sin^2\theta e^{-2i\psi})&.
	\end{bmatrix}\\
	=& \frac{1}{2}(\cos^2\theta e^{2i\phi}-\sin^2\theta e^{2i\psi}+ \cos^2\theta e^{-2i\phi}-\sin^2\theta e^{-2i\psi}) \sigma^1	\\
	=& \Re(x^2-y^2)
\end{align*}

The imaginary part of the off diagonal elements of \eqref{eq:U:sigma1:UT} becomes:
\begin{align*}
	&\begin{bmatrix}
		.&\Im(\cos^2\theta e^{2i\phi}-\sin^2\theta e^{2i\psi}) \\
		\Im(\cos^2\theta e^{-2i\phi}-\sin^2\theta e^{-2i\psi})&.
	\end{bmatrix}\\
	=& \frac{1}{2}(\cos^2\theta e^{2i\phi}-\sin^2\theta e^{2i\psi}- \cos^2\theta e^{-2i\phi}+\sin^2\theta e^{-2i\psi}) \frac{\sigma^2}{i}	\\
	=& -\Im(x^2-y^2)
\end{align*}

The diagonal elements of \eqref{eq:U:sigma1:UT} are:

\begin{align*}
	 \cos\theta \sin\theta\big[e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big]\begin{bmatrix}
		1&0\\
		0&-1
	\end{bmatrix}
	=& \cos\theta \sin\theta\big[e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big] \sigma^3 \text{, now}\\
	\cos\theta \sin\theta e^{i(\psi-\phi)}=& \cos\theta e^{-i\phi} \sin\theta e^{i\psi}\\
	=& \bar{x} y \text{, and}\\
	\cos\theta \sin\theta e^{i(\phi-\psi)}=& \cos\theta e^{i\phi} \sin\theta e^{-i\psi}\\
	=& \bar{x} y \text{, whence} \\
	\cos\theta \sin\theta\big[e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big] =& x\bar{y} + \bar{x}y\\
	=&2 \Re{x\bar{y}} \text{, and}\\
	\cos\theta \sin\theta\big[e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big] \sigma^3 =& 2 \Re({x\bar{y}}) \sigma^3
\end{align*}

So \eqref{eq:U:sigma1:UT} becomes:
\begin{align*}
		U \sigma^1 U^T  =& \Re{(x^2-y^2)} \sigma^1 - \Im{(x^2-y^2)} \sigma^2 + 2 \Re({x\bar{y}}) \sigma^3
\end{align*}

\begin{align*}
	U \sigma^2 U^T  =&  \begin{bmatrix}
		\cos{\theta} e^{i\phi}&\sin{\theta}e^{i\psi}\\
		-\sin{\theta}e^{-i\psi}&\cos{\theta} e^{-i\phi}
	\end{bmatrix} \begin{bmatrix}
		0&-i\\
		i&0
	\end{bmatrix} \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
	=&  i \begin{bmatrix}
		\cos{\theta} e^{i\phi}&\sin{\theta}e^{i\psi}\\
		-\sin{\theta}e^{-i\psi}&\cos{\theta} e^{-i\phi}
	\end{bmatrix} \begin{bmatrix}
		0&-1\\
		1&0
	\end{bmatrix} \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
	=&  i\begin{bmatrix}
		\sin{\theta}e^{i\psi}&-\cos{\theta} e^{i\phi}\\
		\cos{\theta} e^{-i\phi}&\sin{\theta}e^{-i\psi}
	\end{bmatrix} \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
   =& i \begin{bmatrix}
	   	\sin{\theta}e^{i\psi}\cos{\theta} e^{-i\phi}-\cos{\theta} e^{i\phi}\sin{\theta}e^{-i\psi}&-\sin^2{\theta}e^{2i\psi}-\cos^2{\theta} e^{2i\phi}\\
	   	\cos^2{\theta} e^{-2i\phi}+\sin^2{\theta}e^{-2i\psi}&-\cos{\theta} e^{-i\phi}\sin{\theta}e^{i\psi}+\sin{\theta}e^{-i\psi}\cos{\theta} e^{i\phi}
   \end{bmatrix} \\
	=& i \begin{bmatrix}
		\sin{\theta}\cos{\theta}\big[e^{i(\psi-\phi)}-e^{i(\phi-\psi)}\big]&-\sin^2{\theta}e^{2i\psi}-\cos^2{\theta} e^{2i\phi}\\
		\cos^2{\theta} e^{-2i\phi}+\sin^2{\theta}e^{-2i\psi}&\sin{\theta}\cos{\theta}\big[-e^{i(\psi-\phi)}+e^{i(\phi-\psi)}\big]
	\end{bmatrix} \numberthis \label{eq:U:sigma2:UT}
\end{align*}

The real part of the off diagonal terms in \eqref{eq:U:sigma2:UT} is:
\begin{align*}
	 &\begin{bmatrix}
		.&\Im(\sin^2{\theta}e^{2i\psi}+\cos^2{\theta} e^{2i\phi})\\
		-\Im(\cos^2{\theta} e^{-2i\phi}+\sin^2{\theta}e^{-2i\psi})&.
	\end{bmatrix}\\
   =& \begin{bmatrix}
		.&(\sin^2{\theta}\sin{2i\psi}+\cos^2{\theta} \sin{2i\phi})\\
		-(\cos^2{\theta} \sin({-2i\phi})+\sin^2{\theta}\sin({-2i\psi}))&.
	\end{bmatrix}\\
	=& \begin{bmatrix}
	.&(\sin^2{\theta}\sin{2i\psi}+\cos^2{\theta} \sin{2i\phi})\\
	(\cos^2{\theta} \sin({2i\phi})+\sin^2{\theta}\sin({2i\psi}))&.
	\end{bmatrix}\\
	=& (\sin^2{\theta}\sin{2i\psi}+\cos^2{\theta} \sin{2i\phi}) \sigma^1\\
	=& \Im(x^2 + y^2) \sigma^1
\end{align*}
The imaginary part of the off diagonal terms in \eqref{eq:U:sigma2:UT} is:
\begin{align*}
	&\begin{bmatrix}
		.&-\Re({\sin^2{\theta}e^{2i\psi}+\cos^2{\theta} e^{2i\phi}})\\
		\Re({\cos^2{\theta} e^{-2i\phi}+\sin^2{\theta}e^{-2i\psi}})&.
	\end{bmatrix}\\
	=&\begin{bmatrix}
		.&-\Re(x^2+y^2)\\
		\Re(\bar{x}^2+\bar{y}^2)&.
	\end{bmatrix}\\
	=& \frac{\Re(x^2+y^2)}{i} \sigma_2
\end{align*}

The diagonal terms in \eqref{eq:U:sigma2:UT} are:
\begin{align*}
	i \sin{\theta}\cos{\theta}\big[e^{i(\psi-\phi)}-e^{i(\phi-\psi)}\big] \sigma^3 =& i \big[\bar{x}y-x\bar{y}\big] \sigma^3\\
	=&i 2 i  \Im({\bar{x}y}) \sigma^3\\
	=& - 2 \Im({\bar{x}y}) \sigma^3
\end{align*}

So \eqref{eq:U:sigma2:UT} becomes:
\begin{align*}
	U \sigma^2 U^T  =& \Im(x^2 + y^2) \sigma^1 + \Re(x^2+y^2) \sigma_2 - 2 \Im({\bar{x}y}) \sigma^3
\end{align*}
\begin{align*}
	U \sigma^3 U^T =&  \begin{bmatrix}
		\cos{\theta} e^{i\phi}&\sin{\theta}e^{i\psi}\\
		-\sin{\theta}e^{-i\psi}&\cos{\theta} e^{-i\phi}
	\end{bmatrix} \begin{bmatrix}
		1&0\\
		0&-1
	\end{bmatrix} \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
	=& \begin{bmatrix}
		\cos{\theta} e^{i\phi}&-\sin{\theta}e^{i\psi}\\
		-\sin{\theta}e^{-i\psi}&-\cos{\theta} e^{-i\phi}
	\end{bmatrix}  \begin{bmatrix}
		\cos{\theta} e^{-i\phi}&-\sin{\theta}e^{i\psi}\\
		\sin{\theta}e^{-i\psi}&\cos{\theta} e^{i\phi}
	\end{bmatrix}\\
	=& \begin{bmatrix}
		\cos^2{\theta}-\sin^2{\theta}&-2 \cos{\theta}\sin{\theta}e^{i(\theta+\phi)}\\
		-2 \cos{\theta}\sin{\theta}e^{-i(\theta+\phi)}&-(\cos^2{\theta}-\sin^2{\theta})
	\end{bmatrix} \numberthis \label{eq:U:sigma3:UT}
\end{align*}
Now
\begin{align*}
	xy =& \cos{\theta} e^{i\phi} \sin{\theta} e^{i\psi}\\
	=& \cos{\theta} \sin{\theta}  e^{i(\phi + \psi)}\\
	=& \cos{\theta} \sin{\theta}  \big[\cos{(\phi + \psi)}+ i \sin{(\phi + \psi)}\big]\\
	=& \cos{\theta} \sin{\theta}  \big[\cos{[-(\phi + \psi)]}- i \sin{[-(\phi + \psi)]}\big]
\end{align*}
We see that the real part of the cross term in \eqref{eq:U:sigma3:UT} is:
\begin{align*}
	-2 \cos{\theta}\sin{\theta}\begin{bmatrix}
		.&\Re({e^{i(\phi + \psi)}})\\
		\Re({e^{-i(\phi + \psi)}})&.
	\end{bmatrix}=&	-2 \cos{\theta}\sin{\theta} \begin{bmatrix}
		.&\Re({e^{i(\phi + \psi)}})\\
		\Re({e^{-i(\phi + \psi)}})&.
	\end{bmatrix}\\
	=&	-2 \cos{\theta}\sin{\theta} \begin{bmatrix}
		.&\Re({e^{i(\phi + \psi)}})\\
		\Re({e^{i(\phi + \psi)}})&.\\
	\end{bmatrix} \\
	=& -2 \cos{\theta}\sin{\theta} \Re({e^{i(\phi + \psi)}}) \sigma^1\\
	=& 2 \Re(xy) \sigma^1
\end{align*}

Then the imaginary part of the cross term in \eqref{eq:U:sigma3:UT} is:
\begin{align*}
	-2 \cos{\theta}\sin{\theta}\begin{bmatrix}
		.&\Im({e^{i(\phi + \psi)}})\\
		\Im({e^{-i(\phi + \psi)}})&.
	\end{bmatrix}=&	-2 \cos{\theta}\sin{\theta} \begin{bmatrix}
		.&\Im({e^{i(\phi + \psi)}})\\
		-\Im({e^{i(\phi + \psi)}})&.\\
	\end{bmatrix} \\
	=& 2 \cos{\theta}\sin{\theta} \Im({e^{i(\phi + \psi)}}) \frac{\sigma^2}{i}\\
	=& 2 \Im(xy) \frac{\sigma^2}{i}
\end{align*}
Finally
\begin{align*}
	\vert x \vert^2 - \vert y \vert^2 =& \cos^2 \theta - \sin^2 \theta \text{, so the diagonal term in \eqref{eq:U:sigma3:UT} is}\\
	&(\vert x \vert^2 - \vert y \vert^2) \sigma^3
\end{align*}

So \eqref{eq:U:sigma3:UT} becomes:
\begin{align*}
		U \sigma^3 U^T =&  2 \Re(xy) \sigma^1 + 2 \Im(xy) \sigma^2 + (\vert x \vert^2 - \vert y \vert^2) \sigma^3
\end{align*}

\section{Quantizing the Dirac Field}
\section{Lorentz Group and Weyl Spinors}
\section{Spin-Statistics Connection}
\section{Vacuum Energy, etc}
\section{Electron Scattering and Gauge Invariance}
\section{Diagrammatic Proof of Gauge Invariance}
\section{Photon-Electron Scattering}

\bibliographystyle{unsrt}
\addcontentsline{toc}{section}{Bibliography}
\raggedright
\bibliography{tm}

\end{document}


text:
\documentclass[9pt,twocolumn,twoside]{../../styles/osajnl}
\usepackage{fancyvrb}
\journal{i524}

\title{Lustre File System}

\author{Pratik Jain}
\affil{School of Informatics and Computing, Bloomington, IN 47408, U.S.A.}
\affil{Corresponding authors: jainps@iu.edu}

\dates{Paper-1, \today}

\ociscodes{Lustre File System, Object based file system, Object based storage device}

% replace this with your url in github/gitlab
\doi{\url{https://github.com/cloudmesh/sp17-i524/blob/master/paper1/S17-IR-2012/report.pdf}}

\begin{abstract}
We introduce the Lustre file system and gives a brief overview on its
applications in the industry, its architecture, and the steps required
for successfully installing and configuring the file system. Not only
its applications in various fields like HPC and Big Data are explored,
but also the areas in which this file system is not recommended are
discussed. \newline
\end{abstract}

\setboolean{displaycopyright}{true}

\begin{document}

\maketitle

\section{Introduction}

Lustre is a type of parallel distributed file system. It was started
as a research project in 1999 by Peter J. Braam. It is now generally
used for large-scale cluster computing. The name Lustre is a
combination of Linux and cluster \cite{www-ungrid}. It is often used
in supercomputers due to its high-performance capabilities and open
licensing. The Lustre file system is scalable and can be part of
multiple computer clusters with tens of thousands of client nodes,
tens of petabytes of storage on hundreds of servers, and more than a
terabyte per second of aggregate I/O throughput.  A Lustre file system
was first installed for production use in March 2003, on one of the
largest supercomputers at the time, the MCR Linux Cluster at Lawrence
Livermore National Laboratory. Lustre file system software is
available under the GNU General Public License and can be utilized for
computer clusters ranging in size from small workgroup clusters to
large-scale, multi-site clusters. This makes this file system a
popular choice for businesses with large data centers, including in
various industries such as simulation, life science, meteorology, rich
media, oil and gas, and finance.

\section{Architecture}

The Lustre architecture is a storage architecture for clusters. Its
central component, the Lustre file system, is supported on the Linux
operating system and provides a POSIX standard-compliant UNIX file
system interface. The architecture is used for many different kinds of
clusters and it is best known for powering many of the largest HPC
clusters worldwide \cite{www-manual}. Lustre file system is used by
many HPC sites as a site-wide global file system, serving dozens of
clusters. Its ability to scale capacity and performance for any need
reduces the need to deploy many separate file systems, such as one for
each compute cluster and avoiding the need to copy data between
compute clusters simplifies storage management. In addition to
aggregating storage capacity of many servers, the I/O throughput is
also aggregated and scales with additional servers. Also, throughput
and/or capacity can be easily increased by adding servers
dynamically. Lustre’s scalable architecture has three main components,
first, the Metadata Server that provides metadata services for a file
system and manages a Metadata Target that stores the file metadata,
second, the Object Storage Servers that manage the Object Storage
Targets that store the file data objects and third, the clients that
access and use the data. Lustre presents all clients with a unified
namespace for all of the files and data in the file system and allows
concurrent and coherent read and write access to the files in the
filesystem \cite{www-getstart}.
\newline
Followings are the principal foundations of Lustre:

\subsection{Object-based storage devices}
Unlike conventional storage devices, an Object Based Disk (OBD) or
Object-Based Storage Device (OBSD) is one that works at the level of
files rather than at the level of individual blocks. The OBD
internally keeps track of allocated objects, which blocks belong to
each object, free space, etc. rather than exposing these details to
the operating system. This architecture looks at devices that can
manipulate file objects. Typical commands executed as a part of the
object interface are create, destroy, read/write block X in object N
and read/write attributes of objects \cite{www-obd-wikipedia}.

\subsection{A stackable object driver model}
In addition to direct drivers which control storage, there are logical
object drivers, client object drivers and associated target
drivers. For example, RAID can be implemented by having a logical
object driver that speaks with multiple direct drivers
\cite{www-whatislustre}. Other interesting logical drivers can perform
HSM, parallel I/O and cryptographic operations. Lustre’s logical
object driver manages snapshots of file systems. Client drivers are
responsible for packing up object requests and shipping them to
targets. This can exploit SAN's such as Fibre Channel, InfiniBand and
Gigabit Ethernet. Since the interface is uniform, logical drivers can
be stacked on top of direct drivers or clients.

\subsection{Object-based file systems}
There are at least three types of file systems that can be imagined in
the object storage model. OBDFS is an object-based file system that is
meant for the use with non-shared storage devices. An inode file
system provides direct access to objects named by an object id. Third
are cluster file systems. The traditional cluster file system can
become significantly simpler than those implemented with shared block
storage devices.

\section{Lustre File System and Striping}
The ability to stripe data across multiple OSTs in a round-robin
fashion is one of the main factors leading to the high performance of
Lustre file systems. Users can optionally configure each file the
number of stripes, stripe size, and OSTs that are used. Striping can
be used to improve performance when the aggregate the bandwidth to a
single file exceeds the bandwidth of a single OST. The ability to
stripe is also useful when a single OST does not have enough free
space to hold an entire file.

\section{Implementation}

In a typical Lustre installation on a Linux client the filesystem
driver module is loaded into the kernel and the filesystem is mounted
like any other local or network filesystem. Even though it may be
composed of tens to thousands of individual servers and filesystems,
client applications see a single, unified filesystem. On some
massively parallel processor (MPP) installations, computational
processors can access a Lustre file system by redirecting their I/O
requests to a dedicated I/O node configured as a Lustre client
\cite{www-bluegene-wikipedia}. Another approach used in the early
years of Lustre is the user-level liblustre library. This provided
userspace applications with direct filesystem access. Liblustre allows
computational processors to mount and use the Lustre file system as a
client. Using liblustre, the computational processors could access a
Lustre file system even if the service node on which the job was
launched is not a Linux client. Liblustre allowed direct data movement
between application space and the Lustre OSSs. It did not require an
intervening data copy through the kernel, thus providing access from
computational processors to the Lustre file system directly in a
constrained operating environment.

\section{Installation}

Following is the overview of steps needed for installing Lustre.  The
first step is to setup Lustre Filesystem Hardware. Lustre runs on most
commodity hardware with any kind of block storage device including
single disks, software and hardware RAID and logical volume
manager. For servers, 64-bit architectures are recommended. Lustre
allows for multiple MDSes for high availability. The size of the MDT’s
backing file system should be chosen based on the total number of
files planned to be stored in the Lustre file system, and the
aggregate OST space should be chosen based on the total amount of data
planned to be stored in the file system. Estimating space requirements
early can dictate hardware requirements. After this, the Lustre
software is installed. Lustre runs on a variety of Linux kernels from
Linux distributions including RHEL, CentOS, and SLES.  When using the
Lustre ldiskfs OSD only, it will be necessary to patch the kernel
before building Lustre. The required Lustre RPMs or source can be
downloaded here \cite{www-download}. Metadata and Object Storage
Server require the Lustre patched Linux kernel, Lustre modules, Lustre
utilities and e2fsprogs installed. The clients require the Lustre
client modules, client utilities and, optionally, the Lustre patched
kernel. For configuring Lustre, the Lustre Networking (LNET) kernel
modules have a variety of module parameters that can be set in the
/etc/modprobe.d/lustre.conf file. The type of network used and
globally-available networks can be specified along with routes in a
Lustre configuration. To set up and tune the filesystem, Lustre
provides a variety of configuration utilities that include mkfs.lustre
to format a disk for a Lustre service, tunefs.lustre to modify
configuration information on a Lustre target disk, lctl to directly
control Lustre via an ioctl interface and mount.lustre to start a
Lustre client or target service.

\section{Where not to use it?}

Although a Lustre file system can function in many work environments,
it is not necessarily the best choice for all applications
\cite{www-manual}. Although, it is best suited for uses that exceed
the capacity that a single server can provide, in some use cases, a
Lustre file system can perform better with a single server than other
file systems due to its strong locking and data coherency. A Lustre
file system is not particularly well suited for "peer-to-peer" usage
models where clients and servers are running on the same node, each
sharing a small amount of storage, due to the lack of data replication
at the Lustre software level. In such uses, if one client or server
fails, then the data stored on that node will not be accessible until
the node is restarted.

\section{Conclusion}

The Lustre file system is an open-source, parallel file system that
supports many requirements of leadership class HPC simulation
environments and enterprise environments worldwide. Because Lustre
file systems have high performance capabilities and open licensing, it
is often used in supercomputers. Lustre file systems are scalable and
can be part of multiple computer clusters with tens of thousands of
client nodes, tens of petabytes of storage on hundreds of servers, and
more than a terabyte per second of aggregate I/O throughput. Lustre
file systems is a popular choice for businesses with large data
centers, including those in industries such as meteorology,
simulation, oil and gas, life science, rich media, and finance. Lustre
provides a POSIX compliant interface and many of the largest and most
powerful supercomputers on Earth today are powered by the Lustre file
system. Its architecture contains 3 main components - the Metadata
Server, the Object Storage Servers and the clients. There are a few
fields in which use of Lustre file system is not recommended. Here, we
have covered the basic components of Lustre File system, the overview
about the installation steps of lustre file system and also a few
scenarios in which the use of lustre file system is not
recommended. Thus the paradigm of lustre file system is briefly
introduced.

% Bibliography

\bibliography{references}

\end{document}


text:
\chapter{Using the LAPACK diagonalizer}

\calcprog\ can now use a function from the LAPACK library ({\tt
zhegv}) to diagonalize the hamiltonian.  This diagonalizer is
significantly faster than the default routine {\tt cboris}.  In
addition, {\tt zhegv} can be used to generate just the eigenvalues of
a matrix.  This speeds up band structure calculations and properties
calculations with the {\sf Just Average E} keyword enormously.

If you have a binary distribution of the program, it will use {\tt
zhegv} to diagonalize (this is, unfortunately {\bf not} true of the
Mac version of the program, which still uses {\tt cboris}).  If you
have a source distribution, you can turn on the LAPACK diagonalizer by
including {\tt -DUSE\_LAPACK} in the {\tt CFLAGS} line of the
makefile.  Most of the functions necessary to use
LAPACK with \prog\ are distributed in the file {\tt zhegv.f}.
This is the good news.
The bad news is that {\tt zhegv.f} will not work unless you
have an implementation of the Basic Linear Algebra Subroutines (BLAS)
library installed on your machine (this is why the Mac version doesn't
currently support LAPACK).  Most modern distributions of UNIX include
a specially tuned version of the BLAS library (it's usually {\tt
/usr/lib/libblas.a}), so you should be able to use LAPACK.  In
addition, many UNIX implementations will include (as an optional
product) a tuned version of LAPACK.  The name of this library is very
system dependant, so you'll have to determine if it exists (if you
have an SGI, it's {\tt /usr/lib/libcomplib.sgimath.so}).  If you do
have a vendor-supplied version of LAPACK, it's advisable to
use it instead of the {\tt zhegv.f} distributed with \prog, the
vendor product tends to be faster.

If you are willing to compile BLAS for your system, or if you want the
full LAPACK distribution, you can get them from the netlib server
({\tt http://netlib.att.com}).  Netlib is a {\bf great} source for
numerical routines.

max_stars_repo_name: richardjgowers/yaehmop

max_issues_repo_name: richardjgowers/yaehmop

max_forks_repo_name: richardjgowers/yaehmop


text:
\documentclass[PMO,authoryear,toc]{lsstdoc}
\usepackage{ragged2e}
% lsstdoc documentation: https://lsst-texmf.lsst.io/lsstdoc.html
%\input{meta}

% Package imports go here.

% Local commands go here.

%If you want glossaries
%\input{aglossary.tex}
%\makeglossaries

\title{TIG Infrastructure}

% Optional subtitle
% \setDocSubtitle{A subtitle}

\author{%
Heinrich Reinking
}

\setDocRef{ITTN-054}
\setDocUpstreamLocation{\url{https://github.com/lsst-it/ittn-054}}

\date{today}

% Optional: name of the document's curator
% \setDocCurator{The Curator of this Document}

\setDocAbstract{%
Telegraf+InfluxDB+Grafana (AKA TIG) consists  on a plugin-driven server agent that collects and send metrics and events (Telegraf) into a Time-Series Database (InfluxDB), to then been displayed through an interactive visualization web application (Grafana).
}

% Change history defined here.
% Order: oldest first.
% Fields: VERSION, DATE, DESCRIPTION, OWNER NAME.
% See LPM-51 for version number policy.
\setDocChangeRecord{%
  \addtohist{1}{2021-12-28}{First Version}{Heinrich Reinking}
}

\begin{document}

% Create the title page.
\maketitle
% Frequently for a technote we do not want a title page  uncomment this to remove the title page and changelog.
% use \mkshorttitle to remove the extra pages

% ADD CONTENT HERE
% You can also use the \input command to include several content files.
\input{tig_design.tex}
\appendix
% Include all the relevant bib files.
% https://lsst-texmf.lsst.io/lsstdoc.html#bibliographies
\renewcommand{\refname}{} % Suppress default Bibliography section
\bibliography{local,lsst,lsst-dm,refs_ads,refs,books}

% Make sure lsst-texmf/bin/generateAcronyms.py is in your path
\section{Acronyms} \label{sec:acronyms}
\input{acronyms.tex}
% If you want glossary uncomment below -- comment out the two lines above
%\printglossaries

\end{document}


text:
% LaTeX resume using res.cls
\documentclass[line,10pt]{res}
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
\usepackage{newcent}   % uses new century schoolbook postscript font
\usepackage{simplemargins}
\usepackage{hanging}

\settopmargin{1in}
\setleftmargin{0.8in}
\setrightmargin{1.5in}
\setbottommargin{0.3in}
\begin{document}

\name{David S. LeBauer as of August 31, 2009}
% \address used twice to have two lines of addresm

\begin{resume}

%Institute for Genomic Biology\hfill dlebauer@illinois.edu\\
%University of Illinois at Urbana-Champaign\hfill (949) 433-7410\\
%Urbana, IL, 61801 \\

%\section{OBJECTIVE}       A position in the field of applied ecosystem science.
%\section{OBJECTIVE} My objective is to develop and promote sustainable land management practices that will improve the efficiency of agricultural, forest, and urban ecosystems. My background is in the function of ecosystems and their response to management and perturbation. I can help land managers develop the ecosystem services that humans require while protecting natural resources and reducing dependence on external inputs. In this way, I seek work opportunities to evaluate and develop healthy, productive ecosystems based on scientific research and predictive models.
\section{RESEARCH INTERESTS}
My research investigates the interactions between the nitrogen and carbon cycles, and how these interactions are affected by other components of global change. I am currently developing a dynamic global vegitation model that will aid in understanding the biogeochemical consequences of different cropping systems in agriculture and forestry.

\section{EDUCATION}

 \textbf{Ph.D.} Earth System Science\hfill University of California at Irvine, 2008 \\
 \textbf{M.S.} Ecology with agriculture emphasis \hfill University of California at Davis, 2003   \\
 \textbf{B.S.} Biology with ecology concentration, honors \hfill Duke University, 1998

\section{PROFESSIONAL EMPLOYMENT}
 {\bf  Postdoctoral Scholar} \hfill University of Illinois, 2009 - 2011 \\Development, parameterization, analysis, and validation of ecological models relevant to the assessment and forecasting of biofuel feedstocks and their impacts on ecosystem services.\\
  Advisor: Dr. Michael Dietze

{\bf Teaching Faculty} CA State Summer School for Math and Science  \hfill UC Irvine, 2009

{\bf  Research Assistant} \hfill UC Irvine, 2005-2008 \\
    Synthesized global patterns of plant community response to nitrogen addition. Quantified the long term, dose-dependent effects of nitrogen on carbon pools in a California grassland. Measured enzyme production and litter decomposition rates by fungal communities. \\Advisor: Dr. Kathleen Treseder

               {\bf  Teaching Assistant} \hfill \\
CA State Summer School for Math and Science  \hfill             UC Irvine, Summer 2008\\
BIO 100LW: Experimental Biology Laboratory \hfill               UC Irvine, Fall 2008\\
ESS 134: GIS for Environmental Science \hfill                   UC Irvine, Winter 2006, 2008\\
ESS 13: Global Change Biology  \hfill                           UC Irvine, Spring 2007

{\bf Laboratory and Operations Manager} \hfill NC A\&T SU, 2003-2004 \\
Cultivated and distributed mushroom innoculum to over 200 farmers statewide, led farmer workshops, promoted agricultural, industrial, and medicinal applications of white-rot fungi; advised student lab members; collected and cultured marketable wild fungi. \\Supervisor: Dr. Omon Isikhuemhen

{\bf  Research Assistant} \hfill UC Davis, 2001-2003 \\   Evaluated the production, yield, and chemistry of tomatoes with and without mycorrhizal fungi at different levels of nitrogen fertilization. Measured the relationships between nitrogen availability and nitrifier bacteria population size and nitrification rates. \\Advisors: Drs. Louise Jackson and  Kate Scow

{\bf  Teaching Assistant} PLP 140: Mushroom Cultivation \hfill UC Davis, Spring, 2003

{\bf Mycological Consulting}  \hfill
                 Dr. Annie King and Dr. Jamal Assi, UC Davis 2003\\
\phantom{} \hfill Wildflower Organics, Dawsonville, GA, 1999-2000

{\bf Laboratory and Field Technician} \hfill  Duke University, 1997-2001\\ Identified, mapped, measured, and cultivated forest trees; analyzed forest canopy images; managed data; collected and prepared plant and soil samples for analysis. \\Supervisors: Drs. Jacqueline Mohan, William Schlesinger, and Jim Clark
\newpage
\opening
\section{PEER-REVIEWED PUBLICATIONS}
\begin{verse}
 Allison, SD, DS LeBauer, MR Ofrecio, R Reyes, AM Ta, and TM Tran, 2008. Low levels of nitrogen addition stimulate decomposition by boreal forest fungi. Soil Biology and Biochemistry, 41:293-302 \\
 LeBauer, DS and KK Treseder, 2008. Nitrogen Limitation of Net Primary Productivity in Terrestrial Ecosystems is Globally Distributed. Ecology 89:371-379\\
 Okano, Y, KR Hirstova, CM Leutenegger, LE Jackson, RF Denison, B Gebreyesus, DS LeBauer, and KM Scow, 2004 Effects of ammonium on the population size of ammonia-oxidizing bacteria in soil- Application of real-time PCR. Applied and Environmental Microbiology 70:1008-1016\\
\end{verse}

\section{NON-PEER-REVIEWED PUBLICATIONS}
{\sl Book Chapter}
\begin{verse}
Isikhuemhen, OS, and DS LeBauer. 2004. Growing \textit{Pleurotus tuberregium}. p270-281 in Mushroom Grower's Handbook 1: Oyster Mushroom Cultivation. MushWorld. Seoul, Korea\\
\end{verse}
{\sl News Articles}
\begin{verse}
 LeBauer, DS, 2008. Nitrogen Pollution Boosts Plant Growth. Scitizen.com, France\\
 LeBauer, DS, 2004. Consider Shiitake Cultivation! Stewardship News, Carolina Farm Stewardship Association. Pittsboro, NC. 24(2):8-11 \end{verse}

\section{SELECTED PRESENTATIONS AT SCIENTIFIC MEETINGS}
\begin{verse}LeBauer, D.S., and K.K. Treseder 2007. Nitrogen deposition reduces nitrogen limitation of terrestrial net primary production, ESA, San Jose, CA\\
LeBauer, D.S., and K.K. Treseder 2006. Grassland carbon dynamics along nitrogen and depth gradients. ESA, Memphis, TN\\
LeBauer, D.S. and O.S. Isikhuemhen. 2003. Small farm mushroom production for food and medicine. (Workshop) CFSA Sustainable Agriculture Conference, Rock Hill, SC\\
LeBauer, D.S., Y. Okano, K.M. Scow, and L.E. Jackson 2002. Correlating gross nitrification rates with population dynamics of ammonia oxidizers in soil. ESA, Tucson, AZ\end{verse}
\section{SERVICE, OUTREACH}
{\bf Graduate Student Representative,} Dept. of Earth System Science, UC Irvine, 2006-2007\\  {\bf Graduate Student Seminar Organizer,} Dept. of Earth System Science, UC Irvine, 2005-2006\\
{\bf Undergraduate Mentor,} Dept. of Earth System Science, UC Irvine, 2005-2008\\
{\bf  Ad hoc reviewer,} Geophysical Research Letters, Ecology, Plant and Soil\\
{\bf Judge,} California State Science Fair, 2006-2009\\
{\bf Mentor,} FARMS Leadership, Inc., Sacramento, CA, 2003.

\section{PROFESSIONAL SOCIETY MEMBERSHIP} Ecological Society of America, Mycological Society of America, American Geophysical Union, Sigma Xi

\end{resume}
\end{document}

max_stars_repo_name: dlebauer/vita

max_issues_repo_name: dlebauer/vita

max_forks_repo_name: dlebauer/vita


text:
\documentclass{ecnreport}

\stud{Master 1 CORO / Option Robotique}
\topic{Robot Operating System}
\author{O. Kermorgant}

\begin{document}

\inserttitle{Robot Operating System}

\insertsubtitle{Lab 2: the ``mirror arm'' node}

\section{Goals}

Program a node that can move the left arm of the Baxter robot in a symmetric way with respect to
the motion of the right arm (symmetry with respect to the sagittal plane of the robot).
The node should work in position mode. \\

\subsection{Bring up Baxter}

Even if you have a real Baxter robot it can be a good idea to test the lab in simulation first.
In both cases, we want to have a RViz display, which is mandatory in simulation and quite handy on the real robot. RViz is run automatically in both cases.

\subsubsection{On the real robot}

Baxter is a ROS1-based robot. To work with ROS 2 we thus have to run a bridge that transforms all or some topics between ROS 1 and ROS 2.

A launch file is available in the \texttt{baxter\_bridge} package to run both the bridge and RViz.

You have to connect to Baxter's ROSMASTER in the terminal where you run the bridge:
\begin{bashcodelarge}
 ros2ws
 source ~/ros/baxter.sh # so that your ROSMASTER is Baxter
 ros2 launch baxter_bridge baxter_bridge_launch.py
\end{bashcodelarge}

\subsubsection{In simulation (including virtual machine users)}

The Baxter simulator behaves as the actual Baxter from the ROS 2 side, only with a very limited part of the same topics and services.

The \texttt{baxter\_bridge} node should be run from a ROS 2 terminal:
\begin{bashcodelarge}
ros2ws
ros2 launch baxter_simple_sim sim_launch.py lab:=mirror
\end{bashcodelarge}
The last argument makes the right arm move with a pre-computer motion, as we cannot move it manually.

\subsection{Initial state}

The right arm of the robot can be manually moved by grabbing the wrist, or has a pre-computed motion (in simulation).
It is waiting for any command for the left arm.\\

On the real robot of course, only one group can run their code at a time. This is ensured by the \texttt{baxter\_bridge} that only republished command topics if no other computer has just published on the same topic. Thus, it may be interesting to test your code in the simulation first.

A few in/out topics exist and can be listed through:
\begin{bashcodelarge}
rostopic list (ROS 1)
ros2 topic list (ROS 2)
\end{bashcodelarge}

\section{ROS concepts}

To create the control loop you must get the current \emph{state} of the right arm and send \emph{commands} to
the left arm. You thus need to subcribe and publish to some topics. To not hesitate to use RViz to compare the frames, some of the joints need to get the \textbf{negative}
value of the other arm.

\section{Tasks}

\begin{itemize}
\item Identify the topics that the node should subscribe and publish to: names, message type
\item Check the online documentation ``ROS 2 C++ topics'' to get the overall syntax. This work requires at least a publisher and a subscriber. A timer can also be used to control at which rate you control the arm.
\item Program the node in C++ (and then in Python3 if you feel like it)
\end{itemize}

The package is already created for this lab (\texttt{lab2\_mirror}), you just have to update the C++ file and compile it.\\
Feel free to keep this package as a template for future packages / nodes that you will create.
\end{document}


text:
\documentclass[12pt,a4]{article}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{listings}
\usepackage{fullpage}
\usepackage{color} %red, green, blue, yellow, cyan, magenta, black, white
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
\usepackage{booktabs}

\newcommand*{\field}[1]{\mathbb{#1}}
\newcommand*{\R}{\field{R}} % real R
\newcommand*{\codemat}[1]{\texttt{#1}}
\newcommand*{\matpower}{{\sc Matpower}}

\title{Computation of Maximum loadability limit in \matpower{}}
\author{Camille Hamon}

\begin{document}
\lstset{language=Matlab,%
    breaklines=true,%
    morekeywords={matlab2tikz},
    keywordstyle=\color{blue},%
    morekeywords=[2]{1}, keywordstyle=[2]{\color{black}},
    identifierstyle=\color{black},%
    stringstyle=\color{mylilas},
    commentstyle=\color{mygreen},%
    showstringspaces=false,%without this there will be a symbol in the places where there is a space
    numbers=left,%
    numberstyle={\tiny \color{black}},% size of the numbers
    numbersep=9pt, % this defines how far the numbers are from the text
    emph=[1]{for,end,break},emphstyle=[1]\color{red}, %some words to emphasise
}
\maketitle

\tableofcontents

\section{Examples}
\label{sec:examples}

\subsection{IEEE 9 bus system}

\subsubsection{With reactive power limits}
\label{sec:with-reactive-power}

The following code looks for the maximum loadability point limit in a the direction of load increase defined by \codemat{dir\_mll}.

\lstinputlisting[language=Matlab,firstline=2,lastline=11]{../examples/example_ieee9.m}

The printed results are shown in Figure \ref{fig:res-ieee9}.
The first block of information gives information about the stability margin to the maximum loadability limit (MLL) point and the type of bifurcation at the MLL point.
In this example, the MLL is a limit-induced bifurcation that occurs when generator 2 reaches its reactive power limit.
The second block of information gives the participation of all buses in the direction of load increase, the loads and the voltage magnitudes at all buses at the MLL.
The third block of information shows the reactive power generation at all generators as compared to their limits, and the voltage magnitude at the generator buses as compared to their set points.
A flag \codemat{REF} indicates which generator is the slack.
In the case of a limit-induced bifurcation, a flag \codemat{LIB} indicates the generator which generator caused the LIB when reaching its reactive power limit.

\begin{figure}[!h]
  \centering
\begin{verbatim}
=======================================
      Maximum loadability problem
=======================================
The stability margin is 339.53 MW
The type of bifurcation is limit-induced bifurcation (LIB).
Generator responsible for LIB: Gen 2 connected at bus 2

--------------------------------------------------
   Bus nb    Direction     Load at MLL    Voltages
   ------    ---------     -----------    --------
      1          0             0.00         1.000
      2          0             0.00         1.000
      3          0             0.00         1.000
      4          0             0.00         0.867
      5          0            90.00         0.806
      6          0             0.00         0.852
      7          1           439.53         0.663
      8          0             0.00         0.819
      9          0           125.00         0.784

=============================================================
Reactive power production and voltages at the generators
=============================================================
   Bus nb      Qgen       Qmin       Qmax        Vm      Vref
  --------    -------    ------     ------      -----    -----
      1        305.15    -300.00    9999.00    1.0000   1.0000    REF
      2        300.00    -300.00     300.00    1.0000   1.0000    LIB
      3        255.64    -300.00     300.00    1.0000   1.0000
\end{verbatim}
  \caption{Results of the search for the MLL in the IEEE 9 bus system with reactive power limit enforced.}\label{fig:res-ieee9}
\end{figure}

\subsubsection{Without reactive power limits enforced}
\label{sec:with-react-power}

In this example, the reactive power limits are not enforced in the search for the MLL point.
This is done by setting the flag \codemat{use\_qlim} to 0.

\lstinputlisting[language=Matlab,firstline=13,lastline=15]{../examples/example_ieee9.m}

The results are shown in Figure \ref{fig:res-ieee9-noQ}.
Since the reactive power limits are not enforced, the maximum loadability limit point is now a saddle-node bifurcation point (SNB).
It can be seen that the reactive power generation at the generator at bus 2 is 341.64 Mvar which is larger than its limit (300 Mvar).

\begin{figure}[!hb]
  \centering
\begin{verbatim}
=======================================
      Maximum loadability problem
=======================================
The stability margin is 342.37 MW
The type of bifurcation is saddle-node bifurcation (SNB).

--------------------------------------------------
   Bus nb    Direction     Load at MLL    Voltages
   ------    ---------     -----------    --------
      1          0             0.00         1.000
      2          0             0.00         1.000
      3          0             0.00         1.000
      4          0             0.00         0.846
      5          0            90.00         0.776
      6          0             0.00         0.830
      7          1           442.37         0.620
      8          0             0.00         0.793
      9          0           125.00         0.753

=============================================================
Reactive power production and voltages at the generators
=============================================================
   Bus nb      Qgen       Qmin       Qmax        Vm      Vref
  --------    -------    ------     ------      -----    -----
      1        348.43    -300.00    9999.00    1.0000   1.0000    REF
      2        341.64    -300.00    9999.00    1.0000   1.0000
      3        293.07    -300.00    9999.00    1.0000   1.0000
\end{verbatim}
  \caption{Results of the search for the MLL in the IEEE 9 bus system without enforcement of the reactive power limits.}\label{fig:res-ieee9-noQ}
\end{figure}

\subsubsection{Comparison with the \matpower{} CPF function}
\label{sec:comp-with-matp}

The continuation power flow is implemented in the \matpower{} function \codemat{runcpf}.
It does not consider reactive power limits.
The following code runs the continuation power flow in the same direction of load increase as in the previous section (load increase at bus 7).

\lstinputlisting[language=Matlab,firstline=17]{../examples/example_ieee9.m}

The results are shown in Figure \ref{fig:res-ieee9-cpf}.
Comparing with the results in Figure \ref{fig:res-ieee9-noQ}, it can be seen that both algorithms lead to very similar results; the small differences can be explained by the step length of the CPF algorithm.

\begin{figure}[!h]
  \centering
\begin{verbatim}
================================================================================
|     Bus Data                                                                 |
================================================================================
 Bus      Voltage          Generation             Load
  #   Mag(pu) Ang(deg)   P (MW)   Q (MVAr)   P (MW)   Q (MVAr)
----- ------- --------  --------  --------  --------  --------
    1  1.000    0.000*   482.24    362.02       -         -
    2  1.000  -50.453    163.00    355.52       -         -
    3  1.000  -55.236     85.00    305.48       -         -
    4  0.839  -19.338       -         -         -         -
    5  0.766  -37.631       -         -       90.00     30.00
    6  0.822  -58.708       -         -         -         -
    7  0.605  -79.871       -         -      442.07    154.72
    8  0.784  -57.915       -         -         -         -
    9  0.743  -38.424       -         -      125.00     50.00
                        --------  --------  --------  --------
               Total:    730.24   1023.02    657.07    234.72
\end{verbatim}
  \caption{Results of the \matpower{} implementation of continuation power flow.}\label{fig:res-ieee9-cpf}
\end{figure}

\section{Notations}
\label{sec:notations}

If not indicated otherwise, the notations are the same as in \matpower{}'s manual.

\section{The maximum loadability limit problem}
\label{sec:maxim-load-limit}

Finding the maximum loadability limit from base-case loading $P_d^0 \in \R^{n_b}$ in a load increase direction $d \in \R^{n_b}$ can be done by solving the following optimisation problem

\begin{subequations}\label{eq:maxll}
\begin{align}
  \max_{z} \quad & \alpha \label{eq:maxll-obj} \\
  \text{subject to} \quad & P_d = P_d^0 + \alpha d \label{eq:loadinc}\\
   & Q_d = \text{diag}(\tan \phi^0) P_d \label{eq:loadinc-q}\\
   & g(z) = 0 \\
   & z_\text{min} \leq z \leq z_\text{max} \label{eq:zlim}
\end{align}
\end{subequations}
where
\begin{align}
  \label{eq:z}
  z = [x^T \; \alpha]^T =  \begin{bmatrix}
    \Theta \\
    V_m \\
    P_g \\
    Q_g \\
    \alpha
  \end{bmatrix},
\end{align}
where $x$ is defined in Equation (6.5) in \matpower{}'s manual and the function $g$ is defined is Equations (4.2) and (4.3) in \matpower{}'s manual.
Equation \eqref{eq:loadinc-q} ensures that the power factor of the loads is kept constant to $\cos(\phi_i^0)$, the value defined in the base case.
Note that $\tan \phi^0 \in \R^{n_b}$.
The limits \eqref{eq:zlim} are as follows:
\begin{align}
  & \theta_i = \theta_i^\text{ref}, && i \in \mathcal{I}_\text{ref} \label{eq:thetaslack} \\
  & v_m^{i} = v_m^{i,\text{ref}}, && i \in \mathcal{I}_\text{ref} \label{eq:vmslack} \\
  0 \leq & v_m^{i} \leq v_m^{i,\text{ref}}, && i \in \{1,\ldots,n_g\} \backslash \mathcal{I}_\text{ref} \label{eq:vmpv} \\
  q_g^{i,\text{min}} \leq & q_g^i \leq q_g^{i,\text{max}}, && i \in \{1,\ldots,n_g\} \backslash \mathcal{I}_\text{ref} \label{eq:qgpv}\\
  & p_g^i = p_g^{i,0}, && i \in \{1,\ldots,n_g\} \backslash \mathcal{I}_\text{ref} \\
  & \alpha \in [0,+\infty].
\end{align}
where $p_g^{i,0}$ is the active power generation at bus $i$ in the base case.
Equations \eqref{eq:thetaslack} and \eqref{eq:vmslack} lock the voltage angle and magnitude of the reference buses to their set points.
Equations \eqref{eq:vmpv} and \eqref{eq:qgpv} limit the terminal voltages and reactive power generation at the PV buses.
Note that in theory, complementarity constraints
\begin{align}
  \label{eq:comp-constr}
  (v_m^i-v_m^{i,\text{ref}})\cdot(q_g^i-q_g^{i,\text{max}}), \quad i \in \{1,\ldots,n_g\} \backslash \mathcal{I}_\text{ref}
\end{align}
should be included.
However, in practice, solvers will set $v_m^i = v_m^{i,\text{ref}}$ if $q_g^i$ is smaller than $q_g^{i,\text{max}}$ and let $v_m^i$ be free if $q_g^i$ has reached its limit, since doing so maximizes loadability.

\section{Implementation in \matpower{}}
\label{sec:impl-matp}

\subsection{Inputs}
\label{sec:inputs}

We assume that the following inputs are available:
\begin{enumerate}
\item A \matpower{} base case \codemat{mpc}.
\item A load increase direction $d \in R^{n_b}$, with the assumption that only nonzero loads in \codemat{mpc} can be increased.
\end{enumerate}

\subsection{Defining dispatchable loads}
\label{sec:defin-disp-loads}

A new \matpower{} case \codemat{mpc\_vl} is built where all nonzero loads in \codemat{mpc} are transformed to dispatchable loads:
\begin{lstlisting}[language=Matlab]
mpc_vl = load2disp(mpc)
\end{lstlisting}
Dispatchable loads are described in Section 6.4.2 of \matpower{}'s package.
Note that, conceptually, this means that the active parts of the nonzero loads in $P_d$ enter $P_g$ in \eqref{eq:z} and their reactive parts enter $Q_g$.

\subsection{Adjusting the \matpower{} case}
\label{sec:adjust-matp-case}

\subsubsection{Power constraints of dispatchable loads}
\label{sec:limits-disp-loads}

In \matpower{}, dispatchable loads are assumed to maintain a constant power factor.
This power factor is determined by the values in the columns \codemat{PMIN} and \codemat{QMIN} corresponding to the dispatchable loads in the field \codemat{mpc\_vl.gen}.
When using the function \codemat{load2disp}, these fields are set to the opposite of the active and reactive power parts of the nonzero loads in the base case \codemat{mpc}.
When solving the optimisation problem \eqref{eq:maxll} with \matpower{}, the columns \codemat{PMIN} and \codemat{QMIN} also constrain the maximum values of dispatchable loads.
Since we are looking for maximum loadability limits, upper values on loads must not be binding.
Therefore, the values \codemat{PMIN} of rows in \codemat{mpc\_vl.gen} corresponding to dispatchable loads is set to a very large negative values and the values \codemat{QMIN} of these dispatchable loads are changed accordingly to keep the constant power factor defined in the base case.

\subsubsection{Power constraints on generators}
\label{sec:constr-gen}

The maximum loadability limit problem differs from a standard AC OPF as defined in Equations (6.1) to (6.4) in \matpower{}'s manual in the following way
\begin{enumerate}
\item Active power production at PV buses is locked to the base case values. Therefore, the columns \codemat{PMIN} and \codemat{PMAX} of these generators are set to their active power production in the base case.
\item Generators at reference buses pick up the loads during the load increase process. The assumption here is that the reference buses correspond to strong generators that do not reach their power limits. Therefore, active and reactive power limits of the generators at reference buses are set to large values.
\end{enumerate}

\subsubsection{Voltage constraints}
\label{sec:volt-constr-at}
Similarly to power constraints discussed above, voltage constraints in the maximum loadability problem differ from a standard AC OPF as follows
\begin{enumerate}
\item Voltage magnitudes at the reference buses are locked at their set point values, see Equation \eqref{eq:vmslack}.
\item Voltage magnitudes at all PV and PQ buses are not constrained from below. The reason for this is that the maximum loadability limit point typically corresponds to an operating point that is outside the normal allowed band on bus voltage magnitude. Therefore, to find this point, lower limits on bus voltage magnitudes of PV and PQ buses must be relaxed.
\item For the same reason, upper bounds on voltage magnitudes of PQ buses are also relaxed.
\item Upper bounds on voltage magnitudes of PV buses are set to the voltage set point of the corresponding generators.
\end{enumerate}

\subsubsection{Branch flows}
\label{sec:branch-flows}

For the same reason as for bus voltages, the branch flow constraints must be relaxed so that they do not become binding during the optimisation process.

\subsubsection{Decision variable $\alpha$ and additional constraints}
\label{sec:defin-vari-alpha}

Compared to the standard AC OPF formulation in \matpower{}, the formulation in \eqref{eq:maxll} contains an additional decision variable $\alpha$, see \eqref{eq:z}, and the additional constraints \eqref{eq:loadinc}.
Note that constraints \eqref{eq:loadinc-q} does not exist in the standard AC OPF formulation either, but \matpower{} assumes a constant power factor model for the dispatchable loads, see also Section \ref{sec:limits-disp-loads}.
Therefore, there is no need to define the additional constraint \eqref{eq:loadinc-q}.
The decision variable $\alpha$ and the constraint \eqref{eq:loadinc} are defined using a callback function for the \codemat{formulation} stage.

Following Section 7.2 in \matpower{}'s manual, we create a callback function called \codemat{userfcn\_direction\_mll\_formulation(om,args)} in which we define the new variable and constraints.
To define the new constraint, recall that when transforming the loads to dispatchable loads, the nonzero loads of the base case enter the set of generators, see Section \ref{sec:defin-disp-loads}.
\matpower{} has a feature to only define the additional constraints on the relevant components of the decision variable $z$ in \eqref{eq:z}.
For Equation \eqref{eq:loadinc}, the relevant component of $z$ are $P_g$ (since the dispatchable loads enter $P_g$) and $\alpha$.

\subsubsection{Costs}
\label{sec:costs}

When solving an OPF with dispatchable loads in \matpower{}, the costs of dispatchable loads is added to that of the generator production costs.
Since the objective function of the maximum loadability limit is just $\alpha$ (see \eqref{eq:maxll-obj}), we are not interested in keeping track of the cost of dispatchable loads and generators.
These costs are therefore set to zero.

The cost for $\alpha$ is defined in the callback function introduced in Section \ref{sec:defin-vari-alpha}.
It is set to -1 since the objective in \eqref{eq:maxll-obj} is to maximize $\alpha$, whereas \matpower{} performs a minimisation.

\subsubsection{Functions}
\label{sec:functions}

The functions in Table \ref{tab:functions} are used to set up and solving the maximum loadability limit problem with \matpower{}.

\begin{table}[!h]
  \centering
  \begin{tabular}{lp{8cm}}
  \toprule
  Name  & Description \\
  \midrule
  \codemat{maxloadlim} & Main function for solving the maximum loadability limit problem.\\
  \codemat{postproc\_maxloadlim} & Post-processing function that transforms the dispatchable loads back to normal loads.\\
  \codemat{prepare\_maxloadlim} & Prepares the \matpower{} case before the AC OPF is run, see Section \ref{sec:adjust-matp-case}.\\
  \codemat{print\_maxloadlim} & Pretty prints the results from the maximum loadability problem.\\
  \codemat{userfcn\_direction\_mll\_ext2int} & Converts the vector of generator production changes to internal indexing.\\
  \codemat{userfcn\_direction\_mll\_formulation} & Callback function to define new variables, constraints and costs, see Section \ref{sec:defin-vari-alpha}. \\
  \bottomrule
  \end{tabular}
  \caption{Functions used for the maximum loadability limit problem}
  \label{tab:functions}
\end{table}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: