Jadex 0.96

jadex.examples.marsworld.sentry
Agent Sentry

jadex.examples.marsworld.sentry.Sentry
  • jadex.planlib.DF
  • jadex.examples.marsworld.movement.Movement

  • agent Sentry
    contains jadex.planlib.DF, Movement

    Sentry agent for finding ore..

    This agent move to positons to check for minerals. Then calls the Production Agent to produce the ore. After all locations have been visited the Agent moves home.


    Belief Summary
    beliefset Target analysed_targets
               The seen targets.
    belief Environment environment
               The environment as singleton object.
    beliefref missionend
               Is the mission finished?
    belief Location my_home
               The home location.
    belief Location my_location
               The current location.
    belief double my_speed
               The speed.
    beliefset Target my_targets
               The seen targets.
    belief String my_type
               The agent type (carry, producer or sentry)
    belief double my_vision
               The sight radius.
     
    Goal Summary
    achievegoal analyse_target(Target target)
               Analyse a target.
    achievegoalref df_deregister
               Deregister the agent description at the df.
    achievegoalref df_register
               Register the agent description at the df.
    achievegoalref df_search
               Usable for searching other agents.
    achievegoal find_targets()
               Look for targets.
    achievegoalref move_dest
               Move to some destination.
    performgoalref walk_around
               Just walk around without a target.
     
    Plan Summary
    standard plan add_target()
               Add a new target when new info available.
    standard plan do_analyse(Target target)
               Analyse a target.
    standard plan do_find()
               Find targets and add them to the targets belief.
     
    Event Summary
    messageevent request_producer(String language, String ontology, String performative)
              
    messageevent target_inform(Class content-class, String ontology, String performative)
               Other agents inform the sentries about discovered potential ore resources.
     
    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.SENTRY_AGENT
    Assign to:
    my_type in capability Movement

    my_speed

    belief double my_speed
    The speed.

    Default fact:
    5
    Assign to:
    my_speed in capability Movement

    my_vision

    belief double my_vision
    The sight radius.

    Default fact:
    0.1
    Assign to:
    my_vision in capability Movement

    my_targets

    beliefset Target my_targets
    The seen targets.


    analysed_targets

    beliefset Target analysed_targets
    The seen targets.


    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
    Goal Detail

    find_targets

    achievegoal find_targets()
    Look for targets.

    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false
    Drop Condition:
    $beliefbase.missionend

    analyse_target

    achievegoal analyse_target(Target target)
    Analyse a target.

    Parameters:
    in parameter target Binding options:   select $target from $beliefbase.my_targets where !$beliefbase.getBeliefSet("analysed_targets").containsFact($target)
    - The parameter target is bound to one of the facts in the belief my_targets.
    BDI flags:
    retry: false
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false
    Uniqueness enabled:
    Context Condition:
    (select one Target $target from $beliefbase.my_targets order by $beliefbase.my_location.getDistance($target.getLocation())) == $goal.target
    Creation Condition:
    !$beliefbase.missionend
    Drop Condition:
    $beliefbase.missionend
    Target Condition:
    $beliefbase.getBeliefSet("analysed_targets").containsFact($goal.target)
    Deliberation:
    inhibits walk_around

    walk_around

    performgoalref walk_around
    Just walk around without a target.

    Referenced from:
    walk_around 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 description 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 description 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
    Plan Detail

    do_find

    standard plan do_find()
    Find targets and add them to the targets belief.

    Plan body:
    Plan trigger:
    Goals:
    find_targets

    do_analyse

    standard plan do_analyse(Target target)
    Analyse a target.

    Parameters:
    in parameter target (goal mappings: analyse_target.target)
    Plan body:
    Plan trigger:
    Goals:
    analyse_target

    add_target

    standard plan add_target()
    Add a new target when new info available.

    Plan body:
    Plan trigger:
    Message events:
    target_inform
    Event Detail

    target_inform

    messageevent target_inform(Class content-class, 
                               String ontology, 
                               String performative)
    Other agents inform the sentries about discovered potential ore resources.

    Parameters:
    fixed parameter content-class Default value:  Target.class
    fixed parameter ontology Default value:  MarsOntology.ONTOLOGY_NAME
    fixed parameter performative Default value:  SFipa.INFORM
    Event flags:
    direction: receive
    message type: fipa
    random selection: false
    post to all: false

    request_producer

    messageevent request_producer(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.REQUEST
    Event flags:
    direction: send
    message type: fipa
    random selection: false
    post to all: false
    Configuration Detail

    default

    default configuration default
    Initial Goals:
    df_register (description=$propertybase.getProperty("fipa.agentdescription.sentry")
    )
    walk_around
    find_targets
    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.