jadex.bdi.planlib
Class DefaultBDIVisionProcessor

java.lang.Object
  extended by jadex.commons.SimplePropertyObject
      extended by jadex.bdi.planlib.DefaultBDIVisionProcessor
All Implemented Interfaces:
IPerceptProcessor, IPropertyObject

public class DefaultBDIVisionProcessor
extends SimplePropertyObject
implements IPerceptProcessor

Default bdi agent vision processor. Updates the agent's beliefsets according to the percepts of new/disappeared waste.


Field Summary
static java.lang.String ADD
          The add action.
protected  java.util.Map percepttypes
          The percepttypes infos.
static java.lang.String PROPERTY_MAXRANGE
          The maxrange property.
static java.lang.String PROPERTY_PERCEPTTYPES
          The percept types property.
static java.lang.String PROPERTY_RANGE
          The maxrange property.
static java.lang.String REMOVE
          The remove action.
static java.lang.String REMOVE_OUTDATED
          The remove_outdated action (checks all entries in the belief set, if they should be seen, but are no longer there).
static java.lang.String SET
          The set action.
static java.lang.String UNSET
          The unset action (sets a belief fact to null).
 
Fields inherited from class jadex.commons.SimplePropertyObject
pcs, properties
 
Constructor Summary
DefaultBDIVisionProcessor()
           
 
Method Summary
protected  boolean evaluate(IParsedExpression exp, IValueFetcher fetcher)
          Evaluate a condition.
protected  IVector1 getDefaultRange()
          Get the default range.
protected  java.lang.String[][] getMetaInfos(java.lang.String percepttype)
          Get meta infos about a percept type.
protected  java.lang.Object[] getPerceptTypes()
          Get the percept types defined for this generator.
protected  IVector1 getRange(ISpaceObject avatar)
          Get the range.
protected  java.lang.String getRangePropertyName()
          Get the range property name.
 void processPercept(IEnvironmentSpace space, java.lang.String type, java.lang.Object percept, IComponentIdentifier agent, ISpaceObject avatar)
          Process a new percept.
 
Methods inherited from class jadex.commons.SimplePropertyObject
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jadex.commons.IPropertyObject
getProperty, getPropertyNames, hasProperty, setProperty
 

Field Detail

PROPERTY_PERCEPTTYPES

public static java.lang.String PROPERTY_PERCEPTTYPES
The percept types property.


ADD

public static java.lang.String ADD
The add action.


REMOVE

public static java.lang.String REMOVE
The remove action.


REMOVE_OUTDATED

public static java.lang.String REMOVE_OUTDATED
The remove_outdated action (checks all entries in the belief set, if they should be seen, but are no longer there).


SET

public static java.lang.String SET
The set action.


UNSET

public static java.lang.String UNSET
The unset action (sets a belief fact to null).


PROPERTY_MAXRANGE

public static java.lang.String PROPERTY_MAXRANGE
The maxrange property.


PROPERTY_RANGE

public static java.lang.String PROPERTY_RANGE
The maxrange property.


percepttypes

protected java.util.Map percepttypes
The percepttypes infos.

Constructor Detail

DefaultBDIVisionProcessor

public DefaultBDIVisionProcessor()
Method Detail

processPercept

public void processPercept(IEnvironmentSpace space,
                           java.lang.String type,
                           java.lang.Object percept,
                           IComponentIdentifier agent,
                           ISpaceObject avatar)
Process a new percept.

Specified by:
processPercept in interface IPerceptProcessor
Parameters:
space - The space.
type - The type.
percept - The percept.
agent - The agent identifier.
agent - The avatar of the agent (if any).

getPerceptTypes

protected java.lang.Object[] getPerceptTypes()
Get the percept types defined for this generator.

Returns:
The percept types.

getMetaInfos

protected java.lang.String[][] getMetaInfos(java.lang.String percepttype)
Get meta infos about a percept type.


getRange

protected IVector1 getRange(ISpaceObject avatar)
Get the range.

Returns:
The range.

getDefaultRange

protected IVector1 getDefaultRange()
Get the default range.

Returns:
The range.

getRangePropertyName

protected java.lang.String getRangePropertyName()
Get the range property name.

Returns:
The range property name.

evaluate

protected boolean evaluate(IParsedExpression exp,
                           IValueFetcher fetcher)
Evaluate a condition.

Parameters:
exp - The expression.
fetcher - The value fetcher.


Copyright © 2010. All Rights Reserved.