function initOptions(arr,ksloc,a,b,sfKeys,sfVals,emKeys,emVals, keys,vals,n1,n2,i) { #insert ksloc, a, b arr["ksloc"] = ksloc arr["a"] = a arr["b"] = b arr[size()] = 3 #insert the scale factors n1 = split(sfKeys,keys,",") n2 = split(sfVals,vals,",") if (n1 != n2) print "Invalid # of key/val pairs for scale factor input data" #for (i=1; i<=n1; i++) # arr[keys[i]] = vals[i] # for (i=1; i<=n1; i++) { arr[keys[i]] = vals[i] } arr[size()] = arr[size()] + n1 #insert the effort multipliers n1 = split(emKeys,keys,",") n2 = split(emVals,vals,",") if (n1 != n2) print "Invalid # of key/val pairs for effort multiplier input data" for (i=1; i<=n1; i++) { arr[keys[i]] = vals[i] } arr[size()] = arr[size()] + n1 #arr[size()] += + n1 } function size() {return 0} function key(i) {return -1*i} function value(i) {return i} function Effort(i) { return A(i)* Ksloc(i)^E(i) * Sced(i) * EffortMults16(i) } function EffortMults16(i) { return \ Rely(i) * Data(i) * Cplx(i)* \ Ruse(i) * Docu(i) * Time(i)* \ Stor(i) * Pvol(i) * Acap(i)* \ Pcap(i) * Pcon(i) * Apex(i)* \ Plex(i) * Ltex(i) * Tool(i)* \ Site(i) ; } function E(i) { return B(i) + 0.01*(Prec(i) + Flex(i) + Resl(i) + Team(i) + Pmat(i)) } function Ksloc(i){ return i["ksloc"] } function A(i) { return i["a"] } function B(i) { return i["b"] } function Acap(i) { return Tunings["em","acap",i["acap"]] } function Apex(i) { return Tunings["em","apex",i["apex"]] } function Cplx(i) { return Tunings["em","cplx",i["cplx"]] } function Data(i) { return Tunings["em","data",i["data"]] } function Docu(i) { return Tunings["em","docu",i["docu"]] } function Flex(i) { return Tunings["sf","flex",i["flex"]] } function Ltex(i) { return Tunings["em","ltex",i["ltex"]] } function Pcap(i) { return Tunings["em","pcap",i["pcap"]] } function Pcon(i) { return Tunings["em","pcon",i["pcon"]] } function Plex(i) { return Tunings["em","plex",i["plex"]] } function Pmat(i) { return Tunings["sf","pmat",i["pmat"]] } function Prec(i) { return Tunings["sf","prec",i["prec"]] } function Pvol(i) { return Tunings["em","pvol",i["pvol"]] } function Rely(i) { return Tunings["em","rely",i["rely"]] } function Resl(i) { return Tunings["sf","resl",i["resl"]] } function Ruse(i) { return Tunings["em","ruse",i["ruse"]] } function Sced(i) { return Tunings["em","sced",i["sced"]] } function Site(i) { return Tunings["em","site",i["site"]] } function Stor(i) { return Tunings["em","stor",i["stor"]] } function Team(i) { return Tunings["sf","team",i["team"]] } function Time(i) { return Tunings["em","time",i["time"]] } function Tool(i) { return Tunings["em","tool",i["tool"]] }