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 Summary
Constructors Constructor Description FactoredCustomerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(org.joda.time.Instant now, int phase)CustomerRepogetCustomerRepo()RandomSeedRepogetRandomSeedRepo()ServerConfigurationgetServerConfiguration()TariffMarketgetTariffMarket()TariffRepogetTariffRepo()TariffSubscriptionRepogetTariffSubscriptionRepo()TimeServicegetTimeService()TimeslotRepogetTimeslotRepo()WeatherForecastRepogetWeatherForecastRepo()WeatherReportRepogetWeatherReportRepo()Stringinitialize(Competition competition, List<String> completedInits)This is called once at the beginning of each game.voidpublishNewTariffs(List<Tariff> tariffs)-
Methods inherited from class org.powertac.common.interfaces.TimeslotPhaseProcessor
init, setTimeslotPhase
-
-
-
-
Method Detail
-
initialize
public String initialize(Competition competition, List<String> completedInits)
This is called once at the beginning of each game.- Specified by:
initializein interfaceInitializationService
-
getTimeService
public TimeService getTimeService()
- Specified by:
getTimeServicein interfaceCustomerServiceAccessor
-
getCustomerRepo
public CustomerRepo getCustomerRepo()
- Specified by:
getCustomerRepoin interfaceCustomerServiceAccessor
-
getTariffRepo
public TariffRepo getTariffRepo()
- Specified by:
getTariffRepoin interfaceCustomerServiceAccessor
-
getTimeslotRepo
public TimeslotRepo getTimeslotRepo()
- Specified by:
getTimeslotRepoin interfaceCustomerServiceAccessor
-
getRandomSeedRepo
public RandomSeedRepo getRandomSeedRepo()
- Specified by:
getRandomSeedRepoin interfaceCustomerServiceAccessor
-
getTariffSubscriptionRepo
public TariffSubscriptionRepo getTariffSubscriptionRepo()
- Specified by:
getTariffSubscriptionRepoin interfaceCustomerServiceAccessor
-
getTariffMarket
public TariffMarket getTariffMarket()
- Specified by:
getTariffMarketin interfaceCustomerServiceAccessor
-
getWeatherReportRepo
public WeatherReportRepo getWeatherReportRepo()
- Specified by:
getWeatherReportRepoin interfaceCustomerServiceAccessor
-
getWeatherForecastRepo
public WeatherForecastRepo getWeatherForecastRepo()
-
publishNewTariffs
public void publishNewTariffs(List<Tariff> tariffs)
- Specified by:
publishNewTariffsin interfaceNewTariffListener
-
activate
public void activate(org.joda.time.Instant now, int phase)- Specified by:
activatein classTimeslotPhaseProcessor
-
getServerConfiguration
public ServerConfiguration getServerConfiguration()
- Specified by:
getServerConfigurationin interfaceCustomerServiceAccessor
-
-