Class Appliance
java.lang.Object
org.powertac.officecomplexcustomer.appliances.Appliance
- Direct Known Subclasses:
CopyMachine,FullyShiftingAppliance,MicrowaveOven,NotShiftingAppliance,WeatherSensitiveAppliance
public class Appliance extends Object
A appliance domain instance represents a single appliance inside a household.
There are different kinds of appliances utilized by the persons inhabiting
the premises. Some of them are functioning automatically, some are only used
when someone is present etc.
- Version:
- 1.5, Date: 2.25.12
- Author:
- Antonios Chrysopoulos
-
Field Summary
Fields Modifier and Type Field Description protected OfficeapplianceOfThe household that the appliance is installed at.protected intcycleDurationThis variable equals the duration of the operation cycle of the appliance.protected static org.apache.logging.log4j.Loggerloglogger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.protected StringnameThe appliance name.protected intoverallPowerprotected intpowerThis variable shows the power (in Watts) that are consumed when using this appliance.protected RandomSeedReporandomSeedRepoprotected doublesaturationThis variable shows the possibility (%) that this appliance is contained in a house. -
Constructor Summary
Constructors Constructor Description Appliance() -
Method Summary
Modifier and Type Method Description voidcalculateOverallPower()This is an function created to estimate the overall power consumption of a certain appliance in a single operation the vectors of each appliance during the runtime.voidcreateWeeklyPossibilityOperationVector()This function is used to create the weekly possibility operation vector of each appliance taking into consideration the times that this appliance could be able to function.double[]dailyShifting(Tariff tariff, double[] nonDominantLoad, TariffEvaluationHelper tariffEvalHelper, int day, org.joda.time.Instant start)This is a complex function that changes the appliance's function in order to have the most cost effective operation load in a day schedule.voidfillDailyOperation(int times)This function fills out all the quarters of the appliance functions for a single day of the week.voidfillWeeklyOperation()This function fills out all the days of the appliance functions for each day of the week.OfficegetApplianceOf()This function returns the household where the appliance is installed.intgetDuration()This function returns the duration variable of the appliance.Vector<Boolean>getOperationDaysVector()This function returns the operation days vector of the appliance.intgetOverallPower()This function returns the power variable of the appliance.intgetPower()This function returns the power variable of the appliance.doublegetSaturation()This function returns the saturation variable of the appliance.Vector<Vector<Integer>>getWeeklyLoadVector()This function returns the weekly load vector of the appliance.Vector<Vector<Boolean>>getWeeklyOperation()This function returns the weekly operation vector of the appliance.voidinitialize(String office, Properties conf, int seed)This is the initialization function.voidrefresh()At the end of each week the appliance models refresh their schedule.voidsetApplianceOf(Office office)This function sets the household in which the appliance is installed in.voidsetOperationDays()This is an function to fill the maps utilized by Services in order to keep the vectors of each appliance during the runtime.voidshowStatus()This is the function utilized to show the information regarding the appliance in question, its variables values etc.StringtoString()voidweatherDailyFunction(int day, int hour, double temp)This function fills out the daily function of an appliance for the day.
-
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
-
name
The appliance name. Appliances are named after the type of appliance and the household that contains it. -
applianceOf
The household that the appliance is installed at. -
saturation
protected double saturationThis variable shows the possibility (%) that this appliance is contained in a house. -
power
protected int powerThis variable shows the power (in Watts) that are consumed when using this appliance. -
overallPower
protected int overallPower -
cycleDuration
protected int cycleDurationThis variable equals the duration of the operation cycle of the appliance.
-
-
Constructor Details
-
Appliance
public Appliance()
-
-
Method Details
-
getPower
public int getPower()This function returns the power variable of the appliance. -
getOverallPower
public int getOverallPower()This function returns the power variable of the appliance. -
getApplianceOf
This function returns the household where the appliance is installed. -
getSaturation
public double getSaturation()This function returns the saturation variable of the appliance. -
getDuration
public int getDuration()This function returns the duration variable of the appliance. -
getWeeklyOperation
This function returns the weekly operation vector of the appliance. -
getWeeklyLoadVector
This function returns the weekly load vector of the appliance. -
getOperationDaysVector
This function returns the operation days vector of the appliance. -
setApplianceOf
This function sets the household in which the appliance is installed in. -
createWeeklyPossibilityOperationVector
public void createWeeklyPossibilityOperationVector()This function is used to create the weekly possibility operation vector of each appliance taking into consideration the times that this appliance could be able to function. -
initialize
This is the initialization function. It uses the variable values for the configuration file to create the appliance as it should for this type.- Parameters:
office-conf-seed-
-
dailyShifting
public double[] dailyShifting(Tariff tariff, double[] nonDominantLoad, TariffEvaluationHelper tariffEvalHelper, int day, org.joda.time.Instant start)This is a complex function that changes the appliance's function in order to have the most cost effective operation load in a day schedule.- Parameters:
tariff-nonDominantLoad-tariffEvalHelper-day-start-- Returns:
- TODO
-
fillDailyOperation
public void fillDailyOperation(int times)This function fills out all the quarters of the appliance functions for a single day of the week.- Parameters:
times-
-
fillWeeklyOperation
public void fillWeeklyOperation()This function fills out all the days of the appliance functions for each day of the week. -
showStatus
public void showStatus()This is the function utilized to show the information regarding the appliance in question, its variables values etc. -
weatherDailyFunction
public void weatherDailyFunction(int day, int hour, double temp)This function fills out the daily function of an appliance for the day. -
refresh
public void refresh()At the end of each week the appliance models refresh their schedule. This way we have a realistic and dynamic model, changing function hours, consuming power and so on. -
setOperationDays
public void setOperationDays()This is an function to fill the maps utilized by Services in order to keep the vectors of each appliance during the runtime. -
calculateOverallPower
public void calculateOverallPower()This is an function created to estimate the overall power consumption of a certain appliance in a single operation the vectors of each appliance during the runtime. -
toString
-