decisionMakingSystem
Class PerceptiveField

Package class diagram package PerceptiveField
java.lang.Object
  extended by decisionMakingSystem.PerceptiveField

public class PerceptiveField
extends Object

Perceptive field is taking care about the actions and their link with items (satisfaction of affordances) therefore it contains link to ThingManager and structures to hold currently perceived items and actions, which are active and compete to be executed

Author:
Ondrej

Field Summary
 ThingsManager allThings
          structure which gathers all currently visible items and handles messages from GB e.g.
 DecisionModuleImpl dModule
          necessary for accessing memory
 Logger log
          global log to log anything into:)
 ArrayList<EItem> memoryItems
          items which were obtained by the cue posed on memory
 ArrayList<EItem> perceivedItems
          perceived items - those who made it through the attention filter
 ArrayList<Action> processArea
          processes which are active and about to be executed
 double stress
          actual value of stress - dependent on how much pressure is there on agent (how many actions to do)
 
Constructor Summary
PerceptiveField(Logger log, ThingsManager things, DecisionModuleImpl dModule)
           
 
Method Summary
 void addAction(Action action)
          Adds action to the processArea, disable grandfather if there
 void addSource(EItem item)
          it adds new item to the perceptive field if it can fits in - adds to memory - seeing item increases if it is already there
 Action chooseAction(int time)
          choose action from process field - so it is not the same as choosing action in the decision module
 void clearProcessArea()
           
 Action findMaxActivity()
           
 EItem getPerceivedItemOfAffordance(AffordanceType affType)
          returns item of provided affordance, if it perceives any
 void increaseAttractivityToAllSources(Action action)
          increases attractivity to all visible (NOT only percieved) sources of the action
 boolean isAffordanceSatisfied(AffordanceType affordance, Action action)
          checks if the affordance is satisfied by something
 boolean isThingAssignedToAction(EItem item, Action action)
          checks if the item is assigned to action
 String printPerceivedItems()
           
 void removeAction(Action action)
          removes action from preactive actions, plus if it has some items, decreases their attractivities
 void removeActionsOfIntention(Intention temp)
          removes actions of the intention and call recursion, so it should erase whole tree when it comes to it
 void removeSource()
          removes source with no assigned action or with assigned action of minimal activity
 void removeSource(EItem item)
          safely remove source from perceivedItems so it removes itself from affordances
 void satisfyAffordance(Action action, AffordanceType af, EItem item)
           
 void updateActivities(int time)
          updates activities of enabled preactive actions - actions in process area
 void updateAttractivity()
          update attractivity of all items in the perceptive field
 void updateFadeout()
          updates values of fadeout in all items - if the item is not perceived, it fades out of agent perception -> removed from perceivedItems same thing for processes - if process doesn't have activity big enough to get to execution, its fading out
 void updateStress()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processArea

public final ArrayList<Action> processArea
processes which are active and about to be executed


memoryItems

public ArrayList<EItem> memoryItems
items which were obtained by the cue posed on memory


perceivedItems

public final ArrayList<EItem> perceivedItems
perceived items - those who made it through the attention filter


allThings

public ThingsManager allThings
structure which gathers all currently visible items and handles messages from GB e.g. addition and deletion of an item


log

public Logger log
global log to log anything into:)


stress

public double stress
actual value of stress - dependent on how much pressure is there on agent (how many actions to do)


dModule

public DecisionModuleImpl dModule
necessary for accessing memory

Constructor Detail

PerceptiveField

public PerceptiveField(Logger log,
                       ThingsManager things,
                       DecisionModuleImpl dModule)
Method Detail

addAction

public void addAction(Action action)
Adds action to the processArea, disable grandfather if there

Parameters:
action -

isThingAssignedToAction

public boolean isThingAssignedToAction(EItem item,
                                       Action action)
checks if the item is assigned to action

Parameters:
item -
action -
Returns:
true if item is assigned to the action

isAffordanceSatisfied

public boolean isAffordanceSatisfied(AffordanceType affordance,
                                     Action action)
checks if the affordance is satisfied by something

Parameters:
affordance -
action -
Returns:
true if the affordance of the action has some item assigned - so its satisfied

chooseAction

public Action chooseAction(int time)
choose action from process field - so it is not the same as choosing action in the decision module


addSource

public void addSource(EItem item)
it adds new item to the perceptive field if it can fits in - adds to memory - seeing item increases if it is already there

Parameters:
item -

removeSource

public void removeSource(EItem item)
safely remove source from perceivedItems so it removes itself from affordances

Parameters:
item -

removeSource

public void removeSource()
removes source with no assigned action or with assigned action of minimal activity


findMaxActivity

public Action findMaxActivity()
Returns:
action with maximal activity among actions in process area

updateActivities

public void updateActivities(int time)
updates activities of enabled preactive actions - actions in process area

Parameters:
time -

updateFadeout

public void updateFadeout()
updates values of fadeout in all items - if the item is not perceived, it fades out of agent perception -> removed from perceivedItems same thing for processes - if process doesn't have activity big enough to get to execution, its fading out


removeActionsOfIntention

public void removeActionsOfIntention(Intention temp)
removes actions of the intention and call recursion, so it should erase whole tree when it comes to it

Parameters:
temp -

getPerceivedItemOfAffordance

public EItem getPerceivedItemOfAffordance(AffordanceType affType)
returns item of provided affordance, if it perceives any

Parameters:
affType -
Returns:

clearProcessArea

public void clearProcessArea()

removeAction

public void removeAction(Action action)
removes action from preactive actions, plus if it has some items, decreases their attractivities

Parameters:
action -

updateAttractivity

public void updateAttractivity()
update attractivity of all items in the perceptive field


increaseAttractivityToAllSources

public void increaseAttractivityToAllSources(Action action)
increases attractivity to all visible (NOT only percieved) sources of the action

Parameters:
action -

updateStress

public void updateStress()

printPerceivedItems

public String printPerceivedItems()

satisfyAffordance

public void satisfyAffordance(Action action,
                              AffordanceType af,
                              EItem item)


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.