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 Office
applianceOf
The household that the appliance is installed at.protected int
cycleDuration
This variable equals the duration of the operation cycle of the appliance.protected static org.apache.logging.log4j.Logger
log
logger for trace logging -- use log.info(), log.warn(), and log.error() appropriately.protected String
name
The appliance name.protected int
overallPower
protected int
power
This variable shows the power (in Watts) that are consumed when using this appliance.protected RandomSeedRepo
randomSeedRepo
protected double
saturation
This variable shows the possibility (%) that this appliance is contained in a house.
-
Constructor Summary
Constructors Constructor Description Appliance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.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.void
fillDailyOperation(int times)
This function fills out all the quarters of the appliance functions for a single day of the week.void
fillWeeklyOperation()
This function fills out all the days of the appliance functions for each day of the week.Office
getApplianceOf()
This function returns the household where the appliance is installed.int
getDuration()
This function returns the duration variable of the appliance.Vector<Boolean>
getOperationDaysVector()
This function returns the operation days vector of the appliance.int
getOverallPower()
This function returns the power variable of the appliance.int
getPower()
This function returns the power variable of the appliance.double
getSaturation()
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.void
initialize(String office, Properties conf, int seed)
This is the initialization function.void
refresh()
At the end of each week the appliance models refresh their schedule.void
setApplianceOf(Office office)
This function sets the household in which the appliance is installed in.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.void
showStatus()
This is the function utilized to show the information regarding the appliance in question, its variables values etc.String
toString()
void
weatherDailyFunction(int day, int hour, double temp)
This function fills out the daily function of an appliance for the day.
-
-
-
Field Detail
-
log
protected static org.apache.logging.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 RandomSeedRepo randomSeedRepo
-
name
protected String name
The appliance name. Appliances are named after the type of appliance and the household that contains it.
-
applianceOf
protected Office applianceOf
The household that the appliance is installed at.
-
saturation
protected double saturation
This variable shows the possibility (%) that this appliance is contained in a house.
-
power
protected int power
This variable shows the power (in Watts) that are consumed when using this appliance.
-
overallPower
protected int overallPower
-
cycleDuration
protected int cycleDuration
This variable equals the duration of the operation cycle of the appliance.
-
-
Method Detail
-
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
public Office 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
public Vector<Vector<Boolean>> getWeeklyOperation()
This function returns the weekly operation vector of the appliance.
-
getWeeklyLoadVector
public Vector<Vector<Integer>> getWeeklyLoadVector()
This function returns the weekly load vector of the appliance.
-
getOperationDaysVector
public Vector<Boolean> getOperationDaysVector()
This function returns the operation days vector of the appliance.
-
setApplianceOf
public void setApplianceOf(Office office)
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
public void initialize(String office, Properties conf, int seed)
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.
-
-