Class LiftTruck

  • All Implemented Interfaces:
    CustomerModelAccessor

    @Domain
    @ConfigurableInstance
    public class LiftTruck
    extends AbstractCustomer
    implements CustomerModelAccessor
    Models the complement of lift trucks in a warehouse. There may be multiple trucks, some number of battery packs, and a daily/weekly work schedule. Since the lead-acid batteries in most lift trucks have a limited number of charge/discharge cycles, we do not assume the ability to discharge batteries into the grid to provide balancing capacity. However, the charging rate is variable, and balancing capacity can be provided by adjusting the rate. Batteries and battery chargers are not modeled directly; instead, we simply keep track of the overall battery capacity and how it changes when shifts start and end, and when chargers run. Instances are created using the configureInstances() method. In addition to simple parameters, configuration can specify a shift schedule and the number and initial state-of-charge of battery packs. The work schedule is specified with a list of strings called weeklySchedule that lays out blocks of shifts. Each block is of the form
    "block", d1, d2, ..., "shift" start, duration, ntrucks, "shift", ...
    where d1, d2, etc. are integers giving the days of the week covered by the block, with Sunday=0; start is an integer hour, duration is an integer number of hours, and ntrucks is the number of trucks that will be active during the shift.
    Author:
    John Collins
    • Constructor Detail

      • LiftTruck

        public LiftTruck()
        Default constructor, requires manual setting of name
      • LiftTruck

        public LiftTruck​(String name)
        Standard constructor for named configurable type
    • Method Detail

      • initialize

        public void initialize()
        Initialization must provide accessor to Customer instance and time. We assume configuration has already happened. We also start with no active trucks, and the weakest batteries on availableChargers. Trucks will not be active (in bootstrap mode) until the first shift change.
        Overrides:
        initialize in class AbstractCustomer
      • setTruckKW

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="mean power usage when truck is in use")
        @StateChange
        public void setTruckKW​(double value)
      • getTruckKW

        public double getTruckKW()
      • setTruckStd

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="Std dev of truck power usage")
        @StateChange
        public void setTruckStd​(double stdDev)
      • getTruckStd

        public double getTruckStd()
      • setShiftData

        @ConfigurableValue(valueType="List",
                           dump=false,
                           description="shift spec [block, shift, ..., block, shift, ...]")
        public void setShiftData​(List<String> data)
        Converts a list of Strings to a sorted list of Shifts. Entries in the list represent pairs of (start, duration) values.
      • getShiftData

        public List<String> getShiftData()
      • setBatteryCapacity

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="size of battery pack in kWh")
        @StateChange
        public void setBatteryCapacity​(double value)
      • getBatteryCapacity

        public double getBatteryCapacity()
      • setNBatteries

        @ConfigurableValue(valueType="Integer",
                           dump=false,
                           description="total number of battery packs")
        @StateChange
        public void setNBatteries​(int value)
      • getNBatteries

        public int getNBatteries()
      • setNChargers

        @ConfigurableValue(valueType="Integer",
                           dump=false,
                           description="number of battery chargers")
        @StateChange
        public void setNChargers​(int value)
      • getNChargers

        public int getNChargers()
      • setMaxChargeKW

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="maximum charge rate of one truck\'s battery pack")
        @StateChange
        public void setMaxChargeKW​(double value)
      • getMaxChargeKW

        public double getMaxChargeKW()
      • setChargeEfficiency

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="ratio of charge energy to battery energy")
        @StateChange
        public void setChargeEfficiency​(double value)
      • getChargeEfficiency

        public double getChargeEfficiency()
      • setPlanningHorizon

        @ConfigurableValue(valueType="Integer",
                           dump=false,
                           description="planning horizon in timeslots - should be at least 48")
        @StateChange
        public void setPlanningHorizon​(int horizon)
      • getPlanningHorizon

        public int getPlanningHorizon()
      • setMinPlanningHorizon

        @ConfigurableValue(valueType="Integer",
                           dump=false,
                           description="minimum useful horizon of existing plan")
        @StateChange
        public void setMinPlanningHorizon​(int horizon)
      • getMinPlanningHorizon

        public int getMinPlanningHorizon()
      • setEnergyCharging

        @StateChange
        public void setEnergyCharging​(double kwh)
        Updates the energy content of offline batteries
      • getEnergyCharging

        public double getEnergyCharging()
      • addEnergyCharging

        public void addEnergyCharging​(double kwh)
      • setEnergyInUse

        @StateChange
        public void setEnergyInUse​(double kwh)
        Updates the energy content of in-use batteries
      • getEnergyInUse

        public double getEnergyInUse()
      • addEnergyInUse

        public void addEnergyInUse​(double kwh)
      • setCapacityInUse

        @StateChange
        public void setCapacityInUse​(double kwh)
        Updates the total capacity of in-use batteries
      • getCapacityInUse

        public double getCapacityInUse()