
jadex.bdi.testcases.plans.RemoverPlan 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.plans;
import jadex.bdi.runtime.Plan;
/**
* The remover plan waits for a short time
* and then modifies the beliefbase..
*/
public class RemoverPlan extends Plan
{
//-------- constructors --------
/**
* Create a new plan.
*/
public RemoverPlan()
{
getLogger().info("Created: "+this);
}
//-------- methods --------
/**
* The plan body.
*/
public void body()
{
waitFor(3000);
getBeliefbase().getBelief("mycontext").setFact(Boolean.FALSE);
if(getPlanbase().getPlans().length==1)
{
getLogger().info("Success. Plan has been removed.");
}
else
{
getLogger().info("Failure! Plan with invalid context still alive.");
}
killAgent();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy