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

jadex.bdi.tutorial.ThankYouPlanC3 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.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!");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy