Class CleanerAgent
- java.lang.Object
- 
- jadex.bdiv3.examples.cleanerworld.cleaner.CleanerAgent
 
- 
 public class CleanerAgent extends java.lang.Object
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classCleanerAgent.AchieveCleanupAchieve cleanup goals are created for every piece of waste the agent notices.classCleanerAgent.AchieveDropWasteclassCleanerAgent.AchieveMoveToThe goal is used to move to a specific location.classCleanerAgent.AchievePickupWasteGoal for picking up a piece of waste.classCleanerAgent.DropWasteActionclassCleanerAgent.GetVisionActionclassCleanerAgent.MaintainBatteryLoadedGoal for keeping the battery loaded.classCleanerAgent.PerformLookForWasteGoal that lets the cleaner look for waste.classCleanerAgent.PerformMemorizePositionsclassCleanerAgent.PerformPatrolGoal that lets the agent perform patrol rounds.classCleanerAgent.PickupWasteActionclassCleanerAgent.QueryChargingStationclassCleanerAgent.QueryWastebin
 - 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe bdi agent.protected WastecarriedwasteThe carried waste (or null).protected java.util.Set<Chargingstation>chargingstationsThe known set of chargingstation.protected java.util.Set<Cleaner>cleanersThe known set of other cleaners.protected booleandaytimeThe flag if it is daytime or night.protected IEnvironmentenvironmentThe virtual environment of the cleaner.protected doublemy_chargestateThe chargestate.protected Locationmy_locationThe location of the cleaner.protected doublemy_speedThe speed of the cleaner.protected doublemy_visionThe vision.protected java.util.List<Location>patrolpointsThe patrol points.protected Tuple2<java.lang.Integer,java.lang.Integer>rasterThe raster for memorizing positions.protected java.util.Set<MapPoint>visited_positionsThe visited positions.protected java.util.Set<Wastebin>wastebinsThe known set of wastebins.protected java.util.Set<Waste>wastesThe set of wastes.
 - 
Constructor SummaryConstructors Constructor Description CleanerAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbody()The agent body.IInternalAccessgetAgent()Get the agent.WastegetCarriedWaste()Get the carriedwaste.java.util.Set<Chargingstation>getChargingStations()Get the chargingstations.java.util.Set<Cleaner>getCleaners()Get the cleaners.IEnvironmentgetEnvironment()Get the environment.protected java.util.List<LocationObject>getInVisionObjects()protected java.util.List<MapPoint>getMaxQuantity()doublegetMyChargestate()Get the my_chargestate.LocationgetMyLocation()Get the my_location.doublegetMySpeed()Get the my_speed.doublegetMyVision()Get the my_vision.java.util.List<Location>getPatrolPoints()Get the patrolpoints.Tuple2<java.lang.Integer,java.lang.Integer>getRaster()Get the raster.java.util.Set<MapPoint>getVisitedPositions()Get the visited_positions.java.util.Set<Wastebin>getWastebins()Get the wastebins.java.util.Set<Waste>getWastes()Get the wastes.booleanisDaytime()Get the daytime.voidsetCarriedwaste(Waste carriedwaste)Set the carriedwaste.voidsetDaytime(boolean daytime)Set the daytime.voidsetMyChargestate(double mychargestate)Set the my_chargestate.voidsetMyLocation(Location mylocation)Set the my_location.protected IFuture<java.lang.Void>updateVision(IPlan rplan)
 
- 
- 
- 
Field Detail- 
agentprotected IInternalAccess agent The bdi agent. Automatically injected
 - 
environmentprotected IEnvironment environment The virtual environment of the cleaner.
 - 
wastesprotected java.util.Set<Waste> wastes The set of wastes.
 - 
wastebinsprotected java.util.Set<Wastebin> wastebins The known set of wastebins.
 - 
chargingstationsprotected java.util.Set<Chargingstation> chargingstations The known set of chargingstation.
 - 
cleanersprotected java.util.Set<Cleaner> cleaners The known set of other cleaners.
 - 
rasterprotected Tuple2<java.lang.Integer,java.lang.Integer> raster The raster for memorizing positions.
 - 
visited_positionsprotected java.util.Set<MapPoint> visited_positions The visited positions.
 - 
daytimeprotected boolean daytime The flag if it is daytime or night.
 - 
my_locationprotected Location my_location The location of the cleaner.
 - 
my_speedprotected double my_speed The speed of the cleaner.
 - 
my_visionprotected double my_vision The vision.
 - 
my_chargestateprotected double my_chargestate The chargestate.
 - 
carriedwasteprotected Waste carriedwaste The carried waste (or null).
 - 
patrolpointsprotected java.util.List<Location> patrolpoints The patrol points.
 
- 
 - 
Method Detail- 
getInVisionObjectsprotected java.util.List<LocationObject> getInVisionObjects() 
 - 
bodypublic void body() The agent body.
 - 
getEnvironmentpublic IEnvironment getEnvironment() Get the environment.- Returns:
- The environment.
 
 - 
getWastespublic java.util.Set<Waste> getWastes() Get the wastes.- Returns:
- The wastes.
 
 - 
getWastebinspublic java.util.Set<Wastebin> getWastebins() Get the wastebins.- Returns:
- The wastebins.
 
 - 
getChargingStationspublic java.util.Set<Chargingstation> getChargingStations() Get the chargingstations.- Returns:
- The chargingstations.
 
 - 
getCleanerspublic java.util.Set<Cleaner> getCleaners() Get the cleaners.- Returns:
- The cleaners.
 
 - 
getRasterpublic Tuple2<java.lang.Integer,java.lang.Integer> getRaster() Get the raster.- Returns:
- The raster.
 
 - 
getVisitedPositionspublic java.util.Set<MapPoint> getVisitedPositions() Get the visited_positions.- Returns:
- The visited_positions.
 
 - 
isDaytimepublic boolean isDaytime() Get the daytime.- Returns:
- The daytime.
 
 - 
setDaytimepublic void setDaytime(boolean daytime) Set the daytime.- Parameters:
- daytime- The daytime to set.
 
 - 
getMyLocationpublic Location getMyLocation() Get the my_location.- Returns:
- The my_location.
 
 - 
setMyLocationpublic void setMyLocation(Location mylocation) Set the my_location.- Parameters:
- my_location- The my_location to set.
 
 - 
getMySpeedpublic double getMySpeed() Get the my_speed.- Returns:
- The my_speed.
 
 - 
getMyVisionpublic double getMyVision() Get the my_vision.- Returns:
- The my_vision.
 
 - 
getMyChargestatepublic double getMyChargestate() Get the my_chargestate.- Returns:
- The my_chargestate.
 
 - 
setMyChargestatepublic void setMyChargestate(double mychargestate) Set the my_chargestate.- Parameters:
- my_chargestate- The my_chargestate to set.
 
 - 
getCarriedWastepublic Waste getCarriedWaste() Get the carriedwaste.- Returns:
- The carriedwaste.
 
 - 
setCarriedwastepublic void setCarriedwaste(Waste carriedwaste) Set the carriedwaste.- Parameters:
- carriedwaste- The carriedwaste to set.
 
 - 
getPatrolPointspublic java.util.List<Location> getPatrolPoints() Get the patrolpoints.- Returns:
- The patrolpoints.
 
 - 
getAgentpublic IInternalAccess getAgent() Get the agent.- Returns:
- The agent.
 
 - 
getMaxQuantityprotected java.util.List<MapPoint> getMaxQuantity() 
 
- 
 
-