Class Person
java.lang.Object
org.powertac.officecomplexcustomer.persons.Person
- Direct Known Subclasses:
WorkingPerson
public class Person extends Object
A person domain instance represents a single person in its real life
activities. The person is working in an office, is on a break, he goes back
home, he 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
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 RandomSeedReporandomSeedRepo -
Constructor Summary
Constructors Constructor Description Person() -
Method Summary
Modifier and Type Method Description voidfillDailyRoutine(int day)This function fills out the daily routine of the person, taking into account the different variables and occupations, if he is sick or on vacation 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.voidinitialize(String AgentName, Properties conf, Vector<Integer> publicVacationVector, int seed)This is the initialization function.voidrefresh(Properties config)At the end of each week the person models refresh their schedule.voidsetMemberOf(Office house)This function sets the office in which the person is working on.voidshowInfo()This is the function utilized to show the information regarding the person in question, its variables values etc.voidtest()StringtoString()
-
Field Details
-
log
protected static org.apache.logging.log4j.Logger loglogger 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
-
-
Constructor Details
-
Person
public Person()
-
-
Method Details
-
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-seed-
-
getWeeklyRoutine
This function returns the weekly routine of a person. -
getDailyRoutine
This function returns the daily routine of a person. -
setMemberOf
This function sets the office in which the person is working on. -
fillDailyRoutine
public void fillDailyRoutine(int day)This function fills out the daily routine of the person, taking into account the different variables and occupations, if he is sick or on vacation etc.- Parameters:
day-
-
showInfo
public void showInfo()This is the function utilized to show the information regarding the person in question, its variables values etc. -
test
public void test() -
refresh
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:
config-
-
toString
-