Class VehicleCreationTO.EnergyLevelThresholdSet

java.lang.Object
org.opentcs.access.to.model.VehicleCreationTO.EnergyLevelThresholdSet
All Implemented Interfaces:
Serializable
Enclosing class:
VehicleCreationTO

public static class VehicleCreationTO.EnergyLevelThresholdSet extends Object implements Serializable
Contains information regarding the energy level threshold values of a vehicle.
See Also:
  • Constructor Details

    • EnergyLevelThresholdSet

      public EnergyLevelThresholdSet(int energyLevelCritical, int energyLevelGood, int energyLevelSufficientlyRecharged, int energyLevelFullyRecharged)
      Creates a new instance.
      Parameters:
      energyLevelCritical - The value at/below which the vehicle's energy level is considered "critical".
      energyLevelGood - The value at/above which the vehicle's energy level is considered "good".
      energyLevelSufficientlyRecharged - The value at/above which the vehicle's energy level is considered fully recharged.
      energyLevelFullyRecharged - The value at/above which the vehicle's energy level is considered sufficiently recharged.
  • Method Details

    • getEnergyLevelCritical

      public int getEnergyLevelCritical()
      Returns the vehicle's critical energy level (in percent of the maximum).

      The critical energy level is the one at/below which the vehicle should be recharged.

      Returns:
      The vehicle's critical energy level.
    • withEnergyLevelCritical

      public VehicleCreationTO.EnergyLevelThresholdSet withEnergyLevelCritical(int energyLevelCritical)
      Creates a copy of this object, with the given critical energy level.
      Parameters:
      energyLevelCritical - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getEnergyLevelGood

      public int getEnergyLevelGood()
      Returns the vehicle's good energy level (in percent of the maximum).

      The good energy level is the one at/above which the vehicle can be dispatched again when charging.

      Returns:
      The vehicle's good energy level.
    • withEnergyLevelGood

      public VehicleCreationTO.EnergyLevelThresholdSet withEnergyLevelGood(int energyLevelGood)
      Creates a copy of this object, with the given good energy level.
      Parameters:
      energyLevelGood - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getEnergyLevelSufficientlyRecharged

      public int getEnergyLevelSufficientlyRecharged()
      Returns the vehicle's energy level for being sufficiently recharged (in percent of the maximum).
      Returns:
      This vehicle's sufficiently recharged energy level.
    • withEnergyLevelSufficientlyRecharged

      public VehicleCreationTO.EnergyLevelThresholdSet withEnergyLevelSufficientlyRecharged(int energyLevelSufficientlyRecharged)
      Creates a copy of this object, with the given sufficiently recharged energy level.
      Parameters:
      energyLevelSufficientlyRecharged - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getEnergyLevelFullyRecharged

      public int getEnergyLevelFullyRecharged()
      Returns the vehicle's energy level for being fully recharged (in percent of the maximum).
      Returns:
      The vehicle's fully recharged threshold.
    • withEnergyLevelFullyRecharged

      public VehicleCreationTO.EnergyLevelThresholdSet withEnergyLevelFullyRecharged(int energyLevelFullyRecharged)
      Creates a copy of this object, with the given fully recharged energy level.
      Parameters:
      energyLevelFullyRecharged - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • toString

      public String toString()
      Overrides:
      toString in class Object