jadex.testcases.capabilities
Agent DynamicCapability
jadex.testcases.capabilities.DynamicCapability
jadex.planlib.Test
- agent DynamicCapability
- contains jadex.planlib.Test
Agent arguments: timeout- timeout long
, testcenter- testcenter AgentIdentifier
Test if a capability can be added at runtime.
DynamicCapabilityAgent
An agent that adds itself a new capability at runtime.
Also creates a beliefset reference to access a beliefset
of the included capability.
Usage: Use e.g. the conversation center to send request messages to this agent.
- "translate english_german dog" -> sends back a not understood
- "add capability" (adds a translation capability)
- "translate english_german dog" -> sends back an inform with dog - Hund
- "remove capability" (removes the translation capability)
- "translate english_german dog" -> sends back a not understood
Use the BDIViewer to observe how the capability and the beliefset
reference get added and removed.
Plan Summary |
standard plan |
notunderstood()
Reacts on all messages that can not be handled by the
the translation plan. |
standard plan |
testplan()
performs the test. |
Configuration Summary |
default configuration |
default
|
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
notunderstood
standard plan notunderstood()
- Reacts on all messages that can not be handled by the
the translation plan.
- Plan body:
- Plan trigger:
- Message events:
any_message
testplan
standard plan testplan()
- performs the test.
- Plan body:
any_message
messageevent any_message()
- All messages can be also mapped to a any_message,
when no more specific mapping can be found.
- Event flags:
- direction: receive
- message type: fipa
- random selection: false
- post to all: false
not_understood
messageevent not_understood(String performative)
- Parameters:
- fixed parameter
performative
Default value:
SFipa.NOT_UNDERSTOOD
- Event flags:
- direction: send
- message type: fipa
- random selection: false
- post to all: false
request_translation
messageevent request_translation(String content,
String performative,
String reply-with,
AgentIdentifier [set] receivers)
- Parameters:
- fixed parameter
content
Default value:
"translate english_german dog"
- fixed parameter
performative
Default value:
SFipa.REQUEST
- in parameter
reply-with
Default value:
SFipa.createUniqueId($scope.getAgentName())
- Initialized with unique random value.
- fixed parameterset
receivers
Default values:
$agent.getAgentIdentifier()
- Event flags:
- direction: send
- message type: fipa
- random selection: false
- post to all: false
default
default configuration default
- Initial Beliefs:
- testcase_cnt Initial value:
3
- Initial Plans:
- testplan
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.