@Override public void evaluateTariffs () { for (CapacityBundle bundle : capacityBundles) { TariffEvaluator evaluator = evaluatorMap.get(bundle); if (bundle.getSubscriberStructure().getInertiaDistribution() != null) { evaluator.withInertia(bundle.getSubscriberStructure() .getInertiaDistribution().drawSample()); } else { log.warn("no inertia distro, using default value 0.7"); evaluator.withInertia(0.7); } evaluator.evaluateTariffs(); } }
TariffEvaluator te = new TariffEvaluator(wrapper); te.initializeInconvenienceFactors(OfficeComplexConstants.TOU_FACTOR, OfficeComplexConstants.TIERED_RATE_FACTOR, OfficeComplexConstants.VARIABLE_PRICING_FACTOR, OfficeComplexConstants.INTERRUPTIBILITY_FACTOR); te.withInconvenienceWeight(weight) .withInertia(Double.parseDouble(conf .getProperty(type + "Inertia"))) .withPreferredContractDuration(weeks .withRationality(Double.parseDouble(conf .getProperty(type + "Rationality"))) .withTariffEvalDepth(OfficeComplexConstants.TARIFF_COUNT) .withTariffSwitchFactor(OfficeComplexConstants.TARIFF_SWITCH_FACTOR); te = new TariffEvaluator(wrapper); te.initializeInconvenienceFactors(OfficeComplexConstants.TOU_FACTOR, OfficeComplexConstants.TIERED_RATE_FACTOR, OfficeComplexConstants.VARIABLE_PRICING_FACTOR, OfficeComplexConstants.INTERRUPTIBILITY_FACTOR); te.withInconvenienceWeight(weight) .withInertia(Double.parseDouble(conf .getProperty(type + "Inertia"))) .withPreferredContractDuration(weeks .withRationality(Double.parseDouble(conf .getProperty(type + "Rationality")))
tariffEvaluator = new TariffEvaluator(this); tariffEvaluator.withInertia(0.7).withRationality(0.99) .withPreferredContractDuration(14); tariffEvaluator.initializeInconvenienceFactors(0.0, 0.01, 0.0, 0.0); tariffEvaluator.initializeRegulationFactors(0.0, maxDischargeKW * 0.2 * chargeEfficiency, maxChargeKW * 0.2);
TariffSubscriberStructure subStructure = bundle.getSubscriberStructure(); TariffEvaluator evaluator = new TariffEvaluator(new TariffEvaluationWrapper(bundle)) .withChunkSize(Math.max(1, bundle.getPopulation() / 1000)) .withTariffSwitchFactor(subStructure.getTariffSwitchFactor()) .withPreferredContractDuration(subStructure.getExpectedDuration()) .withInconvenienceWeight(subStructure.getInconvenienceWeight()) .withRationality(subStructure.getLogitChoiceRationality()) .withEvaluateAllTariffs(true); evaluator.initializeCostFactors(subStructure.getExpMeanPriceWeight(), subStructure.getMaxValuePriceWeight(), subStructure.getRealizedPriceWeight(), subStructure.getTariffVolumeThreshold()); evaluator.initializeInconvenienceFactors(subStructure.getTouFactor(), subStructure.getTieredRateFactor(), subStructure.getVariablePricingFactor(), subStructure.getInterruptibilityFactor()); evaluator.initializeRegulationFactors(subStructure.getExpUpRegulation(), 0.0, subStructure.getExpDownRegulation());
public void evaluateTariffs (List<Tariff> tariffs) { evaluator.evaluateTariffs(); }
private TariffEvaluator createTariffEvaluator () { TariffEvaluationWrapper wrapper = new TariffEvaluationWrapper(); TariffEvaluator te = new TariffEvaluator(wrapper); te.initializeInconvenienceFactors(config.getTouFactor(), config.getTieredRateFactor(), config.getVariablePricingFactor(), config.getInterruptibilityFactor()); double weight = generator.nextDouble() * config.getWeightInconvenience(); double expDuration = config.getMinDefaultDuration() + generator.nextInt(config.getMaxDefaultDuration() - config.getMinDefaultDuration()); te.withInconvenienceWeight(weight) .withInertia(config.getNsInertia()) .withPreferredContractDuration(expDuration) .withRationality(config.getRationalityFactor()) .withTariffEvalDepth(config.getTariffCount()) .withTariffSwitchFactor(config.getBrokerSwitchFactor()); te.initializeRegulationFactors(car.getHomeChargeKW() * car.getCurtailmentFactor(), car.getHomeChargeKW() * car.getDischargeFactor(), car.getHomeChargeKW() * car.getDownRegFactor()); return te; }
@Override public void initialize () { super.initialize(); log.info("Initialize " + name); // fill out CustomerInfo powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); info.withPowerType(powerType) .withCustomerClass(CustomerClass.LARGE) .withControllableKW(-unitSize / cop) .withStorageCapacity(stockCapacity * CP_ICE * (maxTemp - minTemp)) .withUpRegulationKW(-unitSize / cop) .withDownRegulationKW(unitSize / cop); // optimistic, perhaps addCustomerInfo(info); ensureSeeds(); // randomize current temp only if state not set if (null == currentTemp) { setCurrentTemp(minTemp + (maxTemp - minTemp) * opSeed.nextDouble()); currentStock = stockCapacity; } currentNcUsage = nonCoolingUsage; // set up the tariff evaluator. We are wide-open to variable pricing. tariffEvaluator = new TariffEvaluator(this); tariffEvaluator.withInertia(0.7).withPreferredContractDuration(14); tariffEvaluator.initializeInconvenienceFactors(0.0, 0.01, 0.0, 0.0); tariffEvaluator.initializeRegulationFactors(-getMaxCooling() * 0.05, 0.0, getMaxCooling() * 0.04); }
@Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); }
TariffEvaluator te = new TariffEvaluator(wrapper); te.initializeInconvenienceFactors(VillageConstants.TOU_FACTOR, VillageConstants.TIERED_RATE_FACTOR, VillageConstants.VARIABLE_PRICING_FACTOR, VillageConstants.INTERRUPTIBILITY_FACTOR); te.withInconvenienceWeight(weight) .withInertia(Double.parseDouble(conf .getProperty(type + "Inertia"))) .withPreferredContractDuration(weeks .withRationality(Double.parseDouble(conf .getProperty(type + "Rationality"))) .withTariffEvalDepth(VillageConstants.TARIFF_COUNT) .withTariffSwitchFactor(VillageConstants.TARIFF_SWITCH_FACTOR); te = new TariffEvaluator(wrapper); te.initializeInconvenienceFactors(VillageConstants.TOU_FACTOR, VillageConstants.TIERED_RATE_FACTOR, VillageConstants.VARIABLE_PRICING_FACTOR, VillageConstants.INTERRUPTIBILITY_FACTOR); te.withInconvenienceWeight(weight) .withInertia(Double.parseDouble(conf .getProperty(type + "Inertia"))) .withPreferredContractDuration(weeks .withRationality(Double.parseDouble(conf .getProperty(type + "Rationality")))
tariffEvaluator = new TariffEvaluator(this); tariffEvaluator.withInertia(0.7).withPreferredContractDuration(14); tariffEvaluator.initializeInconvenienceFactors(0.0, 0.01, 0.0, 0.0); tariffEvaluator.initializeRegulationFactors(-nChargers * maxChargeKW * 0.05, 0.0, nChargers * maxChargeKW * 0.04);
@Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); }
@Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); }
/** * This is the basic evaluation function, taking into consideration the * minimum cost without shifting the appliances' load but the tariff chosen * is * picked up randomly by using a possibility pattern. The better tariffs * have * more chances to be chosen. */ @Override public void evaluateTariffs (List<Tariff> newTariffs) { for (CustomerInfo customer: getCustomerInfos()) { log.info("Customer " + customer.toString() + " is evaluating tariffs for timeslot " + service.getTimeslotRepo().currentSerialNumber()); TariffEvaluator evaluator = tariffEvaluators.get(customer); evaluator.evaluateTariffs(); } }
/** * This is the basic evaluation function, taking into consideration the * minimum cost without shifting the appliances' load but the tariff chosen * is * picked up randomly by using a possibility pattern. The better tariffs * have * more chances to be chosen. */ @Override public void evaluateTariffs (List<Tariff> tariffs) { for (CustomerInfo customer: getCustomerInfos()) { log.info("Customer " + customer.toString() + " evaluating tariffs for timeslot " + service.getTimeslotRepo().currentTimeslot().getId()); TariffEvaluator evaluator = tariffEvaluators.get(customer); evaluator.evaluateTariffs(); } }