jadex.bdi.tutorial.ThankYouPlanC3 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.
package jadex.bdi.tutorial;
import jadex.bdi.runtime.Plan;
/**
* The thank you plan congratulates a user for using the translation
* service every 10th translation.
*/
public class ThankYouPlanC3 extends Plan
{
//-------- constructors --------
/**
* Create a new plan.
*/
public ThankYouPlanC3()
{
getLogger().info("Created:"+this);
}
//-------- methods --------
/**
* Execute the plan.
*/
public void body()
{
int cnt = ((Integer)getBeliefbase().getBelief("transcnt").getFact()).intValue();
getLogger().info("Congratulations! You have translated the "+cnt
+" word today!");
}
}