public class Office extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.logging.log4j.Logger |
log
logger for trace logging -- use log.info(), log.warn(), and log.error()
appropriately.
|
OfficeComplex |
officeOf
This variable is pointing to the OfficeComplex that this office is part of.
|
| Constructor and Description |
|---|
Office() |
| Modifier and Type | Method and Description |
|---|---|
int |
employeeNumber(int weekday,
int quarter)
This function checks the number of employees in the office in a specific
quarter, either working either on break.
|
int |
employeeOnBreakNumber(int weekday,
int quarter)
This function checks the number of employees on a break in the office in a
specific quarter.
|
int |
employeeWorkingNumber(int weekday,
int quarter)
This function checks the number of working employees in the office in a
specific quarter.
|
void |
findDominantAppliance()
This function returns the dominant appliance of the household.
|
Vector<Appliance> |
getAppliances()
This is a function that returns the appliances of the office.
|
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 office.
|
double |
getNonDominantConsumption(int hour)
This is a function returning the non dominant Consumption Load for a
certain hour.
|
void |
initialize(String OfficeName,
Properties conf,
Vector<Integer> publicVacationVector,
int seed)
This is the initialization function.
|
boolean |
isEmpty(int weekday,
int quarter)
This function checks if any of the workers is in the office.
|
boolean |
isOnBreak(int weekday,
int quarter)
This function checks if any of the workers of the office are on break.
|
boolean |
isOnVacation(int weekday)
This function checks if all the workers of the office are away on vacation
or sick on a certain day
|
boolean |
isWorking(int weekday,
int quarter)
This function checks if any of the workers in the office are working
|
boolean |
isWorkingDay(int day)
This function checks if all the workers of the office are away on vacation
or sick on a certain day
|
boolean |
isWorkingDayOfWeek(int weekday)
This function checks if all the workers of the office are away on vacation
or sick on a certain day
|
void |
printDailyLoad(int day)
This function prints to the screen the daily load of the office for the
weekday at hand.
|
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.
|
protected static org.apache.logging.log4j.Logger log
public OfficeComplex officeOf
public void initialize(String OfficeName, Properties conf, Vector<Integer> publicVacationVector, int seed)
OfficeName - conf - publicVacationVector - gen - public Vector<Appliance> getAppliances()
public Vector<Person> getMembers()
public double getDominantConsumption(int hour)
public double getNonDominantConsumption(int hour)
public void findDominantAppliance()
public Appliance getDominantAppliance()
public boolean isWorking(int weekday,
int quarter)
weekday - quarter - public boolean isOnBreak(int weekday,
int quarter)
weekday - quarter - public boolean isOnVacation(int weekday)
quarter - public boolean isWorkingDayOfWeek(int weekday)
quarter - public boolean isWorkingDay(int day)
quarter - public boolean isEmpty(int weekday,
int quarter)
weekday - quarter - public int employeeWorkingNumber(int weekday,
int quarter)
weekday - quarter - public int employeeOnBreakNumber(int weekday,
int quarter)
weekday - quarter - public int employeeNumber(int weekday,
int quarter)
weekday - quarter - public void weatherCheck(int day,
int hour,
org.joda.time.Instant now,
double temperature)
public void printDailyLoad(int day)
weekday - Copyright © 2016 Power TAC. All Rights Reserved.