Jadex 0.96

jadex.examples.cleanerworld.multi.cleanermobile
Agent Cleaner

jadex.examples.cleanerworld.multi.cleanermobile.Cleaner
  • jadex.planlib.DFMobile
  • jadex.planlib.ProtocolsMobile

  • agent Cleaner
    contains jadex.planlib.ProtocolsMobile, jadex.planlib.DFMobile

    The Cleaner Agent.

    The agent mainly has 3 top-level goals:
    - Searching for waste (perform lookforwaste).
    - Cleaning up waste (achieve cleanup).
    - Keep the battery loaded (maintain battery loaded).

    To achieve this goals it uses various subgoals for decomposition of the overall tasks.


    Belief Summary
    belief Waste carriedwaste
               The actual carried waste.
    beliefset Chargingstation chargingstations
               The known charging stations.
    beliefset Cleaner cleaners
               The known cleaners.
    belief Boolean daytime
               The actual daytime (day vs. night).
    belief IEnvironment environment
              
    belief AgentIdentifier environmentagent
               The connection to the environment (agent).
    belief Double my_chargestate
               The battery charging state (1.0 full -> 0.0 empty).
    belief Location my_location
               The current cleaner location.
    belief Double my_speed
               The speed.
    belief Double my_vision
               The radius describing how far the agent can see.
    beliefset Location patrolpoints
               The points used for patrolling at night.
    beliefset Integer raster
               The raster .
    beliefset MapPoint visited_positions
               The statistics of visited map points.
    beliefset Wastebin wastebins
               The known waste bins.
    beliefset Waste wastes
               The known wastes.
     
    Goal Summary
    achievegoal achievecleanup(Waste waste)
               Clean up some waste.
    achievegoal achievedropwaste(Wastebin wastebin)
               Drop a piece of waste into a wastebin.
    achievegoal achievemoveto(Location location)
               Try to move to the specified location.
    achievegoal achievepickupwaste(Waste waste)
               Pick up a piece of waste.
    achievegoalref df_search
               Imported DF-Goals
    achievegoal drop_waste_action(Waste waste, Wastebin wastebin)
               Drop a piece of waste.
    achievegoal get_vision_action(Vision vision)
               Get the current vision.
    maintaingoal maintainbatteryloaded()
               Observe the battery state.
    performgoal performlookforwaste()
               Look out for waste when nothing better to do, what means that the agent is not cleaning, not loading and it is daytime.
    performgoal performmemorizepositions()
               Memorize the already visited positions in a raster.
    performgoal performpatrol()
               Perform patrols at night when the agent is not loading.
    achievegoal pickup_waste_action(Waste waste)
               Pick up a piece of waste.
    querygoal querychargingstation(Chargingstation result)
               Find the nearest charging station.
    querygoal querywastebin(Wastebin result)
               Try to find a not full waste bin that is as near as possible to the agent.
    achievegoalref rp_initiate
              
     
    Plan Summary
    mobile plan cleanup(Waste waste)
               Clean up waste by picking it up and carrying it to a waste bin.
    mobile plan dropwaste(Wastebin wastebin)
               Drop a waste into a waste bin.
    mobile plan exploremap()
               This plan explores the map by walking to unknown positions.
    mobile plan gui()
               Create and show the gui.
    mobile plan leastseenwalk()
               Walk to the least seen positions.
    mobile plan loadbattery()
               Load the battery.
    mobile plan localdropwasteaction(Waste waste, Wastebin wastebin)
               Drop waste action.
    mobile plan localgetvisionaction(Vision vision)
               Drop waste action.
    mobile plan localpickupwasteaction(Waste waste)
               Pickup waste action.
    mobile plan memorizepositions()
               This plan memorizes the positions.
    mobile plan moveto(Location location)
               Move to a location.
    mobile plan patrol()
               Perform patrols.
    mobile plan pickupwaste(Waste waste)
               Pick up a waste.
    mobile plan remotedropwasteaction(Waste waste, Wastebin wastebin)
               Drop waste action.
    mobile plan remotegetvisionaction(Vision vision)
               Drop waste action.
    mobile plan remotepickupwasteaction(Waste waste)
               Pickup waste action.
     
    Expression Summary
    expression query_in_vision_objects
               Query all objects from the beliefs that are currently in sight.
    expression query_max_quantity
               Query the max quantity map point.
    expression query_min_quantity
               Query the map points ordered by their quantity (least ones first).
    expression query_min_seen
               Query the map points ordered by their seen value (least ones first).
     
    Configuration Summary
    default configuration  default
              
    configuration  nogui
              
     

    Belief Detail

    environment

    belief IEnvironment environment

    environmentagent

    belief AgentIdentifier environmentagent
    The connection to the environment (agent).


    daytime

    belief Boolean daytime
    The actual daytime (day vs. night).

    Default fact:
    true

    my_location

    belief Location my_location
    The current cleaner location.

    Default fact:
    new Location(0.2, 0.2)

    my_speed

    belief Double my_speed
    The speed.

    Default fact:
    3

    my_vision

    belief Double my_vision
    The radius describing how far the agent can see.

    Default fact:
    0.1

    my_chargestate

    belief Double my_chargestate
    The battery charging state (1.0 full -> 0.0 empty).

    Default fact:
    0.85

    carriedwaste

    belief Waste carriedwaste
    The actual carried waste.


    wastes

    beliefset Waste wastes
    The known wastes.


    wastebins

    beliefset Wastebin wastebins
    The known waste bins.


    chargingstations

    beliefset Chargingstation chargingstations
    The known charging stations.


    cleaners

    beliefset Cleaner cleaners
    The known cleaners.


    raster

    beliefset Integer raster
    The raster .

    Default facts:
    10
    10

    visited_positions

    beliefset MapPoint visited_positions
    The statistics of visited map points.

    Default facts expression:
    MapPoint.getMapPointRaster($beliefbase.raster[0].intValue(), $beliefbase.raster[1].intValue(), 1, 1)
    - The facts tag generates several facts retrieved by the stated expression

    patrolpoints

    beliefset Location patrolpoints
    The points used for patrolling at night.

    Default facts:
    new Location(0.1, 0.1)
    new Location(0.1, 0.9)
    new Location(0.3, 0.9)
    new Location(0.3, 0.1)
    new Location(0.5, 0.1)
    new Location(0.5, 0.9)
    new Location(0.7, 0.9)
    new Location(0.7, 0.1)
    new Location(0.9, 0.1)
    new Location(0.9, 0.9)
    Goal Detail

    performlookforwaste

    performgoal performlookforwaste()
    Look out for waste when nothing better to do, what means that the agent is not cleaning, not loading and it is daytime.

    BDI flags:
    retry: true
    retry delay: 0
    exclude: never
    random selection: false
    post to all: false
    Context Condition:
    $beliefbase.daytime.booleanValue()

    performpatrol

    performgoal performpatrol()
    Perform patrols at night when the agent is not loading.

    BDI flags:
    retry: true
    retry delay: 0
    exclude: never
    random selection: false
    post to all: false
    Context Condition:
    !$beliefbase.daytime.booleanValue()

    performmemorizepositions

    performgoal performmemorizepositions()
    Memorize the already visited positions in a raster.

    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    achievecleanup

    achievegoal achievecleanup(Waste waste)
    Clean up some waste.

    Parameters:
    in parameter waste Binding options:  $beliefbase.wastes
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_failed
    random selection: false
    post to all: false
    Uniqueness enabled:
    Context Condition:
    $beliefbase.daytime.booleanValue()
    Creation Condition:
    true
    Drop Condition:
    $beliefbase.carriedwaste==null && !$beliefbase.getBeliefSet("wastes").containsFact($goal.waste)
    Target Condition:
    (select one Wastebin $wastebin from $beliefbase.wastebins where $wastebin.contains($goal.waste))!=null
    Deliberation:
    cardinality 1
    inhibits performlookforwaste
    inhibits achievecleanup
    $beliefbase.my_location.getDistance($goal.waste.getLocation()) < $beliefbase.my_location.getDistance($ref.waste.getLocation())

    achievepickupwaste

    achievegoal achievepickupwaste(Waste waste)
    Pick up a piece of waste.

    Parameters:
    in parameter waste
    BDI flags:
    retry: false
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    achievedropwaste

    achievegoal achievedropwaste(Wastebin wastebin)
    Drop a piece of waste into a wastebin.

    Parameters:
    in parameter wastebin
    BDI flags:
    retry: true
    retry delay: 0
    exclude: never
    random selection: false
    post to all: false
    Failure Condition:
    (select one Wastebin $wastebin from $beliefbase.wastebins where $goal.wastebin.getId().equals($wastebin.getId())).isFull()

    achievemoveto

    achievegoal achievemoveto(Location location)
    Try to move to the specified location.

    Parameters:
    in parameter location
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false
    Target Condition:
    $beliefbase.my_location.isNear($goal.location)

    get_vision_action

    achievegoal get_vision_action(Vision vision)
    Get the current vision.

    Parameters:
    out parameter vision
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    pickup_waste_action

    achievegoal pickup_waste_action(Waste waste)
    Pick up a piece of waste.

    Parameters:
    in parameter waste
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    drop_waste_action

    achievegoal drop_waste_action(Waste waste, 
                                  Wastebin wastebin)
    Drop a piece of waste.

    Parameters:
    in parameter waste
    in parameter wastebin
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    querywastebin

    querygoal querywastebin(Wastebin result)
    Try to find a not full waste bin that is as near as possible to the agent.

    Parameters:
    out parameter result Default value:   select one Wastebin $wastebin from $beliefbase.wastebins where !$wastebin.isFull() order by $beliefbase.my_location.getDistance($wastebin.getLocation())
    BDI flags:
    retry: true
    retry delay: 0
    exclude: never
    random selection: false
    post to all: false

    querychargingstation

    querygoal querychargingstation(Chargingstation result)
    Find the nearest charging station.

    Parameters:
    out parameter result Default value:   select one Chargingstation $station from $beliefbase.chargingstations order by $beliefbase.my_location.getDistance($station.getLocation())
    BDI flags:
    retry: true
    retry delay: 0
    exclude: never
    random selection: false
    post to all: false

    maintainbatteryloaded

    maintaingoal maintainbatteryloaded()
    Observe the battery state.

    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false
    recur: false
    recur delay: 0
    Maintain Condition:
    $beliefbase.my_chargestate.doubleValue() > 0.2
    Target Condition:
    $beliefbase.my_chargestate.doubleValue() >= 1.0
    Deliberation:
    inhibits performlookforwaste
    inhibits achievecleanup
    inhibits performpatrol

    df_search

    achievegoalref df_search
    Imported DF-Goals

    Parameters:
    parameterref constraints
    parameterref description
    parameterref df
    parameterref result
    Referenced from:
    df_search in capability jadex.planlib.DFMobile

    rp_initiate

    achievegoalref rp_initiate
    Parameters:
    parameterref content
    parameterref language
    parameterref ontology
    parameterref receiver
    parameterref result
    parameterref timeout
    Referenced from:
    rp_initiate in capability jadex.planlib.ProtocolsMobile
    Plan Detail

    leastseenwalk

    mobile plan leastseenwalk()
    Walk to the least seen positions. Position just visited have value 1. The longer the position was not visted the lower the value. Good for seeking movable targets.

    Plan body:
    Plan trigger:
    Goals:
    performlookforwaste

    exploremap

    mobile plan exploremap()
    This plan explores the map by walking to unknown positions. Uses the absolute quantity of visits at the map points. Good for seeking firm targets.

    Plan body:
    Plan trigger:
    Goals:
    querywastebin
    Goals:
    querychargingstation

    patrol

    mobile plan patrol()
    Perform patrols.

    Plan body:
    Plan trigger:
    Goals:
    performpatrol

    cleanup

    mobile plan cleanup(Waste waste)
    Clean up waste by picking it up and carrying it to a waste bin.

    Parameters:
    in parameter waste (goal mappings: achievecleanup.waste)
    Plan body:
    Plan trigger:
    Goals:
    achievecleanup

    pickupwaste

    mobile plan pickupwaste(Waste waste)
    Pick up a waste.

    Parameters:
    in parameter waste (goal mappings: achievepickupwaste.waste)
    Plan body:
    Plan trigger:
    Goals:
    achievepickupwaste

    dropwaste

    mobile plan dropwaste(Wastebin wastebin)
    Drop a waste into a waste bin.

    Parameters:
    in parameter wastebin (goal mappings: achievedropwaste.wastebin)
    Plan body:
    Plan trigger:
    Goals:
    achievedropwaste

    loadbattery

    mobile plan loadbattery()
    Load the battery.

    Plan body:
    Plan trigger:
    Goals:
    maintainbatteryloaded

    moveto

    mobile plan moveto(Location location)
    Move to a location.

    Parameters:
    in parameter location (goal mappings: achievemoveto.location)
    Plan body:
    Plan trigger:
    Goals:
    achievemoveto

    memorizepositions

    mobile plan memorizepositions()
    This plan memorizes the positions.

    Plan body:
    Plan trigger:
    Goals:
    performmemorizepositions

    remotepickupwasteaction

    mobile plan remotepickupwasteaction(Waste waste)
    Pickup waste action.

    Parameters:
    in parameter waste (goal mappings: pickup_waste_action.waste)
    Plan body:
    Plan trigger:
    Goals:
    pickup_waste_action

    remotedropwasteaction

    mobile plan remotedropwasteaction(Waste waste, 
                                     Wastebin wastebin)
    Drop waste action.

    Parameters:
    in parameter waste (goal mappings: drop_waste_action.waste)
    in parameter wastebin (goal mappings: drop_waste_action.wastebin)
    Plan body:
    Plan trigger:
    Goals:
    drop_waste_action

    remotegetvisionaction

    mobile plan remotegetvisionaction(Vision vision)
    Drop waste action.

    Parameters:
    in parameter vision (goal mappings: get_vision_action.vision)
    Plan body:
    Plan trigger:
    Goals:
    get_vision_action

    localpickupwasteaction

    mobile plan localpickupwasteaction(Waste waste)
    Pickup waste action.

    Parameters:
    in parameter waste (goal mappings: pickup_waste_action.waste)
    Plan body:
    Plan trigger:
    Goals:
    pickup_waste_action

    localdropwasteaction

    mobile plan localdropwasteaction(Waste waste, 
                                    Wastebin wastebin)
    Drop waste action.

    Parameters:
    in parameter waste (goal mappings: drop_waste_action.waste)
    in parameter wastebin (goal mappings: drop_waste_action.wastebin)
    Plan body:
    Plan trigger:
    Goals:
    drop_waste_action

    localgetvisionaction

    mobile plan localgetvisionaction(Vision vision)
    Drop waste action.

    Parameters:
    in parameter vision (goal mappings: get_vision_action.vision)
    Plan body:
    Plan trigger:
    Goals:
    get_vision_action

    gui

    mobile plan gui()
    Create and show the gui.

    Plan body:
    Expression Detail

    query_in_vision_objects

    expression query_in_vision_objects
    Query all objects from the beliefs that are currently in sight.

    Expression:
    select LocationObject $object from SUtil.joinArbitraryArrays(new Object[] { $beliefbase.wastes, $beliefbase.wastebins, $beliefbase.chargingstations, $beliefbase.cleaners }) where $beliefbase.my_location.isNear($object.getLocation(), $beliefbase.my_vision.doubleValue())

    query_max_quantity

    expression query_max_quantity
    Query the max quantity map point.

    Expression:
    select one MapPoint $mp from $beliefbase.visited_positions order by $mp.getQuantity() desc

    query_min_quantity

    expression query_min_quantity
    Query the map points ordered by their quantity (least ones first).

    Expression:
    select MapPoint $mp from $beliefbase.visited_positions order by $mp.getQuantity()

    query_min_seen

    expression query_min_seen
    Query the map points ordered by their seen value (least ones first).

    Expression:
    select MapPoint $mp from $beliefbase.visited_positions order by $mp.getSeen()
    Configuration Detail

    default

    default configuration default
    Initial Goals:
    performlookforwaste
    performpatrol
    maintainbatteryloaded
    performmemorizepositions
    Initial Plans:
    gui

    nogui

    configuration nogui
    Initial Goals:
    performlookforwaste
    performpatrol
    maintainbatteryloaded
    performmemorizepositions

    Jadex 0.96

    Submit a bug or feature
    For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

    Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.