
jadex.bdi.testcases.beliefs.FactAdderPlan 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.bdi.runtime.Plan;
/**
* Just acts facts to a beliefset.
* This plan is used by the WaitForFactAdded testcase.
*/
public class FactAdderPlan extends Plan
{
public void body()
{
String instancename = (String)getParameter("instance").getValue();
waitFor(100); // wait for the listening plan to start
for(int i=0; i < 5; i++)
{
String fact = instancename + " " + i;
getBeliefbase().getBeliefSet("beliefSetToAddFacts").addFact(fact);
getLogger().info("added fact: " + fact);
waitFor(50);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy