Class OfficeComplex
- java.lang.Object
-
- org.powertac.customer.AbstractCustomer
-
- org.powertac.officecomplexcustomer.customers.OfficeComplex
-
public class OfficeComplex extends AbstractCustomer
The office complex domain class is a set of offices that comprise a office building that consumes aggregated energy by the appliances installed in each office.- Version:
- 1.5, Date: 2.25.12
- Author:
- Antonios Chrysopoulos
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOfficeComplex.TariffEvaluationWrapper
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.logging.log4j.Loggerloglogger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.protected TariffEvaluationHelpertariffEvalHelper-
Fields inherited from class org.powertac.customer.AbstractCustomer
allCustomerInfos, customerInfos, name, rs1, service
-
-
Constructor Summary
Constructors Constructor Description OfficeComplex(String name)This is the constructor function of the OfficeComplex customer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumePower()voidevaluateTariffs(List<Tariff> newTariffs)This is the basic evaluation function, taking into consideration the minimum cost without shifting the appliances' load but the tariff chosen is picked up randomly by using a possibility pattern.double[]getDominantLoad(String type)This function returns the dominant Consumption Load for a certain type of housesdouble[]getNonDominantLoad(String type)This function returns the non dominant Consumption Load for a certain type of housesMap<CustomerInfo,String>getOfficeMapping()This function returns the inertia Map variable of the village.Vector<Office>getOffices()This function returns a vector with all the offices that are present in this office complex.Vector<Office>getOffices(String type)This function returns a vector with all the offices of a certain type that are present in this office complex.Map<CustomerInfo,TariffEvaluator>getTariffEvaluators()This function returns the period Map variable of the village.voidinitialize()Initializes the instance.voidinitialize(Properties conf, int seed, Map<CustomerInfo,String> mapping)This is the initialization function.voidstep()Called to run the model forward one step.voidsubscribeDefault(TariffMarket tariffMarketService)StringtoString()-
Methods inherited from class org.powertac.customer.AbstractCustomer
addCustomerInfo, changeSubscription, createTariffEvaluator, getCurrentSubscriptions, getCurrentSubscriptions, getCustId, getCustomerInfo, getCustomerInfoList, getCustomerInfos, getId, getName, getPopulation, lastSunday, nextStartOfDay, saveBootstrapState, setName, setServiceAccessor, setTariffMarket, startOfDay
-
-
-
-
Field Detail
-
log
protected static org.apache.logging.log4j.Logger log
logger for trace logging -- use log.info(), log.warn(), and log.error() appropriately. Use log.debug() for output you want to see in testing or debugging.
-
tariffEvalHelper
protected final TariffEvaluationHelper tariffEvalHelper
-
-
Constructor Detail
-
OfficeComplex
public OfficeComplex(String name)
This is the constructor function of the OfficeComplex customer
-
-
Method Detail
-
initialize
public void initialize()
Description copied from class:AbstractCustomerInitializes the instance. Called after configuration, and after a call to setServices(). TODO -- do we really want this here?- Overrides:
initializein classAbstractCustomer
-
initialize
public void initialize(Properties conf, int seed, Map<CustomerInfo,String> mapping)
This is the initialization function. It uses the variable values for the configuration file to create the office complex with its offices and then fill them with persons and appliances.
-
subscribeDefault
public void subscribeDefault(TariffMarket tariffMarketService)
-
consumePower
public void consumePower()
-
getOfficeMapping
public Map<CustomerInfo,String> getOfficeMapping()
This function returns the inertia Map variable of the village.
-
getTariffEvaluators
public Map<CustomerInfo,TariffEvaluator> getTariffEvaluators()
This function returns the period Map variable of the village.
-
getDominantLoad
public double[] getDominantLoad(String type)
This function returns the dominant Consumption Load for a certain type of houses
-
getNonDominantLoad
public double[] getNonDominantLoad(String type)
This function returns the non dominant Consumption Load for a certain type of houses
-
getOffices
public Vector<Office> getOffices()
This function returns a vector with all the offices that are present in this office complex.
-
getOffices
public Vector<Office> getOffices(String type)
This function returns a vector with all the offices of a certain type that are present in this office complex.
-
evaluateTariffs
public void evaluateTariffs(List<Tariff> newTariffs)
This is the basic evaluation function, taking into consideration the minimum cost without shifting the appliances' load but the tariff chosen is picked up randomly by using a possibility pattern. The better tariffs have more chances to be chosen.- Specified by:
evaluateTariffsin classAbstractCustomer
-
step
public void step()
Description copied from class:AbstractCustomerCalled to run the model forward one step.- Specified by:
stepin classAbstractCustomer
-
toString
public String toString()
- Overrides:
toStringin classAbstractCustomer
-
-