CRPDatasetFactory.getMaxRange : fix formula

This commit is contained in:
teo_sarca 2008-12-04 07:47:37 +00:00
parent ce609bc33f
commit 1c913f8cbf
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ public abstract class CRPDatasetFactory extends CRPReasoner implements CRPModel
{
BigDecimal utilizationDec = r.getPercentUtilization().divide(Env.ONEHUNDRED, 2, RoundingMode.HALF_UP);
int precision = 2; // TODO: hardcoded
return r.getDailyCapacity().divide(utilizationDec, precision, RoundingMode.HALF_UP);
return r.getDailyCapacity().multiply(utilizationDec).setScale(precision, RoundingMode.HALF_UP);
}
public CategoryDataset getDataset()