;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This file is part of "NOVA": NOVA = search + COCOMO tools ; Copyright, 2008, Tim Menzies tim@menzies.us ; ; NOVA is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation, either version 3 of the License, or ; (at your option) any later version. ; ; NOVA is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; a long with NOVA. If not, see . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun effort () "Returns total development and management effort in months." (macrolet ((f (x) `(em2effort ',x)) (s (x) `(sf2effort ',x))) (let ((a (! 'a)) (b (! 'b)) (kloc (! 'kloc))) (* a (expt kloc (+ b (* 0.01 (+ (s prec) (s flex) (s resl) (s team) (s pmat))))) (f time) (f stor) (f data) (f pvol) (f ruse) (f rely) (f docu) (f acap) (f pcap) (f pcon) (f aexp) (f plex) (f ltex) (f tool) (f cplx) (f site) (f sced))))) (defun demo-effort1 (&optional (*db* *db*)) "Calculates effort 10 times." (let (out) (dotimes (i 10 (sort out #'<)) (push (demo-effort0) out)))) (defun demo-effort2 (&optional (*db* *db*)) "Displays the distribution of 1000 effort calculations." (let ((d (make-dist :fuzz 2000))) (dotimes (i 1000) (dist-add (demo-effort0) d)) (format t "Effort estimates, rounded to the nearest 2000~%") (distogram d :shrink 100 :lwidth 10 :rwidth 6))) (defun demo-effort0 () "Initializes the *db* to COCOMO defaults and calculates effort." (init-db) (effort)) (egs :effort (eg '(demo-effort1) :of "calculating effort 10 times") (eg '(demo-effort2) :of "displaying the distribution of 1000 effort calculations"))