Package org.powertac.factoredcustomer
Class FactoredCustomerService
- java.lang.Object
- 
- org.powertac.common.interfaces.TimeslotPhaseProcessor
- 
- org.powertac.factoredcustomer.FactoredCustomerService
 
 
- 
- All Implemented Interfaces:
- CustomerServiceAccessor,- InitializationService,- NewTariffListener
 
 @Service public class FactoredCustomerService extends TimeslotPhaseProcessor implements InitializationService, NewTariffListener, CustomerServiceAccessor Key class that processes the configuration file and creates a collection of customers during the initialization process. It also delegates tariff selection callbacks and timeslot activation (i.e., capacity reporting) to the collection of customers.- Author:
- Prashant Reddy
 
- 
- 
Constructor SummaryConstructors Constructor Description FactoredCustomerService()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(org.joda.time.Instant now, int phase)This method gets called once during each timeslot.CustomerRepogetCustomerRepo()Returns a reference to a CustomerRepoRandomSeedRepogetRandomSeedRepo()Returns a reference to a RandomSeedRepoServerConfigurationgetServerConfiguration()Returns a reference to a ServerConfiguration serviceTariffMarketgetTariffMarket()Returns a reference to the TariffMarketTariffRepogetTariffRepo()Returns a reference to a TariffRepoTariffSubscriptionRepogetTariffSubscriptionRepo()Returns a reference to a TariffSubscriptionRepoTimeServicegetTimeService()Returns a reference to the TimeServiceTimeslotRepogetTimeslotRepo()Returns a reference to a TimeslotRepoWeatherForecastRepogetWeatherForecastRepo()WeatherReportRepogetWeatherReportRepo()Returns a reference to a WeatherReportRepoStringinitialize(Competition competition, List<String> completedInits)This is called once at the beginning of each game.voidpublishNewTariffs(List<Tariff> tariffs)Called periodically with a list of newly-published Tariffs- 
Methods inherited from class org.powertac.common.interfaces.TimeslotPhaseProcessorinit, setTimeslotPhase
 
- 
 
- 
- 
- 
Method Detail- 
initializepublic String initialize(Competition competition, List<String> completedInits) This is called once at the beginning of each game.- Specified by:
- initializein interface- InitializationService
 
 - 
getTimeServicepublic TimeService getTimeService() Description copied from interface:CustomerServiceAccessorReturns a reference to the TimeService- Specified by:
- getTimeServicein interface- CustomerServiceAccessor
 
 - 
getCustomerRepopublic CustomerRepo getCustomerRepo() Description copied from interface:CustomerServiceAccessorReturns a reference to a CustomerRepo- Specified by:
- getCustomerRepoin interface- CustomerServiceAccessor
 
 - 
getTariffRepopublic TariffRepo getTariffRepo() Description copied from interface:CustomerServiceAccessorReturns a reference to a TariffRepo- Specified by:
- getTariffRepoin interface- CustomerServiceAccessor
 
 - 
getTimeslotRepopublic TimeslotRepo getTimeslotRepo() Description copied from interface:CustomerServiceAccessorReturns a reference to a TimeslotRepo- Specified by:
- getTimeslotRepoin interface- CustomerServiceAccessor
 
 - 
getRandomSeedRepopublic RandomSeedRepo getRandomSeedRepo() Description copied from interface:CustomerServiceAccessorReturns a reference to a RandomSeedRepo- Specified by:
- getRandomSeedRepoin interface- CustomerServiceAccessor
 
 - 
getTariffSubscriptionRepopublic TariffSubscriptionRepo getTariffSubscriptionRepo() Description copied from interface:CustomerServiceAccessorReturns a reference to a TariffSubscriptionRepo- Specified by:
- getTariffSubscriptionRepoin interface- CustomerServiceAccessor
 
 - 
getTariffMarketpublic TariffMarket getTariffMarket() Description copied from interface:CustomerServiceAccessorReturns a reference to the TariffMarket- Specified by:
- getTariffMarketin interface- CustomerServiceAccessor
 
 - 
getWeatherReportRepopublic WeatherReportRepo getWeatherReportRepo() Description copied from interface:CustomerServiceAccessorReturns a reference to a WeatherReportRepo- Specified by:
- getWeatherReportRepoin interface- CustomerServiceAccessor
 
 - 
getWeatherForecastRepopublic WeatherForecastRepo getWeatherForecastRepo() 
 - 
publishNewTariffspublic void publishNewTariffs(List<Tariff> tariffs) Description copied from interface:NewTariffListenerCalled periodically with a list of newly-published Tariffs- Specified by:
- publishNewTariffsin interface- NewTariffListener
 
 - 
activatepublic void activate(org.joda.time.Instant now, int phase)Description copied from class:TimeslotPhaseProcessorThis method gets called once during each timeslot. To get called, the module must first call the register(phaseNumber) method on CompetitionControl. The call will give the current simulation time and phase number in the arguments.- Specified by:
- activatein class- TimeslotPhaseProcessor
 
 - 
getServerConfigurationpublic ServerConfiguration getServerConfiguration() Description copied from interface:CustomerServiceAccessorReturns a reference to a ServerConfiguration service- Specified by:
- getServerConfigurationin interface- CustomerServiceAccessor
 
 
- 
 
-