
jadex.bdi.examples.cleanerworld_classic.environment.DispatchCompleteVisionPlan 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.cleanerworld_classic.environment;
import jadex.bdi.examples.cleanerworld_classic.Environment;
import jadex.bdi.examples.cleanerworld_classic.RequestCompleteVision;
import jadex.bdi.examples.cleanerworld_classic.Vision;
import jadex.bdi.runtime.Plan;
import jadex.bridge.fipa.Done;
/**
* The dispatch vision plan calculates the vision for a
* participant and send it back.
*/
public class DispatchCompleteVisionPlan extends Plan
{
//-------- constructors --------
/**
* Create a new plan.
*/
public DispatchCompleteVisionPlan()
{
getLogger().info("Created: "+this);
}
//------ methods -------
/**
* The plan body.
*/
public void body()
{
Environment env = (Environment)getBeliefbase().getBelief("environment").getFact();
Vision v = env.getCompleteVision();
RequestCompleteVision rcv = (RequestCompleteVision)getParameter("action").getValue();
rcv.setVision(v);
Done done = new Done();
done.setAction(rcv);
getParameter("result").setValue(done);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy