diff --git a/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultCapacityOriginator.java b/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultCapacityOriginator.java index 257e78c8..cf443b03 100644 --- a/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultCapacityOriginator.java +++ b/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultCapacityOriginator.java @@ -432,17 +432,16 @@ private double adjustCapacityForPopulationRatio ( double capacity, TariffSubscription subscription) { double popRatio = - getPopulationRatio(subscription.getCustomersCommitted(), - parentBundle.getPopulation()); + (double) subscription.getCustomersCommitted() / (double) parentBundle.getPopulation(); logCapacityDetails(logIdentifier + ": population ratio = " + popRatio); return capacity * popRatio; } // TODO -- seems gratuitous - private double getPopulationRatio (int customerCount, int population) - { - return ((double) customerCount) / ((double) population); - } + //private double getPopulationRatio (int customerCount, int population) + //{ + // return ((double) customerCount) / ((double) population); + //} private double adjustCapacityForTariffRates ( int timeslot, double baseCapacity, TariffSubscription subscription) diff --git a/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultUtilityOptimizer.java b/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultUtilityOptimizer.java index 0149fdf6..51acd72b 100644 --- a/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultUtilityOptimizer.java +++ b/factored-customer/src/main/java/org/powertac/factoredcustomer/DefaultUtilityOptimizer.java @@ -91,6 +91,7 @@ public void initialize (FactoredCustomerService service) TariffEvaluator evaluator = createTariffEvaluator(new TariffEvaluationWrapper(bundle)) .withChunkSize(Math.max(1, bundle.getPopulation() / 1000)) + // should be a configurable value .withTariffSwitchFactor(subStructure.getTariffSwitchFactor()) .withPreferredContractDuration(subStructure.getExpectedDuration()) .withInconvenienceWeight(subStructure.getInconvenienceWeight())