Download presentation

Presentation is loading. Please wait.

Published byGannon Chatfield Modified over 2 years ago

1
CompAPO: A complete version of the APO Algorithm Tal Grinshpoun and Amnon Meisels Department of Computer Science Ben-Gurion University of the Negev

2
Talk outline Distributed Constraint Satisfaction Problems The APO algorithm A flaw in APO’s correctness proof Running APO on our example Identifying the problems Solving the problems Preliminary experimental evaluation

3
The Nurses example Three Shifts: S 1 8:00 – 16:00, S 2 16:00 – 24:00, S 3 24:00 – 8:00 Three Nurses: Nurses: Anna, Bella, Clarissa Constraints: Personal: Anna can’t work between 8:00 – 9:00 Bella Can’t work between 17:00 – 20:00 Clarissa Can’t work nights System: One nurse for every shift

4
NP-complete problem, relevant for real-world problems such as timetabling, scheduling verification... Structure: [V,D,R] (Variables shifts, Domains of Values nurses, Constraints) V 1, V 2, … V n [val 1,val 2,val 3 ][val 1,val 2 ][val 1,val 2,val 3 ] Constraint Satisfaction Problem

5
Two wards in a Hospital Nurses – ward 1: Diana, Emilia, Flora ward 2: Anna, Bella, Clarissa Anna, Bella, Diana are ‘Senior’ nurses In every shift there should be at least one senior nurse S3S3 S1S1 S2S2 S3S3 S1S1 S2S2 First wardSecond ward Local Constraint Inter Constraint One senior nurse A Distributed CSP example

6
APO algorithm – overview 1. The problem is partitioned into groups 2. In each group a mediator is selected 3. Each mediator solves its local problem trying to minimize external constraints 4. Violated external constraints lead to growth of the group 5. If consistent – stop 6. Else, update the partitioning and goto 2

7
Some building blocks… p i – agent’s priority Highest priority among conflicted agents mediator m i – agents’ desire to mediate Switched on by conflicts mediate – participating in mediation session If invited, generates a wait! message good_list, agent_view – dynamic lists of relevant agents Attempts to include all externally conflicting agents!!! A very complicated algorithm…

8
A1 A5 A9 A8 A7 A3 An example A4 A2 A6

9
Violated constraint A1 A5 A9 A8 A7 A3 A2, A5, A7 and A8 Send ok? too Initialization A4 A2 A6 ok?

10
A1 A5 A9 A8 A7 A3 Attempt to mediate A4 A2 A6 Can NOT change itself – has to mediate evaluate?

11
A1 A5 A9 A8 A7 A3 Mediation by A4 A4 A2 A6 evaluate! Mediation group Mediator

12
APO correctness proof * Key point - growth of initially partitioned groups * As presented in: Roger Mailler and Victor Lesser, “Asynchronous partial overlay: A new algorithm for solving distributed constraint satisfaction problems”, JAIR, 2006. Group size (good_list) is increased Group size (good_list) is not increased Algorithm is complete Infinite looping through values may occur

13
Our example A DisCSP with 8 agents, to allow at least 2 concurrent mediations We assume finite message delays The problem to be solved – variation of a coloring problem

14
Solid lines – regular coloring constraints Dashed lines – allow all except (G,G) and (B,B) A2A1 A3 A4 A5A6 A7 A8 The example

15
Violated constraint A2A1 A3 A4 A5A6 A7 A8 ok? A4, A8 and A7 Send ok? too Initialization – configuration 1

16
Can NOT change itself – has to mediate A2A1 A3 A4 A5A6 A7 A8 evaluate? Can NOT change itself – has to mediate Attempt to mediate

17
A2A1 A3 A4 A5A6 A7 A8 evaluate! Mediation group Mediator Mediation by A1

18
Meanwhile…

19
A2A1 A3 A4 A5A6 A7 A8 evaluate? Concurrent mediation

20
A2A1 A3 A4 A5A6 A7 A8 evaluate? evaluate! wait! evaluate! Concurrent mediation

21
A2A1 A3 A4 A5A6 A7 A8 Sub-problem is consistent, no external constraints violated, so good_list of A1 is NOT expanded Special coloring constraint Mediation result

22
A2A1 A3 A4 A5A6 A7 A8 accept! Announce mediation result

23
A2A1 A3 A4 A5A6 A7 A8 ok? A3A8 A3 ok? ok? message delay

24
A2A1 A3 A4 A5A6 A7 A8 evaluate? A3A3 Remember ME? evaluate! A3A3 Concurrent mediation A8

25
A2A1 A3 A4 A5A6 A7 A8 A3A3 A3A3 Problem consistent! No external Constraints violations Concurrent mediation A8

26
A2A1 A3 A4 A5A6 A7 A8 A3A3 A3A3 accept! Assignment notification A8

27
A2A1 A3 A4 A5A6 A7 A8 Can NOT change itself – has to mediate Can NOT change itself – has to mediate All ok? messages arrive (configuration 3)

28
A2A1 A3 A4 A5A6 A7 A8 …back at configuration 1

29
Identifying the problems Partial mediation sessions good_list does not grow Failing to get a lock when the good_list is full Neighboring mediation sessions Concurrent Sequential A2A1 A3 A4 A5A6 A7 A8 evaluate! wait! evaluate! A8 A2A1 A3 A4 A5A6 A7 A8 A3

30
An aggressive approach Bumping into ongoing mediation sessions A well-coordinated approach Cancel the mediation session upon receiving a wait! message Agents are still aware of the mediator’s willingness to mediate Highest priority agent will eventually obtain a lock on all the agents in its good_list Preventing partial mediation sessions

31
Sequential mediation sessions Add to accept! messages the complete mediated solution Concurrent mediation sessions Maintain concList – list of agents that are potentially involved in a concurrent mediation session Inform the mediator post factum of conflicts created due to concurrent sessions Mediator adds the conflicting agent to its good_list good_list must grow (no partial mediation sessions) Handling neighboring mediation sessions

32
Two versions of APO APO-BB. The mediator performs a Branch and Bound search to minimize the number of violated external constraints [Mailler & Lesser 2005] APO-BT. The mediator finds the first satisfying solution [Benisch & Sadeh 2006] Setup: 15 agents, 1 variable each, 10 values. Random DisCSPs: P 1 (Density)= 0.4, P 2 (Tightness)= 0.3 – 0.9 Experimental evaluation

33
Handling neighboring mediation sessions – messages sent

34
Non-Concurrent Constraint Checks

35
Maximal mediation size

37
Thank you!

38
APO pseudo code

41
Preventing partial mediation sessions

42
Handling neighboring mediation sessions

Similar presentations

OK

Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.

Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google