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

jadex.bdi.examples.cleanerworld.cleaner.Cleaner.agent.xml Maven / Gradle / Ivy

Go to download

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

The newest version!




	
		java.util.*
		java.util.logging.*
		jadex.commons.*
		jadex.rules.rulesystem.rules.functions.*
 		jadex.extension.envsupport.environment.*
		jadex.extension.envsupport.environment.space2d.*
		jadex.extension.envsupport.math.*
		jadex.bdi.examples.cleanerworld.*
		jadex.commons.future.*
	

	
		
 			$scope.getParentAccess().getExtension("my2dspace")
 		
 		
 		
 			$beliefbase.environment.getAvatar($scope.getComponentDescription(), $scope.getAgentModel().getFullName())
 		

		

		

		

		

		
			10
			10
		
		
		
			
 				MapPoint.getMapPointRaster($beliefbase.raster[0].intValue(), $beliefbase.raster[1].intValue(),
 					$beliefbase.environment.getAreaSize().getXAsDouble(), $beliefbase.environment.getAreaSize().getYAsDouble())
			
		

		
		
		
			$beliefbase.environment.getProperty("daytime")
		

		
			$beliefbase.myself.position
 		
 		
 		
			$beliefbase.myself.speed
 		
 		
 		
			$beliefbase.myself.vision_range
 		
 		
 		
			$beliefbase.myself.chargestate
 		

		
			new Vector2Double(0.1, 0.1)
			new Vector2Double(0.1, 0.9)
			new Vector2Double(0.3, 0.9)
			new Vector2Double(0.3, 0.1)
			new Vector2Double(0.5, 0.1)
			new Vector2Double(0.5, 0.9)
			new Vector2Double(0.7, 0.9)
			new Vector2Double(0.7, 0.1)
			new Vector2Double(0.9, 0.1)
			new Vector2Double(0.9, 0.9)
		
		
		
			new jadex.commons.gui.GuiCreator(CleanerGui.class, new Class[]{jadex.bdi.runtime.IBDIExternalAccess.class}, 
				new Object[]{$scope.getExternalAccess()})
		
	

	
		

		
		
			
				
				
				
			
 			
 				$beliefbase.my_chargestate > 0.2
 			
			
 				$beliefbase.my_chargestate >= 1.0
 			
		

		
		
			
				$waste
			
			
			
				ISpaceObject $waste && $waste.getType().equals("waste")
				&& $waste.position!=null
			
			
				$beliefbase.daytime
 			
			
				// $beliefbase.myself.waste==null &&
				// !$beliefbase.getBeliefSet("wastes").containsFact($goal.waste)
				
				$beliefbase.myself.waste==null &&
				!Arrays.asList($beliefbase.wastes).contains($goal.waste)
 			
			
			
				
				
					($goal.waste==$beliefbase.myself.waste || 
					$ref.waste!=$beliefbase.myself.waste &&
					$goal.waste.position!=null &&	// Hack!!! should not be required?
					$ref.waste.position!=null &&	// Hack!!! should not be required?
					$beliefbase.my_location.getDistance((IVector2)$goal.waste.position)
						.less($beliefbase.my_location.getDistance((IVector2)$ref.waste.position)))
				
			
			
		

		
		
			
				$beliefbase.daytime
 			
 		

		
		
			
				!$beliefbase.daytime
 			
 		

		

		
		
			
		

		
		
			
			
			
			
			
				//$goal.wastebin.full
				$goal.wastebin.wastes >= $goal.wastebin.capacity 
				
				// ?rparam = (parameter (parameter_has_name "wastebin") (parameter_has_value ?wastebin))
				// ?wastebin = (Wastebin (isFull() true)) 
				// ?rgoal = (goal (parameterelement_has_parameters contains ?rparam))
			
		

		
		
			
			
		

		
		
			
				
					// ISpaceObject $wastebin && $wastebin.getType().equals("wastebin") && !$wastebin.full
					// &&
					// !(ISpaceObject $wastebin2 && $wastebin2.getType().equals("wastebin") && !$wastebin2.full
					// 						  && MoveTask.isGreater($beliefbase.my_location, (IVector2)$wastebin.position, (IVector2)$wastebin2.position))
					
					ISpaceObject $wastebin && $wastebin.getType().equals("wastebin") && $wastebin.capacity > $wastebin.wastes
					&&
					!(ISpaceObject $wastebin2 && $wastebin2.getType().equals("wastebin") && $wastebin2.capacity > $wastebin2.wastes
											  && MoveTask.isGreater($beliefbase.my_location, (IVector2)$wastebin.position, (IVector2)$wastebin2.position))
				
			
		

		
		
			
				
					ISpaceObject $chargingstation && $chargingstation.getType().equals("chargingstation")
					&&
					!(ISpaceObject $chargingstation2 && $chargingstation2.getType().equals("chargingstation")
													 && MoveTask.isGreater($beliefbase.my_location, (IVector2)$chargingstation.position, (IVector2)$chargingstation2.position))
				
			
		
		
		

		
		
			
		

		
		
			
			
		

		
		

 	

	
		
		
			
			
				
			
		
		
		
		
			
			
				
				
				
			
		

		
		
			
			
				
				
			
		

		
		
			
			
				
			
		

		
		
			
 				
			
			
			
				
			
		

		
		
			
 				
			
			
			
				
			
		

		
		
			
 				
			
			
 				
			
			
			
				
			
		

		
		
			
			
				
			
		

		
		
			
				
			
			
			
				
			
			
		

		
		
			
			
				
			
		
	

	
		
		
			select one MapPoint $mp
			from $beliefbase.getBeliefSet("visited_positions").getFacts()
			order by $mp.getQuantity() desc
		

		
		
			select MapPoint $mp
			from $beliefbase.getBeliefSet("visited_positions").getFacts()
			order by $mp.getQuantity()
		

		
		
			select MapPoint $mp
			from $beliefbase.getBeliefSet("visited_positions").getFacts()
			order by $mp.getSeen()
		
	

	
		
		
		"jadex.bdi.examples.cleanerworld.cleaner.CleanerViewerPanel"
	

	
		
			
				
  				
		  		
				
			
		
	






© 2015 - 2025 Weber Informatics LLC | Privacy Policy