Hello,
The method FAMIXPackage>>relativeImportanceForSystemt throws a ZeroDivide when we have a model with one package (allModelPackages=1). Should I remove the "-1" at the end?
FAMIXPackagerelativeImportanceForSystem ^ self lookUpPropertyNamed: #PRIS computedAs: [ self numberOfClientPackages / (self mooseModel allModelPackages size - 1)]
On Fri, Jul 8, 2011 at 1:40 AM, Andre Hora andrehoraa@gmail.com wrote:
FAMIXPackagerelativeImportanceForSystem ^ self lookUpPropertyNamed: #PRIS computedAs: [ self numberOfClientPackages / (self mooseModel allModelPackages size - 1)]
or just protect against zero:
FAMIXPackagerelativeImportanceForSystem ^ self lookUpPropertyNamed: #PRIS computedAs: [ self numberOfClientPackages / ((self mooseModel allModelPackages size - 1) max: 1)]
yes sure. just didn't understand the -1 at the end :)
On Fri, Jul 8, 2011 at 6:35 PM, Chris Cunningham cunningham.cb@gmail.comwrote:
On Fri, Jul 8, 2011 at 1:40 AM, Andre Hora andrehoraa@gmail.com wrote:
FAMIXPackagerelativeImportanceForSystem ^ self lookUpPropertyNamed: #PRIS computedAs: [ self numberOfClientPackages / (self mooseModel allModelPackages size - 1)]
or just protect against zero:
FAMIXPackagerelativeImportanceForSystem ^ self lookUpPropertyNamed: #PRIS computedAs: [ self numberOfClientPackages / ((self mooseModel allModelPackages size - 1) max: 1)]
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev