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

jadex.bdi.examples.garbagecollector_classic.BurnPlan Maven / Gradle / Ivy

Go to download

The Jadex BDI applications package contain several example applications, benchmarks and testcases using BDI agents.

The newest version!
package jadex.bdi.examples.garbagecollector_classic;

import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.Plan;

/**
 *  Burn a piece of garbage.
 */
public class BurnPlan extends Plan
{
	/**
	 *  The plan body.
	 */
	public void body()
	{
		//System.out.println("Burn plan activated!");
		
		Environment env = (Environment)getBeliefbase().getBelief("env").getFact();

		// Pickup the garbarge.
		IGoal pickup = createGoal("pick");
		dispatchSubgoalAndWait(pickup);

		// Burn the waste.
		waitFor(100);
		env.burn(getComponentName());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy