All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdi.testcases.plans.MicroStepPlan Maven / Gradle / Ivy

Go to download

The Jadex BDI applications package contain several example applications, benchmarks and testcases using BDI agents.

There is a newer version: 2.4
Show newest version
package jadex.bdi.testcases.plans;

import jadex.base.test.TestReport;
import jadex.bdi.runtime.Plan;

/**
 *  Testing micro steps.
 */
public class MicroStepPlan extends Plan
{
	//-------- methods --------

	/**
	 *  The body method.
	 */
	public void body()
	{
		TestReport tr = new TestReport("#1", "Testing micro steps. There are 3 conditions a, b, and(a,b) that should trigger immediately.");
		getLogger().info("Testing micro steps. There are 3 conditions a, b, and(a,b) that should trigger immediately.");
		int plan_cnt1 = getPlanbase().getPlans().length;
		getLogger().info("Plan: Setting a to true.");
		getBeliefbase().getBelief("a").setFact(new Boolean(true));
		int plan_cnt2 = getPlanbase().getPlans().length;
		getLogger().info("Plan: a is now true.");
		getLogger().info("Plan: Setting b to true.");
		getBeliefbase().getBelief("b").setFact(new Boolean(true));
		int plan_cnt3 = getPlanbase().getPlans().length;
		getLogger().info("Plan: b is now true.");
		getLogger().info("Step 1 finished.");
		if(plan_cnt1




© 2015 - 2024 Weber Informatics LLC | Privacy Policy