jadex.testcases.beliefs
Agent BeliefSetChanges
jadex.testcases.beliefs.BeliefSetChanges
jadex.planlib.Test
- agent BeliefSetChanges
- contains jadex.planlib.Test
Agent arguments: timeout- timeout long
, testcenter- testcenter AgentIdentifier
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.
Test 6: Test if '$addedfact' can be accessed within body expression.
Test 7: Test if '$removedfact' can be accessed within body expression.
Configuration Summary |
default configuration |
default
|
bel
belief BeanChangesArrayList bel
- Default fact:
new BeanChangesArrayList()
result
belief int result
- Default fact:
0
result_b
belief Object result_b
belset_a
beliefset String belset_a
- Default facts:
"a1"
"a2"
"a3"
belset_b
beliefset String belset_b
belset
beliefset String belset
- Default facts expression: (dynamic)
$beliefbase.bel
testcase_cnt
beliefref int testcase_cnt
- Default fact:
1
- Referenced from:
testcase_cnt
in capability jadex.planlib.Test
timeout
exported beliefref long timeout
- Default fact:
0
- Referenced from:
timeout
in capability jadex.planlib.Test
testcenter
exported beliefref AgentIdentifier testcenter
- Referenced from:
testcenter
in capability jadex.planlib.Test
reports
beliefsetref reports
- Referenced from:
reports
in capability jadex.planlib.Test
belsetchanger
standard plan belsetchanger()
- Plan body:
a_added
standard plan a_added()
- Plan body:
new BeliefIncrementPlan("result", 1)
- Plan trigger:
- Fact added
belset_a
a_removed
standard plan a_removed()
- Plan body:
new BeliefIncrementPlan("result", -1)
- Plan trigger:
- Fact removed
belset_a
belset_added
standard plan belset_added()
- Plan body:
new BeliefIncrementPlan("result")
- Plan trigger:
- Beliefset change
belset
belset_addfact
standard plan belset_addfact()
- Plan body:
new ResultPlan($addedfact!=null, $addedfact, "result_b")
- Plan trigger:
- Fact added
belset_b
belset_removefact
standard plan belset_removefact()
- Plan body:
new ResultPlan($removedfact!=null, $removedfact, "result_b")
- Plan trigger:
- Fact removed
belset_b
default
default configuration default
- Initial Beliefs:
- testcase_cnt Initial value:
7
- 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-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.