org.powertac.householdcustomer.customers
Class Household

java.lang.Object
  extended by org.powertac.householdcustomer.customers.Household

public class Household
extends Object

The household is the domain instance represents a single house with the tenants living inside it and fully equipped with appliances statistically distributed. There are different kinds of appliances utilized by the persons inhabiting the premises and each person living has it's own schedule.

Version:
1.5, Date: 2.25.12
Author:
Antonios Chrysopoulos

Field Summary
 Village householdOf
          This variable is pointing to the village that this household is part of.
protected static org.apache.log4j.Logger log
          logger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.
 
Constructor Summary
Household()
           
 
Method Summary
 void findDominantAppliance()
          This function returns the dominant appliance of the household.
 Vector<Appliance> getAppliances()
          This is a function that returns the appliances of the household.
 Appliance getDominantAppliance()
          This function returns the dominant appliance of the household.
 double getDominantConsumption(int hour)
          This is a function returning the dominant Consumption Load for a certain hour.
 Vector<Person> getMembers()
          This is a function that returns the members of the household.
 double getNonDominantConsumption(int hour)
          This is a function returning the non dominant Consumption Load for a certain hour.
 int getWeek()
          This is a function that returns the week of refresh.
 void initialize(String HouseName, Properties conf, Vector<Integer> publicVacationVector, int seed)
          This is the initialization function.
 boolean isEmpty(int weekday, int quarter)
          This function checks if all the inhabitants of the household are out of the household.
 boolean isOnVacation(int day)
          This function checks if all the inhabitants of the household are away on vacation on a certain day
 int tenantsNumber(int weekday, int quarter)
          This function checks the number of tenants in the house in a specific quarter, either sick or normal.
 String toString()
           
 void weatherCheck(int day, int hour, org.joda.time.Instant now, double temperature)
          This function is checking the current weather conditions and the existence of weather sensitive appliances and if the temperature is over/under a certain threshold, the appliances begin or stop their operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.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.


householdOf

public Village householdOf
This variable is pointing to the village that this household is part of.

Constructor Detail

Household

public Household()
Method Detail

initialize

public void initialize(String HouseName,
                       Properties conf,
                       Vector<Integer> publicVacationVector,
                       int seed)
This is the initialization function. It uses the variable values for the configuration file to create the household and then fill it with persons and appliances as it seems fit.

Parameters:
HouseName -
conf -
publicVacationVector -
gen -

getWeek

public int getWeek()
This is a function that returns the week of refresh.


getAppliances

public Vector<Appliance> getAppliances()
This is a function that returns the appliances of the household.


getMembers

public Vector<Person> getMembers()
This is a function that returns the members of the household.


getDominantConsumption

public double getDominantConsumption(int hour)
This is a function returning the dominant Consumption Load for a certain hour.


getNonDominantConsumption

public double getNonDominantConsumption(int hour)
This is a function returning the non dominant Consumption Load for a certain hour.


findDominantAppliance

public void findDominantAppliance()
This function returns the dominant appliance of the household.


getDominantAppliance

public Appliance getDominantAppliance()
This function returns the dominant appliance of the household.


isEmpty

public boolean isEmpty(int weekday,
                       int quarter)
This function checks if all the inhabitants of the household are out of the household.

Parameters:
weekday -
quarter -
Returns:

tenantsNumber

public int tenantsNumber(int weekday,
                         int quarter)
This function checks the number of tenants in the house in a specific quarter, either sick or normal.

Parameters:
weekday -
quarter -
Returns:

isOnVacation

public boolean isOnVacation(int day)
This function checks if all the inhabitants of the household are away on vacation on a certain day

Parameters:
quarter -
Returns:

weatherCheck

public void weatherCheck(int day,
                         int hour,
                         org.joda.time.Instant now,
                         double temperature)
This function is checking the current weather conditions and the existence of weather sensitive appliances and if the temperature is over/under a certain threshold, the appliances begin or stop their operation.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Power TAC. All Rights Reserved.