org.powertac.householdcustomer.persons
Class Person

java.lang.Object
  extended by org.powertac.householdcustomer.persons.Person
Direct Known Subclasses:
MostlyPresentPerson, WorkingPerson

public class Person
extends Object

A person domain instance represents a single person in its real life activities The person is living in a house, it may work, it goes to the movies, it is sick, it goes on a vacation trip. In order to make the models as realistic as possible we have them to live their lives as part of a bigger community.

Version:
1.5, Date: 2.25.12
Author:
Antonios Chrysopoulos

Field Summary
protected static org.apache.log4j.Logger log
          logger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.
protected  org.powertac.common.repo.RandomSeedRepo randomSeedRepo
           
 
Constructor Summary
Person()
           
 
Method Summary
 void fillDailyRoutine(int day, double vacationAbsence)
          This function fills out the daily routine of the person, taking into account the different variables and occupations, if he is sick or working etc.
 Vector<Status> getDailyRoutine()
          This function returns the daily routine of a person.
 Vector<Vector<Status>> getWeeklyRoutine()
          This function returns the weekly routine of a person.
 void initialize(String AgentName, Properties conf, Vector<Integer> publicVacationVector, int seed)
          This is the initialization function.
 void refresh(Properties config)
          At the end of each week the person models refresh their schedule.
 void setMemberOf(Household house)
          This function sets the household in which the person is living in.
 void showInfo()
          This is the function utilized to show the information regarding the person in question, its variables values etc.
 void test()
           
 String toString()
           
 
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.


randomSeedRepo

@Autowired
protected org.powertac.common.repo.RandomSeedRepo randomSeedRepo
Constructor Detail

Person

public Person()
Method Detail

initialize

public void initialize(String AgentName,
                       Properties conf,
                       Vector<Integer> publicVacationVector,
                       int seed)
This is the initialization function. It uses the variable values for the configuration file to create the person as it should for this type.

Parameters:
AgentName -
conf -
publicVacationVector -
gen -

getWeeklyRoutine

public Vector<Vector<Status>> getWeeklyRoutine()
This function returns the weekly routine of a person.


getDailyRoutine

public Vector<Status> getDailyRoutine()
This function returns the daily routine of a person.


setMemberOf

public void setMemberOf(Household house)
This function sets the household in which the person is living in.


fillDailyRoutine

public void fillDailyRoutine(int day,
                             double vacationAbsence)
This function fills out the daily routine of the person, taking into account the different variables and occupations, if he is sick or working etc.

Parameters:
day -
vacationAbsence -
gen -

showInfo

public void showInfo()
This is the function utilized to show the information regarding the person in question, its variables values etc.


refresh

public void refresh(Properties config)
At the end of each week the person models refresh their schedule. This way we have a realistic and dynamic model, changing working hours, leisure activities and so on.

Parameters:
conf -
gen -

test

public void test()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Power TAC. All Rights Reserved.