RT-BDI: A Real-Time BDI model

DavideCalvaresi 170 views 43 slides Oct 27, 2020
Slide 1
Slide 1 of 73
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73

About This Presentation

Currently, distributed cyber-physical systems (CPS) rely upon embedded real-time systems, which can guarantee compliance with time constraints. CPS are increasingly required to act and interact with one another in dynamic environments. In the last decades, the Belief-Desire-Intention (BDI) architect...


Slide Content

[1] [email protected], University of Trento, Trento, Italy
[2] [email protected], University of Trento, Trento, Italy
[3] [email protected], Sant’Anna School of Advanced Studies, Pisa, Italy
[4] [email protected], University of Applied Sciences and Arts of Western Switzerland, Sierre, Switzerland
RT-BDI: A Real-Time BDI model
18th International Conference on Practical Applications of Agents
and Multi-Agent Systems
Francesco Alzetta
[1], Paolo Giorgini
[2], Mauro Marinoni
[3], Davide Calvaresi
[4]

/21
Motivations
•Traffic management (air and ground)
•UAVs
•Swarm robotics
•Manufacturing
•E-healthcare
02

/21
Motivations
•Traffic management (air and ground)
•UAVs
•Swarm robotics
•Manufacturing
•E-healthcare
•Realtime systems
•Highly dynamic environments
02

/21
The approach
State-of-art approach
03
Hybrid control architecture

/21
The approach
State-of-art approach
03
Hybrid control architecture LAAS architecture (Alami et al., 1998)

/21
The approach
State-of-art approach
03
Hybrid control architecture LAAS architecture (Alami et al., 1998) SIMBA architecture (Julian et al., 2002)

/21
The approach
The proposed approach
04
Integrated architecture

/21
The approach
The proposed approach
04
ARTS execution cycle (Vikhorev et al., 2009)
Integrated architecture

/21
The approach
The proposed approach
05
Integrated architecture

/21
The approach
The proposed approach
05
Integrated architecture
real-time

/21
The approach
The proposed approach
05
Integrated architecture
real-time

/21
The approach
The proposed approach
05
Integrated architecture
real-time

/21
The approach
The proposed approach
05
Integrated architecture
real-time

/21
RT-BDI model
06
a = { B, D, P, ϕA, ϕI }

/21
RT-BDI model
06
a = { B, D, P, ϕA, ϕI }

/21
RT-BDI model
06
a = { B, D, P, ϕA, ϕI }

/21
RT-BDI model
06
a = { B, D, P, ϕA, ϕI }

/21
RT-BDI model
06
a = { B, D, P, ϕA, ϕI }

/21
RT-BDI model
06
a = { B, D, P, ϕA, ϕI }

/21
RT-BDI model
07

/21
RT-BDI model
07
B = { b1, … , bn }, where b = { p(t1, … , tk) }

/21
RT-BDI model
07
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
•b = b ∈ B ∪ B
•prec = ∧β∈ B U B β
•pr = [0, 1]

/21
RT-BDI model
07
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
•d ∈ D
•pref = [0, 1]
•prec = ∧β∈ B U B β
•cont = ∧β∈ B U B β
•body = { α 1, … , α n }, α ∈ {internal goal, RT task}

/21
RT-BDI model
Action
08

/21
RT-BDI model
Action
body = { α 1, … , α n }, α ∈ {internal goal, RT task}
08

/21
RT-BDI model
Action
body = { α 1, … , α n }, α ∈ {internal goal, RT task}
When selected by the agent, a desire d becomes a goal. 
08

/21
RT-BDI model
Action
body = { α 1, … , α n }, α ∈ {internal goal, RT task}
When selected by the agent, a desire d becomes a goal. 
•external goals => desires activated by a triggering event

◦e.g., a change in the belief-set or a request made by another agent

08

/21
RT-BDI model
Action
body = { α 1, … , α n }, α ∈ {internal goal, RT task}
When selected by the agent, a desire d becomes a goal. 
•external goals => desires activated by a triggering event

◦e.g., a change in the belief-set or a request made by another agent

•internal goals => desires activated by an intention

◦requires the instantiation of a sub-plan

◦are not subject to preconditions
08

/21
RT-BDI model
Action
body = { α 1, … , α n }, α ∈ {internal goal, RT task}
A RT task can either be periodic or aperiodic.
•periodic tasks => a (potentially infinite) sequence of regular activations 








•aperiodic tasks => their activations are irregularly interleaved
9

/21
RT-BDI model
10
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }

/21
RT-BDI model
10
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P

/21
RT-BDI model
About intentions
•Task-level reasoning
•Intentions carried on “simultaneously”
•still guaranteeing the respect of real-time constraints
11

/21
RT-BDI model
About intentions
•still guaranteeing the respect of real-time constraints
•How?
•Schedulability analysis
•We exploited the Earliest Deadline First schedulability analysis
12

/21
RT-BDI model
Earliest Deadline First schedulability analysis
•Every periodic task is characterised by a computational time C and a period T
•A set of periodic tasks is schedulable with EDF i(#
•Bandwidth reservation mechanism to deal with aperiodic tasks
•Constant Bandwidth Server (CBS) mechanism
•A CBS is a periodic task
•Is characterized by a budget Q and a period T
•The budget is made available to the aperiodic tasks assigned to that server
13

/21
RT-BDI model
About intentions
•If the agent’s scheduler uses EDF, then C3/T3 + C11/T11 + C1/T1 + C1/T1 ≤ 1
•n
•Intentions’ interleaving cannot exceed the threshold
14

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1
=> max C/T = 0.375 + 0.25 + 0.1 = 0.725

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1
=> max C/T = 0.375 + 0.25 + 0.1 = 0.725

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1
=> max C/T = 0.375 + 0.25 + 0.1 = 0.725
max C/T(I4) = max (0.1, 0.4, 0.18, 0.4, 0.25) = 0.4

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1
=> max C/T = 0.375 + 0.25 + 0.1 = 0.725
max C/T(I4) = max (0.1, 0.4, 0.18, 0.4, 0.25) = 0.4

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1
=> max C/T = 0.375 + 0.25 + 0.1 = 0.725
max C/T(I4) = max (0.1, 0.4, 0.18, 0.4, 0.25) = 0.4
0.725 + 0.4 > 1

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
15
max C/T(I1) = max (0.2, 0.13, 0.1, 0.375) = 0.375
max C/T(I2) = max (0.2, 0.17, 0.18, 0.25, 0.2) = 0.25
max C/T(I3) = max (0.1) = 0.1
=> max C/T = 0.375 + 0.25 + 0.1 = 0.725
max C/T(I4) = max (0.1, 0.4, 0.18, 0.4, 0.25) = 0.4
0.725 + 0.4 > 1

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
16

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
16
•Pessimistic approach, but

/21
RT-BDI model
About intentions
•Intentions’ interleaving cannot exceed the threshold
=> worst case among all the tasks belonging to the intention
16
•Pessimistic approach, but
•It guarantees robustness against any deadline miss

/21
RT-BDI model
17
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P
ϕA definition

/21
RT-BDI model
17
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P
1.Try to schedule (commit to) an applicable plan for each active goal.

ϕA definition

/21
RT-BDI model
17
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P
1.Try to schedule (commit to) an applicable plan for each active goal.

2.If (1) is not possible, drop the plans for the goals having less priority.

ϕA definition

/21
RT-BDI model
17
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P
1.Try to schedule (commit to) an applicable plan for each active goal.

2.If (1) is not possible, drop the plans for the goals having less priority.

3.Among plans for goals with same priority, prioritize those that are most preferred by the agent.
ϕA definition

/21
RT-BDI model
18
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P

/21
RT-BDI model
18
B = { b1, … , bn }, where b = { p(t1, … , tk) }
D = { d1, … , dn }, where d = { b, prec, pr }
P = { p1, … , pn }, where p = { d, pref, prec, cont,body }
ϕA : B x G → P
ϕI : I → I
EDF scheduling algorithm

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 3

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6 1

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6 12

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6 1 32

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6 1 4 32

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6 1 4 32 5

/21
RT-BDI model
19
First-Come-First-Served
Task activation comparison
Round robin Earliest Deadline First
1 2 3 1 2 34 5 6 1 4 32 5 6

/21
Future work
•A more accurate evaluation of the intentions
•An intention could maybe have been scheduled with the right interleaving
•RT constraints met at the goal level
•To allow desires such as “accomplish a goal g in at maximum t time”
•Extension of the model from single to multi-agent settings.
20

/21
Conclusion
•Integration of RT mechanisms into the BDI reasoning cycle
•RT scheduler involved in two distinct phases:
•schedulability analysis to establish the feasibility of intentions
•scheduling algorithm providing the execution order of the tasks
=> Agent able to evaluate if a potential intention can be executed without
impacting on the temporal guarantees of the other active intentions.
21

Thank you