
jadex.bdi.testcases.planlib.DADecideIterationPlan 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.testcases.planlib;
import jadex.bdi.runtime.Plan;
/**
* Decide about the next round and the cfp for it.
*/
public class DADecideIterationPlan extends Plan
{
/**
* The plan body.
*/
public void body()
{
Object[] cfps = getParameterSet("history").getValues();
Double newcfp = Double.valueOf(((Double)cfps[cfps.length-1]).doubleValue()-5);
if(newcfp.doubleValue()<100)
fail();
getParameter("cfp").setValue(newcfp);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy