Class Vehicle

    • Field Detail

      • capacity

        protected int capacity
      • depot

        protected Depot depot
      • nextCustomer

        protected Customer nextCustomer
    • Constructor Detail

      • Vehicle

        public Vehicle()
      • Vehicle

        public Vehicle​(long id,
                       int capacity,
                       Depot depot)
    • Method Detail

      • getCapacity

        public int getCapacity()
      • setCapacity

        public void setCapacity​(int capacity)
      • getDepot

        public Depot getDepot()
      • setDepot

        public void setDepot​(Depot depot)
      • getDistanceTo

        public long getDistanceTo​(Standstill standstill)
        Parameters:
        standstill - never null
        Returns:
        a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors