It gets the information of number of tasks and the softwares required and puts it into a HashMap softwareTaskMap. In case, the number of tasks is more than the available resources that can perform the task, the system gets ready for a multiple execution.
4.1.3.3.4 Broadcasting the tasks
The tasks are then broadcasted to those resources which has the necessary software installed. If there are no resources available or resources do not have the required software installed, the behaviour notifies the user via GUI.
After broadcasting the tasks, the allocateBehaviour is started.
4.1.3.4 Allocate Behaviour
This behaviour is responsible for the actual allocation of the task. …show more content…
This is where the coalition formation in cooperative game theory is implemented. The allocateBehaviour extends jade.core.behaviours.SimpleBehaviour. After broadcasting the task information to the resources, the ResourceAgents in each resource evaluates the tasks and predicts the performance required for the tasks. This information is sent back to the coordination agent and is received by the allocateBehaviour.
After receiving the performance indices of all the tasks, the information is stored in a hashMap. This hash map contains the performance information corresponding to each task. This is done by the method addValues(Integer, Performance).
Next the performance indices of each task is added. The sum corresponding to each task is put to another HashMap . After getting the sum, the map is sorted in ascending order based on the sum value. The sorted values are put into another map hashMapSorted .
The available resources are for each task is put into another map availResMap.
This map at the end of location contains the resources and the allocated tasks to each resources.
After fetching all the information, the actual allocation algorithm is performed here. Finally the allocated tasks are send to the corresponding resources.
4.1.4 AMS.Calculation Agent
This agent is already implemented in the GekoProAg project. For the prototype implementation, a simple agent which has one behaviour is created. The class diagram of this package can be seen below in Figure 19.
4.1.4.3 StartCalculate Behaviour
This behaviour should be calculating the received tasks and informs the ResourceAgent about the results.
4.1.5 GekoProAg_Gui (Graphical User Interface)
This GUI helps the user to initialize the system, and also input the tasks to the coordination agent as shown in the figure below.
As the GekoProAg prototype is put to run, the main(String) method in the GekoProAg_Gui.class is invoked. The main function sets the GUI to visible state.
4.1.5.3 Elements of the Graphical User Interface
The following entries shows the functionality of the GUI.
• Result Log area: This is a text field where the log or the results of the system is printed so that user is able to know the status of the
system.