Class Battery

  • All Implemented Interfaces:
    CustomerModelAccessor

    @Domain
    @ConfigurableInstance
    public class Battery
    extends AbstractCustomer
    implements CustomerModelAccessor
    Models a single grid-connected storage battery with configurable capacity, max charge rate, max discharge rate, and efficiency. Batteries do not charge unless used for regulation, so repeated use for up-regulation will leave them discharged, and repeated use for down-regulation will leave them fully charged. If not used at all, they will eventually end up completely discharged just in case their selfDischargeRate values are non-zero. The initial state-of-charge is always 0.0;
    Author:
    John Collins
    • Constructor Detail

      • Battery

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

        public Battery​(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 start with the battery at its targetSOC.
        Overrides:
        initialize in class AbstractCustomer
      • setCapacityKWh

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

        public double getCapacityKWh()
      • setMaxChargeKW

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="maximum charge rate")
        @StateChange
        public void setMaxChargeKW​(double value)
      • getMaxChargeKW

        public double getMaxChargeKW()
      • setMaxDischargeKW

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="Maximum discharge rate")
        public void setMaxDischargeKW​(double value)
      • getMaxDischargeKW

        public double getMaxDischargeKW()
      • setChargeEfficiency

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

        public double getChargeEfficiency()
      • setSelfDischargeRate

        @ConfigurableValue(valueType="Double",
                           dump=false,
                           description="hourly charge lost as proportion of capacity")
        public void setSelfDischargeRate​(double value)
      • getSelfDischargeRate

        public double getSelfDischargeRate()