
jadex.bdi.testcases.planlib.DADecideIterationGenPlan 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.planlib.protocols.IOfferGenerator;
import jadex.bdi.runtime.Plan;
/**
* Decide about the next round and the cfp for it.
*/
public class DADecideIterationGenPlan extends Plan
{
/**
* The plan body.
*/
public void body()
{
IOfferGenerator gen = (IOfferGenerator)getParameter("cfp_info").getValue();
gen.setNextRound();
// Use offer only when limit was not reached yet.
if(!gen.getLimitOffer().equals(gen.getLastOffer()))
getParameter("cfp").setValue(gen.getCurrentOffer());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy