Integrating a Priority-Based Scheduler of Behaviours in JADE Juan A. Suárez-Romero Amparo Alonso-Betanzos Bertha Guijarro-...
Outline <ul><li>JADE </li></ul><ul><li>Need for priorities </li></ul><ul><li>Current implementation of JADE’s scheduler </...
JADE <ul><li>Java Agent DEvelopment Framework </li></ul><ul><li>FIPA compliant </li></ul><ul><li>Agent tasks encapsulated ...
Need for priorities <ul><li>Agent that resolves requests from other agents. </li></ul><ul><ul><li>Some requests requires m...
Need for priorities <ul><li>Agent that uses its full time </li></ul><ul><ul><li>In normal time, it executes several specif...
Adding priorities to JADE <ul><li>Add priorities to  Behaviours </li></ul><ul><ul><li>Reuse of existing  Behaviours   ->  ...
Behaviours with priority <ul><li>Each  Behaviour  are encapsulated in a wrapper that adds priority </li></ul><ul><li>Wrapp...
Current implementation <ul><li>Two class of  CompositeBehaviour </li></ul><ul><ul><li>ParallelBehaviour </li></ul></ul>B 1...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Dynamic Priority Sta...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 0 B...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 0 B...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B...
ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B...
Current implementation <ul><li>Two class of  CompositeBehaviour </li></ul><ul><ul><li>ParallelBehaviour </li></ul></ul><ul...
SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>Static Priority ...
SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>B 2 1 B 1 3 B 4 1
SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>B 2 1 B 1 3
SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>B 2 1 B 1 0
Need for priorities <ul><li>Agent that resolves requests from other agents. </li></ul><ul><ul><li>Some requests requires m...
Need for priorities. Solution <ul><li>Encapsulate each new  Behaviour  inside a  ParallelPriorityBehaviour </li></ul>Liste...
Need for priorities <ul><li>Agent that uses its full time </li></ul><ul><ul><li>In normal time, it executes several specif...
Need for priorities. Solution <ul><li>Use  SequentialPriorityBehaviour  to encapsulate specific and idle tasks </li></ul>S...
Summary <ul><li>Two new priority-based scheduler Behaviours are proposed </li></ul><ul><ul><li>ParallelPriorityBehaviour <...
Integrating a Priority-Based Scheduler of Behaviours in JADE T h a n k  y o u  f o r  y o u r  a t t e n t i o n
Upcoming SlideShare
Loading in …5
×

Integrating a Priority-Based Scheduler of Behaviours in JADE

462 views
409 views

Published on

Presentation at ESAW 2006

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
462
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integrating a Priority-Based Scheduler of Behaviours in JADE

  1. 1. Integrating a Priority-Based Scheduler of Behaviours in JADE Juan A. Suárez-Romero Amparo Alonso-Betanzos Bertha Guijarro-Berdiñas Laboratory for Research and Development in Artificial Intelligence Department of Computer Science, University of A Coruña, Spain Supported under PGIDT03TIC10501PR project
  2. 2. Outline <ul><li>JADE </li></ul><ul><li>Need for priorities </li></ul><ul><li>Current implementation of JADE’s scheduler </li></ul><ul><li>Proposed implementation of priority-based scheduler </li></ul><ul><li>Examples </li></ul><ul><li>Summary </li></ul>
  3. 3. JADE <ul><li>Java Agent DEvelopment Framework </li></ul><ul><li>FIPA compliant </li></ul><ul><li>Agent tasks encapsulated in Behaviours </li></ul>. . . public void action(); public boolean done(); . . . . . . public void action(); public boolean done(); . . . . . . public void action(); public boolean done(); . . . . . . public void action (); public boolean done(); . . . . . . public void action (); public boolean done(); . . . . . . public void action (); public boolean done(); . . . . . . public void action (); public boolean done(); . . . . . . public void action (); public boolean done(); . . . . . . public void action (); public boolean done(); . . .
  4. 4. Need for priorities <ul><li>Agent that resolves requests from other agents. </li></ul><ul><ul><li>Some requests requires more attention that others </li></ul></ul>Listener
  5. 5. Need for priorities <ul><li>Agent that uses its full time </li></ul><ul><ul><li>In normal time, it executes several specific tasks </li></ul></ul><ul><ul><li>When it is idle (i.e. these tasks can not be executed) it runs other tasks of maintenance. </li></ul></ul>Specific Tasks Idle Tasks
  6. 6. Adding priorities to JADE <ul><li>Add priorities to Behaviours </li></ul><ul><ul><li>Reuse of existing Behaviours -> Wrapper </li></ul></ul><ul><li>Adding a scheduler that manages these encapsulated Behaviours </li></ul><ul><ul><li>Add a scheduler as add-on -> CompositeBehaviour </li></ul></ul>
  7. 7. Behaviours with priority <ul><li>Each Behaviour are encapsulated in a wrapper that adds priority </li></ul><ul><li>Wrapper is transparent to users </li></ul><ul><li>Priority is a number ≥0 </li></ul><ul><li>The lesser the number, the greater the priority </li></ul><ul><li>Two priorities </li></ul><ul><ul><li>Static priority: specified by user </li></ul></ul><ul><ul><li>Dynamic priority: used internally by the scheduler </li></ul></ul>
  8. 8. Current implementation <ul><li>Two class of CompositeBehaviour </li></ul><ul><ul><li>ParallelBehaviour </li></ul></ul>B 1 B 2 B 3 B 4
  9. 9. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Dynamic Priority Static Priority Ready List B 4 1 1 B 3 0 0 B 2 1 1 B 1 2 2 B 3 0 0
  10. 10. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B 2 1 1 B 1 2 2
  11. 11. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 0 B 2 1 0 B 1 2 1 B 2 1 0 B 4 1 0
  12. 12. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B 2 1 1 B 1 2 1 B 2 1 1 B 4 1 1
  13. 13. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B 2 1 1 B 1 2 1 B 2 1 1 B 4 1 1
  14. 14. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 0 B 2 1 0 B 2 1 0 B 4 1 0 B 1 2 0 B 1 2 0
  15. 15. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B 2 1 1 B 2 1 1 B 4 1 1 B 1 2 2 B 1 2 2
  16. 16. ParallelPriorityBehaviour <ul><li>Manages sub-behaviours in a parallel way using priorities </li></ul>Ready List B 4 1 1 B 2 1 1 B 2 1 1 B 4 1 1 B 1 3 3
  17. 17. Current implementation <ul><li>Two class of CompositeBehaviour </li></ul><ul><ul><li>ParallelBehaviour </li></ul></ul><ul><ul><li>SequentialBehaviour </li></ul></ul>B 1 B 2 B 3 B 4
  18. 18. SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>Static Priority B 2 1 B 3 0 B 1 3 B 4 1
  19. 19. SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>B 2 1 B 1 3 B 4 1
  20. 20. SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>B 2 1 B 1 3
  21. 21. SequentialPriorityBehaviour <ul><li>Manages sub-behaviours in a sequential way using priorities </li></ul>B 2 1 B 1 0
  22. 22. Need for priorities <ul><li>Agent that resolves requests from other agents. </li></ul><ul><ul><li>Some requests requires more attention that others </li></ul></ul>Listener
  23. 23. Need for priorities. Solution <ul><li>Encapsulate each new Behaviour inside a ParallelPriorityBehaviour </li></ul>Listener 1 P 1 P 3 P 2 P 4
  24. 24. Need for priorities <ul><li>Agent that uses its full time </li></ul><ul><ul><li>In normal time, it executes several specific tasks </li></ul></ul><ul><ul><li>When it is idle (i.e. these tasks can not be executed) it runs other tasks of maintenance. </li></ul></ul>Specific Tasks Idle Tasks
  25. 25. Need for priorities. Solution <ul><li>Use SequentialPriorityBehaviour to encapsulate specific and idle tasks </li></ul>SequentialPriorityBehaviour ParallelBehaviour [1] ParallelBehaviour [2] Specific Task 1 Specific Task 2 Specific Task 3 Idle Task 1 Idle Task 2 Idle Task 3
  26. 26. Summary <ul><li>Two new priority-based scheduler Behaviours are proposed </li></ul><ul><ul><li>ParallelPriorityBehaviour </li></ul></ul><ul><ul><li>SequentialPriorityBehaviour </li></ul></ul><ul><li>They are able to run as the current scheduler implementations </li></ul><ul><li>The use of priorities penalizes the performance of the scheduler </li></ul>
  27. 27. Integrating a Priority-Based Scheduler of Behaviours in JADE T h a n k y o u f o r y o u r a t t e n t i o n

×