summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-07-19 13:56:17 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-07-19 13:56:17 +0200
commit899e89518bd6b322a6d99f613fc4423f00b9bd64 (patch)
treeb875a4fc49bd6f808222882eef766693858a8b72
parent55ea8ca0719d8e098de21c765f4d3524f7f474e1 (diff)
downloadorg-mode-899e89518bd6b322a6d99f613fc4423f00b9bd64.tar.gz
Estimate ranges in column view
* lisp/org-colview-xemacs.el (org-columns-compile-map): (org-columns-number-to-string): (org-columns-string-to-number): Handle estimate ranges. (org-estimate-mean-and-var): New function. (org-estimate-combine): New function. (org-estimate-print): New function. (org-string-to-estimate): New function.
-rw-r--r--doc/org.texi18
-rw-r--r--lisp/org-colview-xemacs.el19
-rw-r--r--lisp/org-colview.el22
3 files changed, 28 insertions, 31 deletions
diff --git a/doc/org.texi b/doc/org.texi
index 94c3140..2b137d9 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -4766,21 +4766,21 @@ Be aware that you can only have one summary type for any property you
include. Subsequent columns referencing the same property will all display the
same summary information.
-The 'est+' summary type requires further explanation. It is used for
-combining task estimates, expressed as low-high ranges. For example, instead
+The @code{est+} summary type requires further explanation. It is used for
+combining estimates, expressed as low-high ranges. For example, instead
of estimating a particular task will take 5 days, you might estimate it as
5-6 days if you're fairly confident you know how much woark is required, or
1-10 days if you don't really know what needs to be done. Both ranges
average at 5.5 days, but the first represents a more predictable delivery.
When combining a set of such estimates, simply adding the lows and highs
-produces an unrealistically wide result. Instead, 'est+' adds the statistical
-mean and variance of the sub-tasks, generating a final estimate from the sum.
-For example, suppose you had ten tasks, each of which was estimated at 0.5 to
-2 days of work. Straight addition produces an estimate of 5 to 20 days,
-representing what to expect if everything goes either extremely well or
-extremely poorly. In contrast, 'est+' estimates the full job more
-realistically, at 10-15 days.
+produces an unrealistically wide result. Instead, @code{est+} adds the
+statistical mean and variance of the sub-tasks, generating a final estimate
+from the sum. For example, suppose you had ten tasks, each of which was
+estimated at 0.5 to 2 days of work. Straight addition produces an estimate
+of 5 to 20 days, representing what to expect if everything goes either
+extremely well or extremely poorly. In contrast, @code{est+} estimates the
+full job more realistically, at 10-15 days.
Here is an example for a complete columns definition, along with allowed
values.
diff --git a/lisp/org-colview-xemacs.el b/lisp/org-colview-xemacs.el
index f5e2872..35e55f8 100644
--- a/lisp/org-colview-xemacs.el
+++ b/lisp/org-colview-xemacs.el
@@ -1700,8 +1700,7 @@ This will add overlays to the date lines, to show the summary for each day."
(high (float (cadr v)))
(mean (/ (+ low high) 2.0))
(var (/ (+ (expt (- mean low) 2.0) (expt (- high mean) 2.0)) 2.0)))
- (list mean var)
- ))
+ (list mean var)))
(defun org-estimate-combine (&rest el)
"Combine a list of estimates, using mean and variance.
@@ -1715,21 +1714,21 @@ and variances (respectively) of the individual estimates."
(setq var (+ var (cadr stats)))))
el)
(let ((stdev (sqrt var)))
- (list (- mean stdev) (+ mean stdev)))
- ))
+ (list (- mean stdev) (+ mean stdev)))))
(defun org-estimate-print (e &optional fmt)
- "Prepare a string representation of an estimate, as two numbers with a '-' in between them."
+ "Prepare a string representation of an estimate.
+This formats these numbers as two numbers with a \"-\" between them."
(if (null fmt) (set 'fmt "%.0f"))
(format "%s" (mapconcat (lambda (n) (format fmt n)) e "-")))
(defun org-string-to-estimate (s)
- "Convert a string to an estimate. The string should be two numbers joined with a '-'."
+ "Convert a string to an estimate.
+The string should be two numbers joined with a \"-\"."
(if (string-match "\\(.*\\)-\\(.*\\)" s)
- (list (string-to-number (match-string 1 s)) (string-to-number(match-string 2 s)))
- (list (string-to-number s) (string-to-number s))
- ))
-
+ (list (string-to-number (match-string 1 s))
+ (string-to-number(match-string 2 s)))
+ (list (string-to-number s) (string-to-number s))))
(provide 'org-colview)
(provide 'org-colview-xemacs)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index f7e345e..4a599da 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1501,8 +1501,7 @@ This will add overlays to the date lines, to show the summary for each day."
(high (float (cadr v)))
(mean (/ (+ low high) 2.0))
(var (/ (+ (expt (- mean low) 2.0) (expt (- high mean) 2.0)) 2.0)))
- (list mean var)
- ))
+ (list mean var)))
(defun org-estimate-combine (&rest el)
"Combine a list of estimates, using mean and variance.
@@ -1516,22 +1515,21 @@ and variances (respectively) of the individual estimates."
(setq var (+ var (cadr stats)))))
el)
(let ((stdev (sqrt var)))
- (list (- mean stdev) (+ mean stdev)))
- ))
+ (list (- mean stdev) (+ mean stdev)))))
(defun org-estimate-print (e &optional fmt)
- "Prepare a string representation of an estimate, as two numbers with a '-' in between them."
+ "Prepare a string representation of an estimate.
+This formats these numbers as two numbers with a \"-\" between them."
(if (null fmt) (set 'fmt "%.0f"))
- (format "%s" (mapconcat (lambda (n) (format fmt n)) e "-"))
- )
+ (format "%s" (mapconcat (lambda (n) (format fmt n)) e "-")))
(defun org-string-to-estimate (s)
- "Convert a string to an estimate. The string should be two numbers joined with a '-'."
+ "Convert a string to an estimate.
+The string should be two numbers joined with a \"-\"."
(if (string-match "\\(.*\\)-\\(.*\\)" s)
- (list (string-to-number (match-string 1 s)) (string-to-number(match-string 2 s)))
- (list (string-to-number s) (string-to-number s))
- ))
-
+ (list (string-to-number (match-string 1 s))
+ (string-to-number(match-string 2 s)))
+ (list (string-to-number s) (string-to-number s))))
(provide 'org-colview)