\Section{The Models}\label{sec:models}
This section
describes the COCOMO effort $Ef$ and time $Ti$ predictor
and the COQUALMO defect $De$ predictor.
SEESAW normalizes these scores 0..100 then seeks ways to minimize the following combination
of the normalized scores:
$\sqrt{Ef^2 + Ti^2 + De^2}$ (this expression is  
the Euclidean distance of normalized effort, time, defects to their minimum possible value).

Note that, in the following,
the range of possible tunings within these models ins represented
by
Equations \ref{eq:mem},\ref{eq:linesf},\ref{eq:coq} and \ref{eq:linedefrem}.

\SubSection{Effort Prediction with COCOMO}

COCOMO predicts development effort $Ef$ in total staff months where one month is 152
hours (and includes development and management hours). 
In COCOMO, the  {\em scale factors} $SF_i$ of \fig{cparems}
affect effort exponentially on KSLOC (Thousands of Source Lines of Code)
while {\em effort multipliers} $EM_j$
affect effort linearly:

{\footnotesize\begin{equation}\label{eq:coc2}
Ef= months=a*\left(KSLOC^{\left(b+0.01*\sum_{i=1}^{5}SF_i\right)}\right)*\left(\prod_{j=1}^{17}EM_j\right)
\end{equation}}
where KSLOC is estimated
directly or computed from a function point analysis;
 $SF_i$ and $EM_j$ are the {\em scale factors} and
{\em effort multipliers} of \fig{cparems};
and
$a$ and $b$ are  the features discussed in \eq{ab}. 

For effort multipliers, off-nominal ranges \{vl=1, l=2, h=4, vh=5, xh=6\} 
change the prediction by some ratio.
The nominal range \{n=3\}, however, corresponds to an effort multiplier of 1, causing
no change to the prediction.
Hence, these  ranges  can be modeled as straight lines $y=mx+b$
passing through the point $\{x,y\}$=$\{3,1\}$. Such a line has a y-intercept
of $b=1 - 3m$. Substituting this value of $b$ into $y=mx+b$ yields:
\begin{equation}\label{eq:lineem}\small
\begin{array}{l}
\forall x \in \{1..6\}\; EM_i=m_\alpha(x-3) + 1
\end{array}
\end{equation}
where  $m_\alpha$ denotes the effect of effort multiplier $a$ on {\em effort}.

The effort multipliers form
into two sets:
\be
\item
The {\em positive effort EM} features, with slopes $m^+_\alpha$, that are proportional to effort. 
These features are:
cplx,
data,
docu,
pvol,
rely,
ruse,
stor, and
time.
\item
The
{\em negative effort EM} features, with slopes $m^-_{\alpha}$,
are inversely proportional to effort.
These features are 
acap,
apex,
ltex,
pcap,
pcon,
plex,
sced,
site, and
tool.
\ee
Based on prior work~\cite{boehm00a}, we can describe
the
space of known tunings for COCOMO effort multipliers to be 
\begin{equation}\label{eq:mem}\small
\left(0.073 \le m^+_\alpha \le 0.21\right) \wedge
\left(-0.178 \le m^-_\alpha \le -0.078\right)
\end{equation}
Similarly, using experience from 161 projects~\cite{boehm00a},
we can say that the space of known tunings for the COCOMO scale factors 
(prec, flex, resl, team, pmat)
are:
\begin{equation}\label{eq:linesf}\small
 \forall x \in \{1..6\}\; SF_i=m_\beta(x - 6) \wedge \left(
-1.56	\le m_\beta \le -1.014\right)
\end{equation}
where  $m_\beta$ denotes the effect of scale factor $i$ on {\em effort}.

One technical detail before continuing: we represent the space of possible tunings
as minimum and maximum
sloped lines that bound the space of known past tunings. 
Not all the COCOMO/COQUALMO relationships are linear; some are intricate
piecewise linear functions. For those relationships, we extend our minimal and 
maximal lines such that the piecewise linear functions fall inside the extended bounds.
 
\SubSection{Time Prediction with COCOMO}
COCOMO's {\em effort} prediction model relates to total staff time required for a project,
COCOMO's {\em time} prediction model relates to project duration (in calendar months).

To predict  time, COCOMO starts with
the effort value $Ef$, removes the effect of schedule pressure, then
raises the result to a fraction of the scale factors. Finally, an adjusted value 
$sced2$ is applied to the calculation:
\[
Ti = c \cdot (Ef/sced)^{d+ 0.2\sum_iSF_i} \cdot sced2
\]
The $\{c,d,sced2\}$ values come from tables of 
constants. 
\SubSection{Defect Prediction with COQUALMO }
COQUALMO has two core models, used three ways.
 The {\em defect introduction} model is similar to
\eq{coc2}: settings to \fig{cparems}'s effort multipliers and scale factors
map to predictions about the number of defects
 that will be introduced in a given phase of development.
Also, the {\em defect removal} model represents how various tasks (peer reviews, execution-based
testing, and automated analysis) decrease the 
number of defects that flow through to the next stage of development.

These  models are repeated 
for each of the three development phases of
requirements, design, and coding.
COQUALMO follows the same convention as COCOMO for the effort multipliers:
nominal values ($n=3$) do not change the predicted number of defects. Hence:
\begin{equation}\label{eq:linedefintro}\small
\begin{array}{l}
 \forall x \in \{1..6\}\; Defects_i=m_\gamma(x-3) + 1
\end{array}
\end{equation}
where  $m_\gamma$ denotes the effect of $i$ on {\em defect introduction}.
The effort multipliers and  scale factors form two sets:
\be
\item The {\em positive defect} features, with slopes $m^+_\gamma$, that are proportional
to the estimated defects. These features are 
flex,
data,
ruse,
cplx,
time,
stor, and 
pvol.
\item The {\em negative defect} features, with slopes $m^-_\gamma$, that are inversely proportional
to the estimated defects. These features are 
acap,
pcap,
pcon,
apex,
plex,
ltex,
tool,
site,
sced,
 prec,
resl,
team,
pmat,
rely, and
docu.
\ee
The space of tunings for  defect introducing features are:
\begin{equation}\label{eq:coq}\small
\begin{array}{c}
requirements\left\{
\begin{array}{c}
0 \le m^+_\gamma \le 0.112\\
-0.183 \le m^-_\gamma \le -0.035
\end{array}
\right. \\
~\\
design \left\{
\begin{array}{c}
0 \le m^+_\gamma \le 0.14\\
-0.208 \le m^-_\gamma \le -0.048
\end{array}
\right. \\
~\\
coding \left\{
\begin{array}{c}
0 \le m^+_\gamma \le  0.14\\
-0.19 \le m^-_\gamma \le -0.053
\end{array}
\right.
\end{array}
\end{equation}

\noindent
The space of tunings for  defect removal features are:
\begin{equation}\label{eq:linedefrem}\small
\begin{array}{rl}
\forall x \in \{1..6\} &SF_i=m_\delta(x - 1)\\
requirements: 	& 0.08 	\le m_\delta \le 0.14 \\
design: 		& 0.1 	\le m_\delta \le 0.156 \\
coding: 		& 0.11 	\le m_\delta \le 0.176 \\
\end{array}
\end{equation}
where  $m_\delta$ denotes the effect of  $i$ on {\em defect removal}.
