
jadex.bdi.testcases.beliefs.BeliefValuePlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-bdi Show documentation
Show all versions of jadex-applications-bdi Show documentation
The Jadex BDI applications package contain
several example applications, benchmarks and
testcases using BDI agents.
The newest version!
package jadex.bdi.testcases.beliefs;
import jadex.base.test.TestReport;
import jadex.bdi.runtime.Plan;
import jadex.bridge.modelinfo.UnparsedExpression;
import jadex.commons.SUtil;
import jadex.javaparser.SJavaParser;
import java.util.HashMap;
import java.util.Map;
/**
* Test initial belief values.
*/
public class BeliefValuePlan extends Plan
{
//-------- constructors --------
/**
* Create a new countdown plan.
*/
public BeliefValuePlan()
{
getLogger().info("Created: "+this);
}
//-------- methods --------
/**
* The plan body.
*/
public void body()
{
TestReport tr = new TestReport("#1", "Test belief default values.");
Map check = new HashMap();
check.put("timeout", Long.valueOf(20000));
check.put("abel", "agent_initial_bel");
check.put("bbel", "capability_initial_bel");
check.put("cbel", "capability_default_bel");
UnparsedExpression[] args = getScope().getAgentModel().getConfiguration(getScope().getConfigurationName()).getArguments();
boolean ok = args.length==check.size();
for(int i=0; ok && i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy