Jadex 0.96

jadex.testcases.goals
Agent GoalRegressionTest

jadex.testcases.goals.GoalRegressionTest
  • jadex.planlib.Test

  • agent GoalRegressionTest
    contains jadex.planlib.Test


    Agent arguments: timeout
    timeout long
    , testcenter
    testcenter AgentIdentifier

    Test different behaviours of goals.

    
    	This agent tests several goals and checks for correct results
    	using the GoalRegressionTestPlan.
    
    	The agent has some initial goals, which
    	specify the expected result state, and the
    	result states of all executed plans (process goals).
    	The GoalRegressionTestPlan reads this information
    	and checks, wether the actual goal history of a finished goal
    	matches the expected result.
    
    	The following tests are performed (see initial goals):
    	testachievesuccess:	Processing an achieve goal should stop when one plan
    		finishes successfully.
    	testpriority:	Plan with higher priority should be selected first
    		(first plan fails, second succeeds).
    	testperformsuccess:	Perform goal should continue after
    		one plan has succeeded (last process states will also be SUCCEEDED).
    	testperformfailure:	Perform goal should fail when no plan is applicable.
    	testbinding:	Two plans with different final state should be executed
    		according to the binding expression of the MPlan (see bindplan).
    
    


    Belief Summary
    beliefsetref reports
              
    beliefref int testcase_cnt
              
    exported beliefref AgentIdentifier testcenter
              
    exported beliefref long timeout
              
     
    Goal Summary
    achievegoal testachievesuccess(boolean[] test_process_states, boolean test_state)
              
    achievegoal testbinding(boolean[] test_process_states, boolean test_state)
              
    performgoal testperformfailure(boolean[] test_process_states, boolean test_state)
              
    performgoal testperformsuccess(boolean[] test_process_states, boolean test_state)
              
    achievegoal testpriority(boolean[] test_process_states, boolean test_state)
              
     
    Plan Summary
    standard plan bindplan(boolean targetstate)
              
    standard plan one()
              
    standard plan regtest()
              
    standard plan three()
              
    standard plan two()
              
     
    Configuration Summary
    default configuration  default
              
     

    Belief Detail

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

    testperformsuccess

    performgoal testperformsuccess(boolean[] test_process_states, 
                                   boolean test_state)
    Parameters:
    inout parameter test_process_states
    inout parameter test_state Default value:  false
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    testperformfailure

    performgoal testperformfailure(boolean[] test_process_states, 
                                   boolean test_state)
    Parameters:
    inout parameter test_process_states
    inout parameter test_state Default value:  false
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    testachievesuccess

    achievegoal testachievesuccess(boolean[] test_process_states, 
                                   boolean test_state)
    Parameters:
    inout parameter test_process_states
    inout parameter test_state Default value:  false
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    testpriority

    achievegoal testpriority(boolean[] test_process_states, 
                             boolean test_state)
    Parameters:
    inout parameter test_process_states
    inout parameter test_state Default value:  false
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false

    testbinding

    achievegoal testbinding(boolean[] test_process_states, 
                            boolean test_state)
    Parameters:
    inout parameter test_process_states
    inout parameter test_state Default value:  false
    BDI flags:
    retry: true
    retry delay: 0
    exclude: when_tried
    random selection: false
    post to all: false
    Plan Detail

    regtest

    standard plan regtest()
    Plan body:
    Plan trigger:
    Filter
    new GoalEventFilter(null, true)

    one

    standard plan one()
    Plan body:
    new ResultPlan(50, true)
    Plan trigger:
    Goals:
    testachievesuccess
    Goals:
    testperformsuccess
    Goals:
    testpriority

    two

    standard plan two()
    Plan body:
    new ResultPlan(250, false)
    Plan trigger:
    Goals:
    testachievesuccess
    Goals:
    testperformsuccess
    Goals:
    testpriority

    three

    standard plan three()
    Plan body:
    new ResultPlan(500, true)
    Plan trigger:
    Goals:
    testachievesuccess
    Goals:
    testperformsuccess
    Goals:
    testpriority

    bindplan

    standard plan bindplan(boolean targetstate)
    Parameters:
    in parameter targetstate Default value:  false
    Plan body:
    new ResultPlan(500, $plan.targetstate)
    Plan trigger:
    Goals:
    testbinding
    Configuration Detail

    default

    default configuration default
    Initial Beliefs:
    testcase_cnt Initial value:  5
    Initial Goals:
    testachievesuccess (test_state=true
    , test_process_states=new boolean[]{false, true}
    )
    testpriority (test_state=true
    , test_process_states=new boolean[]{false, true} )
    testperformsuccess (test_state=true
    , test_process_states=new boolean[]{false, true, true} )
    testperformfailure (test_state=false
    , test_process_states=new boolean[0] )
    testbinding (test_state=true
    , test_process_states=new boolean[]{false, true} )

    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.