
jadex.bdi.examples.garbagecollector_classic.BurnPlan 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.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