#utility functions function pickRange(min, max) { return (max - min) * rand() + min } #better, faster, cheaper score function score(effort, def, months, rely) { return sqrt(months^2 + effort^2 + (def * (1 + 1.8^(rely-3)))^2) } function makeArray(arr) {split("",arr,"")} function err(errstr) { print errstr } function printDump(arr, indx) { for (indx in arr) print indx ": " arr[indx] } function append(atom, str) { if (str) str = str " " atom else str = atom return str } #accessors #--------------------- #model array accessors #--------------------- function getAlias(i) {return i"-alias"} function getSlopeMax(i) {return i"-slope-max"} function getSlopeMin(i) {return i"-slope-min"} function getEffortSlope(i) {return i"-effort-slope"} function getReqSlope(i) {return i"-req-slope"} function getDesignSlope(i) {return i"-design-slope"} function getCodeSlope(i) {return i"-code-slope"} function getRangeMax(i) {return i"-range-max"} function getRangeMin(i) {return i"-range-min"} function getKeys() {return "allkeys"} function getEMKeys() {return "emkeys"} function getSFKeys() {return "sfkeys"} function getDRKeys() {return "drkeys"} #----------------------- #grammar array accessors #----------------------- function getProd(i) {return i} function getOdds(i) {return -1 * i} function size() {return 0} #----------------------- #project array accessors #----------------------- function getTuning(i) {return i"-tuning"} function getRating(i) {return i"-rating"} #-------------------- #risk array accessors #-------------------- function getAttr() {return "attribute"} function getValue() {return "value"} function getWeight() {return "weight"}