org.powertac.officecomplexcustomer
Class OfficeComplexCustomerService

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

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

Implements the Office Consumer Model. It creates Office Consumers that can subscribe to tariffs, evaluate them in order to choose the best one for its interests, shift their load in order to minimize their costs and many others. They contain different types of households with respect to the way they choose the tariffs and they shift their loads.

Version:
1.5, Date: 2.25.12
Author:
Antonios Chrysopoulos

Constructor Summary
OfficeComplexCustomerService()
          This is the constructor of the Office Consumer Service.
 
Method Summary
 void activate(org.joda.time.Instant time, int phaseNumber)
           
 void clearConfiguration()
          This function cleans the configuration files in case they have not been cleaned at the beginning of the game
 List<org.powertac.common.CustomerInfo> generateCustomerInfoList()
          This function finds all the available Office Consumers in the competition and creates a list of their customerInfo.
 String getConfigFile1()
          Getter method for the first configuration file
 int getDaysOfCompetition()
          Getter method for the days of competition
 List<OfficeComplex> getOfficeComplexList()
          This function returns the list of the villages created at the beginning of the game by the service
 String initialize(org.powertac.common.Competition competition, List<String> completedInits)
          This function called once at the beginning of each game by the server initialization service.
 void publishNewTariffs(List<org.powertac.common.Tariff> tariffs)
           
 void setConfigFile1(String config)
           
 void setDaysOfCompetition(int days)
           
 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

OfficeComplexCustomerService

public OfficeComplexCustomerService()
This is the constructor of the Office Consumer Service.

Method Detail

initialize

public String initialize(org.powertac.common.Competition competition,
                         List<String> completedInits)
This function called once at the beginning of each game by the server initialization service. Here is where you do pre-game setup. This will read the server properties file to take the competition input variables needed (configuration files, days of competition), create a listener for our service, in order to get the new tariff, as well as create the household Consumers that will be running in the game.

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

publishNewTariffs

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

getDaysOfCompetition

public int getDaysOfCompetition()
Getter method for the days of competition


setDaysOfCompetition

@ConfigurableValue(valueType="Integer",
                   description="The competition duration in days")
public void setDaysOfCompetition(int days)

getConfigFile1

public String getConfigFile1()
Getter method for the first configuration file


setConfigFile1

@ConfigurableValue(valueType="String",
                   description="first configuration file of the office complex customers")
public void setConfigFile1(String config)

getOfficeComplexList

public List<OfficeComplex> getOfficeComplexList()
This function returns the list of the villages created at the beginning of the game by the service


clearConfiguration

public void clearConfiguration()
This function cleans the configuration files in case they have not been cleaned at the beginning of the game


generateCustomerInfoList

public List<org.powertac.common.CustomerInfo> generateCustomerInfoList()
This function finds all the available Office Consumers in the competition and creates a list of their customerInfo.

Returns:
List

activate

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

setDefaults

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


Copyright © 2013 Power TAC. All Rights Reserved.