CapacityProfile getCapacityProfile () { return new CapacityProfile(usage, start); }
@Override public CapacityProfile getCapacityProfile (Tariff tariff) { double[] result = new double[VillageConstants.HOURS_OF_DAY]; if (type.equalsIgnoreCase("NS")) result = Arrays.copyOf(getDominantLoad(type), getDominantLoad(type).length); else { double[] nonDominantUsage = getNonDominantUsage(day, type); result = dailyShifting(tariff, nonDominantUsage, day, type, nextStartOfDay()); } log.debug(Arrays.toString(result)); for (int i = 0; i < result.length; i++) result[i] /= (VillageConstants.THOUSAND * getPopulation()); log.info("Usage: " + Arrays.toString(result)); return new CapacityProfile(result, nextStartOfDay()); }
@Override public CapacityProfile getCapacityProfile (Tariff tariff) { Instant start = service.getTimeslotRepo().currentTimeslot().getStartInstant(); double drain = capacityKWh * (1.0 - chargeEfficiency) / 2.0; double[] profile = new double[24]; Arrays.fill(profile, drain); return new CapacityProfile (profile, start); } }
@Override public CapacityProfile getCapacityProfile (Tariff tariff) { double[] result = new double[OfficeComplexConstants.HOURS_OF_DAY]; if (type.equalsIgnoreCase("NS")) { result = Arrays.copyOf(getDominantLoad(type), getDominantLoad(type).length); } else { double[] nonDominantUsage = getNonDominantUsage(day, type); result = dailyShifting(tariff, nonDominantUsage, day, type); } log.debug(Arrays.toString(result)); for (int i = 0; i < result.length; i++) result[i] /= (OfficeComplexConstants.THOUSAND * getPopulation()); log.info("Usage:" + Arrays.toString(result)); return new CapacityProfile(result, nextStartOfDay()); }
@Override public CapacityProfile getCapacityProfile (Tariff tariff) { // lazy creation of capacityProfile table if (null == TariffProfiles) { TariffProfiles = new HashMap<Tariff, TariffInfo>(); } // return existing capacityProfile if it exists TariffInfo info = TariffProfiles.get(tariff); if (null != info) { return info.getCapacityProfile(); } // otherwise, create a new capacityProfile info = makeTariffInfo(tariff); if (tariff.isTimeOfUse()) { heuristicTouProfile(info); } else { // fill capacityProfile with nominal consumption double[] pr = new double[profileSize]; Arrays.fill(pr, getNominalHourlyConsumption()); info.setCapacityProfile(new CapacityProfile(pr, lastSunday())); } log.debug(getName() + " capacityProfile " + Arrays.toString(info.getCapacityProfile().getProfile())); TariffProfiles.put(tariff, info); return info.getCapacityProfile(); }
Instant start = service.getTimeService().getCurrentTime().plus(TimeService.HOUR); return new org.powertac.common.CapacityProfile(result, start);
/** * TODO: this does not appear to be a reasonable profile */ @Override public CapacityProfile getCapacityProfile (Tariff tariff) { double[] result = new double[config.getProfileLength()]; for (int i = 0; i < result.length; i++) { result[i] = getDominantLoad() / hrsPerDay; } // Assume profile starts at midnight Instant start = service.getTimeslotRepo().currentTimeslot().getStartInstant(); return new CapacityProfile(result, start.toDateTime(DateTimeZone.UTC) .withHourOfDay(0).toInstant() .plus(TimeService.DAY)); }
tariffInfo.setCapacityProfile(new CapacityProfile(result, start));