
jadex.bdi.examples.hunterprey_classic.creature.actsense.GetVisionPlan 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.hunterprey_classic.creature.actsense;
import jadex.bdi.examples.hunterprey_classic.Creature;
import jadex.bdi.examples.hunterprey_classic.RequestVision;
import jadex.bdi.runtime.IGoal;
import jadex.bridge.fipa.Done;
/**
* Handles an get_vision goal.
*/
/* @handles goal get_vision
* @requires goal df_search
* @requires goal request
* @requires belief myself
* @requires belief environmentagent
*/
public class GetVisionPlan extends RemoteActionPlan
{
/**
* The plan body.
*/
public void body()
{
RequestVision rv = new RequestVision((Creature)getBeliefbase().getBelief("my_self").getFact());
IGoal result = requestAction(rv);
//Done done = (Done)result.getGoal().getResult();
Done done = (Done)result.getParameter("result").getValue();
getParameter("vision").setValue(((RequestVision)done.getAction()).getVision());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy