org.powertac.factoredcustomer
Class FactoredCustomerService

java.lang.Object
  extended by org.powertac.common.interfaces.TimeslotPhaseProcessor
      extended by org.powertac.factoredcustomer.FactoredCustomerService
All Implemented Interfaces:
org.powertac.common.interfaces.InitializationService, org.powertac.common.interfaces.NewTariffListener

@Service
public class FactoredCustomerService
extends org.powertac.common.interfaces.TimeslotPhaseProcessor
implements org.powertac.common.interfaces.InitializationService, org.powertac.common.interfaces.NewTariffListener

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
FactoredCustomerService()
           
 
Method Summary
 void activate(org.joda.time.Instant now, int phase)
           
 String initialize(org.powertac.common.Competition competition, List<String> completedInits)
          This is called once at the beginning of each game.
protected  void loadCustomerStructures(String configResource)
           
 void publishNewTariffs(List<org.powertac.common.Tariff> tariffs)
           
 void setDefaults()
           
 
Methods inherited from class org.powertac.common.interfaces.TimeslotPhaseProcessor
init, setTimeslotPhase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoredCustomerService

public FactoredCustomerService()
Method Detail

setDefaults

public void setDefaults()
Specified by:
setDefaults in interface org.powertac.common.interfaces.InitializationService

initialize

public String initialize(org.powertac.common.Competition competition,
                         List<String> completedInits)
This is called once at the beginning of each game.

Specified by:
initialize in interface org.powertac.common.interfaces.InitializationService

loadCustomerStructures

protected void loadCustomerStructures(String configResource)

publishNewTariffs

public void publishNewTariffs(List<org.powertac.common.Tariff> tariffs)
Specified by:
publishNewTariffs in interface org.powertac.common.interfaces.NewTariffListener

activate

public void activate(org.joda.time.Instant now,
                     int phase)
Specified by:
activate in class org.powertac.common.interfaces.TimeslotPhaseProcessor


Copyright © 2012 Power TAC. All Rights Reserved.