private void ensureSeeds () { if (null == evalSeed) { evalSeed = service.getRandomSeedRepo() .getRandomSeed(Battery.class.getName() + "-" + name, 0, "eval"); } }
/** * Initializes the instance. Called after configuration, and after * a call to setServices(). * TODO -- do we really want this here? */ public void initialize () { rs1 = service.getRandomSeedRepo().getRandomSeed(name, 0, "TariffChooser"); }
public void init (BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo) { log.info("init(" + seedId + ") " + getUsername()); this.brokerProxyService = proxy; this.seed = randomSeedRepo.getRandomSeed(Genco.class.getName(), seedId, "update"); currentCapacity = nominalCapacity; }
private void ensureSeeds () { if (null == opSeed) { RandomSeedRepo repo = service.getRandomSeedRepo(); opSeed = repo.getRandomSeed( ColdStorage.class.getName() + "-" + name, 0, "model"); evalSeed = repo.getRandomSeed( ColdStorage.class.getName() + "-" + name, 0, "eval"); normal01 = new NormalDistribution(0.0, 1.0); normal01.reseedRandomGenerator(opSeed.nextLong()); } }
private void ensureSeeds () { if (null == opSeed) { RandomSeedRepo repo = service.getRandomSeedRepo(); opSeed = repo.getRandomSeed( LiftTruck.class.getName() + "-" + name, 0, "model"); evalSeed = repo.getRandomSeed( LiftTruck.class.getName() + "-" + name, 0, "eval"); normal = new NormalDistribution(0.0, 1.0); normal.reseedRandomGenerator(opSeed.nextLong()); } }
@Override public void initialize (String household, Properties conf, int seed) { // Filling the base variables name = household + " Stove"; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); saturation = Double.parseDouble(conf.getProperty("StoveSaturation")); power = (int) (VillageConstants.STOVE_POWER_VARIANCE * gen.nextGaussian() + VillageConstants.STOVE_POWER_MEAN); cycleDuration = VillageConstants.STOVE_DURATION_CYCLE; times = Integer.parseInt(conf.getProperty("StoveDailyTimes")); }
@Override public void initialize (String office, Properties conf, int seed) { // Filling the base variables name = office + " Refrigerator"; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); saturation = Double.parseDouble(conf.getProperty("RefrigeratorSaturation")); power = (int) (VillageConstants.REFRIGERATOR_POWER_VARIANCE * gen.nextGaussian() + VillageConstants.REFRIGERATOR_POWER_MEAN); cycleDuration = VillageConstants.REFRIGERATOR_DURATION_CYCLE; }
@Override public void initialize (String household, Properties conf, int seed) { // Filling the base variables name = household + " Dryer"; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); saturation = Double.parseDouble(conf.getProperty("DryerSaturation")); power = (int) (VillageConstants.DRYER_POWER_VARIANCE * gen.nextGaussian() + VillageConstants.DRYER_POWER_MEAN); cycleDuration = VillageConstants.DRYER_DURATION_CYCLE; }
@Override public void initialize (String household, Properties conf, int seed) { // Filling the base variables name = household + " Freezer"; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); saturation = Double.parseDouble(conf.getProperty("FreezerSaturation")); power = (int) (VillageConstants.FREEZER_POWER_VARIANCE * gen.nextGaussian() + VillageConstants.FREEZER_POWER_MEAN); cycleDuration = VillageConstants.FREEZER_DURATION_CYCLE; }
@Override public void initialize (String office, Properties conf, int seed) { // Filling the base variables name = office + " Refrigerator"; saturation = Double.parseDouble(conf.getProperty("RefrigeratorSaturation")); randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); power = (int) (OfficeComplexConstants.REFRIGERATOR_POWER_VARIANCE * gen.nextGaussian() + OfficeComplexConstants.REFRIGERATOR_POWER_MEAN); cycleDuration = OfficeComplexConstants.REFRIGERATOR_DURATION_CYCLE; }
@Override public void initialize (String office, Properties conf, int seed) { // Filling the base variables name = office + " CoffeeMachine"; saturation = Double.parseDouble(conf.getProperty("RefrigeratorSaturation")); randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); power = (int) (OfficeComplexConstants.COFFEE_MACHINE_POWER_VARIANCE * gen.nextGaussian() + OfficeComplexConstants.COFFEE_MACHINE_POWER_MEAN); cycleDuration = OfficeComplexConstants.COFFEE_MACHINE_DURATION_CYCLE; standByPower = (int) (power / (cycleDuration - 1)); }
@Override public void initialize (String office, Properties conf, int seed) { // Filling the base variables name = office + " Vending Machine"; saturation = Double.parseDouble(conf.getProperty("VendingMachineSaturation")); randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); power = (int) (OfficeComplexConstants.VENDING_MACHINE_POWER_VARIANCE * gen.nextGaussian() + OfficeComplexConstants.VENDING_MACHINE_POWER_MEAN); cycleDuration = OfficeComplexConstants.VENDING_MACHINE_DURATION_CYCLE; }
@Override public void initialize (String office, Properties conf, int seed) { // Filling the base variables name = office + " ConsumerElectronics"; saturation = 1; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); power = (int) (OfficeComplexConstants.CONSUMER_ELECTRONICS_POWER_VARIANCE * gen.nextGaussian() + OfficeComplexConstants.CONSUMER_ELECTRONICS_POWER_MEAN); cycleDuration = OfficeComplexConstants.CONSUMER_ELECTRONICS_DURATION_CYCLE; operationPercentage = Double.parseDouble(conf.getProperty("ConsumerElectronicsWorking")); }
@Override public void initialize (String household, Properties conf, int seed) { // Filling the base variables name = household + " ICT"; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); saturation = 1; power = (int) (VillageConstants.ICT_POWER_VARIANCE * gen.nextGaussian() + VillageConstants.ICT_POWER_MEAN); cycleDuration = VillageConstants.ICT_DURATION_CYCLE; times = Integer.parseInt(conf.getProperty("ICTDailyTimes")) + applianceOf.getMembers().size(); }
@Override public void initialize (FactoredCustomerService service) { this.service = service; inertiaSampler = getRandomSeedRepo() .getRandomSeed("factoredcustomer.LearningUtilityOptimizer", SeedIdGenerator.getId(), "InertiaSampler"); tariffSelector = getRandomSeedRepo() .getRandomSeed("factoredcustomer.LearningUtilityOptimizer", SeedIdGenerator.getId(), "TariffSelector"); subscribeDefault(); }
@Override public void initialize (FactoredCustomerService service) { this.service = service; inertiaSampler = getRandomSeedRepo() .getRandomSeed("factoredcustomer.DefaultUtilityOptimizer", SeedIdGenerator.getId(), "InertiaSampler"); tariffSelector = getRandomSeedRepo() .getRandomSeed("factoredcustomer.DefaultUtilityOptimizer", SeedIdGenerator.getId(), "TariffSelector"); subscribeDefault(); }
public void initialize (FactoredCustomerService service) { timeslotRepo = service.getTimeslotRepo(); arimaNoise = new Random(service.getRandomSeedRepo() .getRandomSeed("factoredcustomer.TimeseriesGenerator", SeedIdGenerator.getId(), "ArimaNoise").getValue()); }
@Override public void initialize (String household, Properties conf, int seed) { // Filling the base variables name = household + " Lights"; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); saturation = 1; power = (int) (VillageConstants.LIGHTS_POWER_VARIANCE * gen.nextGaussian() + VillageConstants.LIGHTS_POWER_MEAN); cycleDuration = VillageConstants.LIGHTS_DURATION_CYCLE; }
@Override public void initialize (String office, Properties conf, int seed) { // Filling the base variables name = office + " Lights"; saturation = 1; randomSeedRepo = (RandomSeedRepo) SpringApplicationContext.getBean("randomSeedRepo"); gen = randomSeedRepo.getRandomSeed(toString(), seed, "Appliance Model" + seed); power = (int) (OfficeComplexConstants.LIGHTS_POWER_VARIANCE * gen.nextGaussian() + OfficeComplexConstants.LIGHTS_POWER_MEAN) * applianceOf.getMembers().size(); cycleDuration = OfficeComplexConstants.LIGHTS_DURATION_CYCLE; }
public AdaptiveCapacityOriginator (FactoredCustomerService service, CapacityStructure capacityStructure, DefaultCapacityBundle bundle) { super(service, capacityStructure, bundle); optimizerStructure = getParentBundle().getOptimizerStructure(); timeslotRepo = service.getTimeslotRepo(); RandomSeedRepo randomSeedRepo = service.getRandomSeedRepo(); recommendationHandler = new Random(randomSeedRepo .getRandomSeed("factoredcustomer.AdaptiveCapacityOriginator", SeedIdGenerator.getId(), "RecommendationHandler") .getValue()); forecastCapacitiesPerSub = new HashMap<>(); tariff2inconv = new HashMap<>(); }