All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdi.examples.moneypainter.DistributeWorkPlan Maven / Gradle / Ivy

Go to download

The Jadex BDI applications package contain several example applications, benchmarks and testcases using BDI agents.

The newest version!
package jadex.bdi.examples.moneypainter;


import jadex.bdi.runtime.AgentEvent;
import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.IGoalListener;
import jadex.bdi.runtime.Plan;
import jadex.bdi.runtime.impl.flyweights.GoalFlyweight;

/**
 * 
 */
public class DistributeWorkPlan extends Plan
{
	/**
	 * 
	 */
	public void body()
	{
		int target = ((Integer)getBeliefbase().getBelief("target").getFact()).intValue();
		int money = ((Integer)getBeliefbase().getBelief("money").getFact()).intValue();
		
		// Create a subgoal for each euro to get
		for(int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy