jadex.testcases.beliefs
Agent BeliefSetChanges
- agent BeliefSetChanges
 
Test belief set changes
 
Tests 1 and 2: Test if adding and removing facts trigger plan.
Tests 3,4,5 check changes for the <facts> tag.
Case 1: A new value is stored in the belief "bel". As it is equal
        no change events will be propagated.
Case 2: The fact of "bel" is provoked to throw a bean property change
        by calling the modified() method. As the "belset" does not
        have changed considering its content no plan is invoked.
Case 3: A new value is added causing a bean property change event that
        leads to plan invocation.
 
 
 
| Initial State Summary | 
| default initial state  | default
 | 
 
bel
belief BeanChangesArrayList bel
- 
- Default fact:
- new BeanChangesArrayList()
 
result
belief int result
- 
- Default fact:
- 0
 
belset_a
beliefset String belset_a
- 
- Default facts:
- "a1"
- "a2"
- "a3"
 
belset
beliefset String belset
- 
- Default facts expression: (dynamic)
- $beliefbase.bel
 
belsetchanger
standard plan belsetchanger()
- 
- Plan body:
- new BeliefSetChangesPlan()
 
a_added
standard plan a_added()
- 
- Plan body:
- new BeliefIncrementPlan("result", 1)
- Fact added trigger
- belset_a
 
a_removed
standard plan a_removed()
- 
- Plan body:
- new BeliefIncrementPlan("result", -1)
- Fact removed trigger
- belset_a
 
belset_added
standard plan belset_added()
- 
- Plan body:
- new BeliefIncrementPlan("result")
- Beliefset change trigger
- belset
 
default
default initial state default
- 
- Initial Plans:
- belsetchanger
 
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-2005 Lars Braubach, Alexander Pokahr, Andrzej Walczak - University of Hamburg. Use is subject to license terms.