Jadex 0.96

jadex.examples.marsworld.carrier
Agent Carry

jadex.examples.marsworld.carrier.Carry
  • jadex.planlib.DF
  • jadex.examples.marsworld.movement.Movement
  • jadex.planlib.Protocols

  • agent Carry
    contains jadex.planlib.DF, Movement, jadex.planlib.Protocols

    Carry agent for carrying ore.

    This Agent is called by the Production Agent to carry the produced ore. Therefore it is registering it's carry-servivce at the DF.


    Belief Summary
    belief Environment environment
               The environment as singleton object.
    beliefset Target finished_targets
               The targets sent to the sentries.
    beliefref missionend
               Is the mission finished?
    belief int my_capacity
               The ore capacity it can carry.
    belief Location my_home
               The home location.
    belief Location my_location
               The current location.
    belief double my_speed
               The speed.
    beliefsetref my_targets
               The seen targets.
    belief String my_type
               The agent type (carry, producer or sentry)
    belief double my_vision
               The sight radius.
    belief int ore
               The carried ore amount.
    beliefref IFilter rp_filter
               The filter for deciding which request messages are handled in this capability.
     
    Goal Summary
    achievegoal carry_ore(Location destination)
               Carry ore home from a target.
    achievegoalref df_deregister
               Deregister the agent at the df.
    achievegoalref df_register
               Register the agent at the df.
    achievegoalref df_search
               Usable for searching other agents.
    achievegoalref move_dest
               Move to some destination.
    achievegoalref rp_execute_request
              
    performgoalref walk_around
               Just walk around without a target.
    performgoalref watch_targets
               Watch out for targets.
     
    Plan Summary
    standard plan carry()
               Main service plan that handles action requests.
    standard plan carry_ore(Location destination)
               Carry home ore.
    standard plan informer()
               Inform sentries about a new target.
     
    Event Summary
    messageevent inform_target(String language, String ontology, String performative)
              
    messageevent request_carry(Class content-class, String ontology, String performative)
              
     
    Configuration Summary
    default configuration  default
              
     

    Belief Detail

    environment

    belief Environment environment
    The environment as singleton object.

    Default fact:
    Environment.getInstance()
    Assign to:
    environment in capability Movement

    my_home

    belief Location my_home
    The home location.

    Default fact:
    $beliefbase.environment.getHomebase().getLocation()
    Assign to:
    my_home in capability Movement

    my_location

    belief Location my_location
    The current location.

    Default fact:
    $beliefbase.my_home
    Assign to:
    my_location in capability Movement

    my_type

    belief String my_type
    The agent type (carry, producer or sentry)

    Default fact:
    Environment.CARRY_AGENT
    Assign to:
    my_type in capability Movement

    my_speed

    belief double my_speed
    The speed.

    Default fact:
    15
    Assign to:
    my_speed in capability Movement

    my_vision

    belief double my_vision
    The sight radius.

    Default fact:
    0.05
    Assign to:
    my_vision in capability Movement

    my_capacity

    belief int my_capacity
    The ore capacity it can carry.

    Default fact:
    20

    ore

    belief int ore
    The carried ore amount.

    Default fact:
    0

    finished_targets

    beliefset Target finished_targets
    The targets sent to the sentries.


    missionend

    beliefref  missionend
    Is the mission finished?

    Update rate:
    1000 ms
    Default fact: (dynamic)
    $beliefbase.environment.getHomebase().getRemainingMissionTime()==0
    Referenced from:
    missionend in capability Movement

    rp_filter

    beliefref IFilter rp_filter
    The filter for deciding which request messages are handled in this capability.

    Default fact:
    IFilter.NEVER
    Referenced from:
    rp_filter in capability jadex.planlib.Protocols

    my_targets

    beliefsetref  my_targets
    The seen targets.

    Referenced from:
    my_targets in capability Movement
    Goal Detail

    carry_ore

    achievegoal carry_ore(Location destination)
    Carry ore home from a target.

    Parameters:
    in parameter destination
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false
    Drop Condition:
    $beliefbase.missionend
    Deliberation:
    inhibits walk_around

    walk_around

    performgoalref walk_around
    Just walk around without a target.

    Referenced from:
    walk_around in capability Movement

    watch_targets

    performgoalref watch_targets
    Watch out for targets.

    Referenced from:
    watch_targets in capability Movement

    move_dest

    achievegoalref move_dest
    Move to some destination.

    Parameters:
    parameterref destination
    Referenced from:
    move_dest in capability Movement

    df_register

    achievegoalref df_register
    Register the agent at the df.

    Parameters:
    parameterref description
    parameterref df
    parameterref leasetime
    parameterref result
    Referenced from:
    df_register in capability jadex.planlib.DF

    df_deregister

    achievegoalref df_deregister
    Deregister the agent at the df.

    Parameters:
    parameterref description
    parameterref df
    Referenced from:
    df_deregister in capability jadex.planlib.DF

    df_search

    achievegoalref df_search
    Usable for searching other agents.

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

    rp_execute_request

    achievegoalref rp_execute_request
    Parameters:
    parameterref action
    parameterref initiator
    parameterref result
    Referenced from:
    rp_execute_request in capability jadex.planlib.Protocols
    Plan Detail

    carry

    standard plan carry()
    Main service plan that handles action requests.

    Plan body:
    Plan waitqueue:
    Message events:
    request_carry

    carry_ore

    standard plan carry_ore(Location destination)
    Carry home ore.

    Parameters:
    in parameter destination (goal mappings: carry_ore.destination)
    Plan body:
    Plan trigger:
    Goals:
    carry_ore

    informer

    standard plan informer()
    Inform sentries about a new target.

    Plan body:
    Plan trigger:
    Fact added
    my_targets
    Event Detail

    request_carry

    messageevent request_carry(Class content-class, 
                               String ontology, 
                               String performative)
    Parameters:
    fixed parameter content-class Default value:  RequestCarry.class
    fixed parameter ontology Default value:  MarsOntology.ONTOLOGY_NAME
    fixed parameter performative Default value:  SFipa.REQUEST
    Event flags:
    direction: receive
    message type: fipa
    random selection: false
    post to all: false

    inform_target

    messageevent inform_target(String language, 
                               String ontology, 
                               String performative)
    Parameters:
    fixed parameter language Default value:  SFipa.NUGGETS_XML
    fixed parameter ontology Default value:  MarsOntology.ONTOLOGY_NAME
    fixed parameter performative Default value:  SFipa.INFORM
    Event flags:
    direction: send
    message type: fipa
    random selection: false
    post to all: false
    Configuration Detail

    default

    default configuration default
    Initial Beliefs:
    rp_filter Initial value:  IFilter.ALWAYS
    Initial Goals:
    df_register (description=$propertybase.getProperty("fipa.agentdescription.carrier")
    )
    walk_around
    watch_targets
    Initial Plans:
    carry
    End Goals:
    df_deregister

    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.