Class WashingMachine


  • public class WashingMachine
    extends Appliance
    Washing Machine is used to wash clothes easily. There are several programs that help you automate the procedure in order to start at a less costly time, without problem. The only restriction is that must be emptied by the tenants after finishing and not work at night due to noise. So this is a semi-shifting appliance.
    Version:
    1.5, Date: 2.25.12
    Author:
    Antonios Chrysopoulos
    • Field Detail

      • dryerFlag

        protected boolean dryerFlag
        This variable is utilized to show if there's a dryer in the household or not.
      • dryerPower

        protected int dryerPower
        This variable is utilized to show the dryer's power load.
      • dryerIndex

        protected int dryerIndex
        This variable is utilized to find dryer in the household.
    • Constructor Detail

      • WashingMachine

        public WashingMachine()
    • Method Detail

      • initialize

        public void initialize​(String household,
                               Properties conf,
                               int seed)
        The function reaction of the washing machine. For more info, read the details in the enumerations.Reaction java file
        Overrides:
        initialize in class Appliance
      • fillDailyOperation

        public void fillDailyOperation​(int weekday)
        Description copied from class: Appliance
        This function fills out all the quarters of the appliance functions for a single day of the week.
        Overrides:
        fillDailyOperation in class Appliance
      • dailyShifting

        public double[] dailyShifting​(Tariff tariff,
                                      double[] nonDominantUsage,
                                      TariffEvaluationHelper tariffEvalHelper,
                                      int day,
                                      org.joda.time.Instant start)
        Description copied from class: Appliance
        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.
        Overrides:
        dailyShifting in class Appliance
        Returns:
        TODO
      • getDryerFlag

        public boolean getDryerFlag()
      • getDryerIndex

        public int getDryerIndex()
      • calculateOverallPower

        public void calculateOverallPower()
        Description copied from class: Appliance
        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. TODO not used
        Overrides:
        calculateOverallPower in class Appliance
      • getDryerOverallPower

        public int getDryerOverallPower()
      • refresh

        public void refresh()
        Description copied from class: Appliance
        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.
        Overrides:
        refresh in class Appliance
      • getDays

        public Vector<Integer> getDays()
        This function returns days vector of the appliance
      • getTimesForDay

        public int getTimesForDay​(int day)
        This function returns the times of operation for a certain day of the appliance
      • fillWeeklyOperation

        public void fillWeeklyOperation()
        Description copied from class: Appliance
        This function fills out all the days of the appliance functions for each day of the week.
        Overrides:
        fillWeeklyOperation in class Appliance