Class CleanerAgent
- java.lang.Object
-
- jadex.bdiv3.examples.cleanerworld.cleaner.CleanerAgent
-
public class CleanerAgent extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CleanerAgent.AchieveCleanup
Achieve cleanup goals are created for every piece of waste the agent notices.class
CleanerAgent.AchieveDropWaste
class
CleanerAgent.AchieveMoveTo
The goal is used to move to a specific location.class
CleanerAgent.AchievePickupWaste
Goal for picking up a piece of waste.class
CleanerAgent.DropWasteAction
class
CleanerAgent.GetVisionAction
class
CleanerAgent.MaintainBatteryLoaded
Goal for keeping the battery loaded.class
CleanerAgent.PerformLookForWaste
Goal that lets the cleaner look for waste.class
CleanerAgent.PerformMemorizePositions
class
CleanerAgent.PerformPatrol
Goal that lets the agent perform patrol rounds.class
CleanerAgent.PickupWasteAction
class
CleanerAgent.QueryChargingStation
class
CleanerAgent.QueryWastebin
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
The bdi agent.protected Waste
carriedwaste
The carried waste (or null).protected java.util.Set<Chargingstation>
chargingstations
The known set of chargingstation.protected java.util.Set<Cleaner>
cleaners
The known set of other cleaners.protected boolean
daytime
The flag if it is daytime or night.protected IEnvironment
environment
The virtual environment of the cleaner.protected double
my_chargestate
The chargestate.protected Location
my_location
The location of the cleaner.protected double
my_speed
The speed of the cleaner.protected double
my_vision
The vision.protected java.util.List<Location>
patrolpoints
The patrol points.protected Tuple2<java.lang.Integer,java.lang.Integer>
raster
The raster for memorizing positions.protected java.util.Set<MapPoint>
visited_positions
The visited positions.protected java.util.Set<Wastebin>
wastebins
The known set of wastebins.protected java.util.Set<Waste>
wastes
The set of wastes.
-
Constructor Summary
Constructors Constructor Description CleanerAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
body()
The agent body.IInternalAccess
getAgent()
Get the agent.Waste
getCarriedWaste()
Get the carriedwaste.java.util.Set<Chargingstation>
getChargingStations()
Get the chargingstations.java.util.Set<Cleaner>
getCleaners()
Get the cleaners.IEnvironment
getEnvironment()
Get the environment.protected java.util.List<LocationObject>
getInVisionObjects()
protected java.util.List<MapPoint>
getMaxQuantity()
double
getMyChargestate()
Get the my_chargestate.Location
getMyLocation()
Get the my_location.double
getMySpeed()
Get the my_speed.double
getMyVision()
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.boolean
isDaytime()
Get the daytime.void
setCarriedwaste(Waste carriedwaste)
Set the carriedwaste.void
setDaytime(boolean daytime)
Set the daytime.void
setMyChargestate(double mychargestate)
Set the my_chargestate.void
setMyLocation(Location mylocation)
Set the my_location.protected IFuture<java.lang.Void>
updateVision(IPlan rplan)
-
-
-
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.
-
-
Method Detail
-
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()
-
-