Class CleanerAgent


  • public class CleanerAgent
    extends java.lang.Object
    • Field Detail

      • agent

        protected IInternalAccess agent
        The bdi agent. Automatically injected
      • environment

        protected IEnvironment environment
        The virtual environment of the cleaner.
      • wastes

        protected java.util.Set<Waste> wastes
        The set of wastes.
      • wastebins

        protected java.util.Set<Wastebin> wastebins
        The known set of wastebins.
      • chargingstations

        protected java.util.Set<Chargingstation> chargingstations
        The known set of chargingstation.
      • cleaners

        protected java.util.Set<Cleaner> cleaners
        The known set of other cleaners.
      • raster

        protected Tuple2<java.lang.Integer,​java.lang.Integer> raster
        The raster for memorizing positions.
      • visited_positions

        protected java.util.Set<MapPoint> visited_positions
        The visited positions.
      • daytime

        protected boolean daytime
        The flag if it is daytime or night.
      • my_location

        protected Location my_location
        The location of the cleaner.
      • my_speed

        protected double my_speed
        The speed of the cleaner.
      • my_vision

        protected double my_vision
        The vision.
      • my_chargestate

        protected double my_chargestate
        The chargestate.
      • carriedwaste

        protected Waste carriedwaste
        The carried waste (or null).
      • patrolpoints

        protected java.util.List<Location> patrolpoints
        The patrol points.
    • Constructor Detail

      • CleanerAgent

        public CleanerAgent()
    • Method Detail

      • updateVision

        protected IFuture<java.lang.Void> updateVision​(IPlan rplan)
      • getInVisionObjects

        protected java.util.List<LocationObject> getInVisionObjects()
      • body

        public void body()
        The agent body.
      • getEnvironment

        public IEnvironment getEnvironment()
        Get the environment.
        Returns:
        The environment.
      • getWastes

        public java.util.Set<Waste> getWastes()
        Get the wastes.
        Returns:
        The wastes.
      • getWastebins

        public java.util.Set<Wastebin> getWastebins()
        Get the wastebins.
        Returns:
        The wastebins.
      • getChargingStations

        public java.util.Set<Chargingstation> getChargingStations()
        Get the chargingstations.
        Returns:
        The chargingstations.
      • getCleaners

        public java.util.Set<Cleaner> getCleaners()
        Get the cleaners.
        Returns:
        The cleaners.
      • getRaster

        public Tuple2<java.lang.Integer,​java.lang.Integer> getRaster()
        Get the raster.
        Returns:
        The raster.
      • getVisitedPositions

        public java.util.Set<MapPoint> getVisitedPositions()
        Get the visited_positions.
        Returns:
        The visited_positions.
      • isDaytime

        public boolean isDaytime()
        Get the daytime.
        Returns:
        The daytime.
      • setDaytime

        public void setDaytime​(boolean daytime)
        Set the daytime.
        Parameters:
        daytime - The daytime to set.
      • getMyLocation

        public Location getMyLocation()
        Get the my_location.
        Returns:
        The my_location.
      • setMyLocation

        public void setMyLocation​(Location mylocation)
        Set the my_location.
        Parameters:
        my_location - The my_location to set.
      • getMySpeed

        public double getMySpeed()
        Get the my_speed.
        Returns:
        The my_speed.
      • getMyVision

        public double getMyVision()
        Get the my_vision.
        Returns:
        The my_vision.
      • getMyChargestate

        public double getMyChargestate()
        Get the my_chargestate.
        Returns:
        The my_chargestate.
      • setMyChargestate

        public void setMyChargestate​(double mychargestate)
        Set the my_chargestate.
        Parameters:
        my_chargestate - The my_chargestate to set.
      • getCarriedWaste

        public Waste getCarriedWaste()
        Get the carriedwaste.
        Returns:
        The carriedwaste.
      • setCarriedwaste

        public void setCarriedwaste​(Waste carriedwaste)
        Set the carriedwaste.
        Parameters:
        carriedwaste - The carriedwaste to set.
      • getPatrolPoints

        public java.util.List<Location> getPatrolPoints()
        Get the patrolpoints.
        Returns:
        The patrolpoints.
      • getAgent

        public IInternalAccess getAgent()
        Get the agent.
        Returns:
        The agent.
      • getMaxQuantity

        protected java.util.List<MapPoint> getMaxQuantity()