|
@@ -22,14 +22,13 @@ function _calc
|
22
|
22
|
function _divider
|
23
|
23
|
{
|
24
|
24
|
divider=------------------------------
|
25
|
|
- divider=" "$divider$divider$divider
|
26
|
|
- width=85
|
|
25
|
+ divider=" +"$divider$divider$divider"+"
|
|
26
|
+ width=88
|
27
|
27
|
|
28
|
|
- printf "%$width.${width}s\n" "$divider"
|
|
28
|
+ printf "%$width.${width}s+\n" "$divider"
|
29
|
29
|
}
|
30
|
30
|
|
31
|
|
-header="\n %-12s |%11s |%10s |%12s |%9s |%9s |%9s\n"
|
32
|
|
-format=" %-12s |%11s |%10s |%12s |%9s |%9s |%9s\n"
|
|
31
|
+format=" | %-12s |%11s |%10s |%12s |%9s |%9s |%9s |\n"
|
33
|
32
|
|
34
|
33
|
counter=0
|
35
|
34
|
total_estimate=0
|
|
@@ -54,7 +53,9 @@ for var in "$@"; do
|
54
|
53
|
|
55
|
54
|
# header
|
56
|
55
|
if [[ $counter = 1 ]]; then
|
57
|
|
- printf "$header" "#" "optimistic" "realistic" "pessimistic" "duration" "risk" "variance"
|
|
56
|
+ echo -e "\nTasks\n"
|
|
57
|
+ _divider
|
|
58
|
+ printf "$format" "#" "optimistic" "realistic" "pessimistic" "duration" "risk" "variance"
|
58
|
59
|
_divider
|
59
|
60
|
fi
|
60
|
61
|
|
|
@@ -86,8 +87,13 @@ if [[ $total_estimate > 0 ]]; then
|
86
|
87
|
# footer
|
87
|
88
|
_divider
|
88
|
89
|
printf "$format" "summary" "-" "-" "-" $total_estimate $total_standard_deviation $total_variance
|
|
90
|
+ _divider
|
|
91
|
+
|
|
92
|
+ echo -e "\nThree point estimates\n"
|
89
|
93
|
|
90
|
|
- #echo -e "\nThree point estimate:"
|
|
94
|
+ echo -e " 1 Sigma - 68% confidence:" $(_calc "$total_estimate - $total_variance") "-" $(_calc "$total_estimate + $total_variance")
|
|
95
|
+ echo -e " 2 Sigma - 95% confidence:" $(_calc "$total_estimate - 2 * $total_variance") "-" $(_calc "$total_estimate + 2 * $total_variance")
|
|
96
|
+ echo -e " 2 Sigma - 99.7% confidence:" $(_calc "$total_estimate - 3 * $total_variance") "-" $(_calc "$total_estimate + 2 * $total_variance")
|
91
|
97
|
|
92
|
98
|
fi
|
93
|
99
|
|