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

jadex.bdi.tutorial.RemoveWordPlanE3 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;

/**
 *  Remove a word from a word table.
 */
public class RemoveWordPlanE3 extends Plan
{
	//-------- attributes --------

	/** The belief name. */
//	protected String beliefsetname;

	//-------- constructor --------

	/**
	 *  Create a new plan.
	 *  @param beliefsetname The beliefset name.
	 */
	public RemoveWordPlanE3()
	{
//		this("egwords");
	}
	
	/**
	 *  Create a new plan.
	 *  @param beliefsetname The beliefset name.
	 * /
	public RemoveWordPlanE3(String beliefsetname)
	{
		getLogger().info("Created: "+this);
		this.beliefsetname = beliefsetname;
	}*/

	//-------- methods --------

	/**
	 *  The plan body.
	 */
	public void body()
	{
		Object[] facts = getBeliefbase().getBeliefSet("egwords").getFacts();
		getBeliefbase().getBeliefSet("egwords").removeFact(facts[0]);
		getLogger().info("Success, removed: "+facts[0]);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy