# 構造性成本模型

## 原理

${\displaystyle y=\beta _{0}+\beta _{1}x_{1}+\beta _{2}x_{2}+\beta _{3}x_{3}+...+\varepsilon _{i},\quad i=1,\dots ,n.\!}$

## 計法

${\displaystyle E=a_{i}({\text{KLoC}})^{b_{i}}({\text{EAF}})}$，當中
• ${\displaystyle E}$ 係「要用幾多精力」；
• ${\displaystyle {\text{KLoC}}}$ 係估計個軟件項目有幾多千行碼（睇大細估計）；
• ${\displaystyle {\text{EAF}}}$ 係一個佢哋有特定方法評估嘅因子，數值取決於隻軟件嘅複雜度、記憶體限制同埋工程師嘅能力等多個因素；
• ${\displaystyle a_{i},b_{i}}$ 係參數，數值係由班研究者憑啲數據估算出嚟嘅，數值會視乎軟件項目嘅種類而有異，最基本嘅可以係 ${\displaystyle a_{i}=3.2,b_{i}=1.05}$。然後
${\displaystyle D=2.5E^{c_{i}}}$
• ${\displaystyle D}$ 係成場開發要花嘅時間（以月計）；
• ${\displaystyle c_{i}}$ 係參數，數值又係會視軟件項目嘅種類而有異，最基本嘅可以係 ${\displaystyle c_{i}=0.38}$

## 攷

1. Krämer, W., & Sonnberger, H. (2012). The linear regression model under test. Springer Science & Business Media.
2. Kemerer, Chris F. (May 1987). "An Empirical Validation of Software Cost Estimation Models" (PDF). Communications of the ACM. 30 (5): 416–42.
3. Boehm, B., Clark, B., Horowitz, E., Westland, C., Madachy, R., & Selby, R. (1995). Cost models for future software life cycle processes: COCOMO 2.0. Annals of software engineering, 1(1), 57-94.