A SCHEDULING TECHNIQUE OF PLANS WITH PROBABILITY
AND TEMPORAL CONSTRAINTS
Bassam Baki and Maroua Bouzid
GREYC
University of Caen
Bd Marchal Juin
14032 Caen Cedex
Keywords:
Decision support systems, Temporal Constraint Reasoning, Planning, AND/OR Graph and probability.
Abstract:
In this paper, we address the problem of scheduling plans with probability and temporal constraints. We
illustrate our problem with an AND/OR graph, where we try to find a plan of tasks that satisfies all temporal
constraints and precedence relations between tasks, has a high probability of execution, a minimal cost and a
reduced time. Each task has a set of temporal constraints, a set of probabilities and a set of constant costs. Our
planner uses the temporal constraint propagation technique to simplify the resolution of a given problem.
We describe one approach to deal with a problem that has paid a little attention of planing community. This
problem is to combine temporal and probabilistic planning.
1 INTRODUCTION
While today’s planners can handle large problems
with durative actions and time constraints, few re-
searches have considered the problem concerning un-
certainty and the different durations of actions. For
example, IxTeT ((Ghallab and Laruelle, 1994), (La-
borie and Ghallab, 1995)) is a time-map manager that
handles symbolic constraints (precedence), numeric
constraints (intervals) and sharable resources. This
planner provides an initial complete plan which is
then run by temporal executive following a cycle: in-
tegrate external messages, repair the plan if needed,
decide which actions to execute. Other planners,
like “C-Buridan” ((Draper et al., 1994), (Kushmer-
ick et al., 1994)) deal with probabilistic information-
producing actions and contingent execution. their al-
gorithm is sound and complete but they do not con-
sider any kind of constraints between tasks. Their so-
lutions are satisfying rather than optimal.
Many existing works have been developed on tem-
poral planning or probabilistic planning but little at-
tention has been paid to the combination of these two
planning techniques.
In this paper, we address the problem of scheduling
plans with probability and temporal constraints. We
illustrate our problem with an AND/OR graph, where
we try to find a plan of tasks that satisfies all temporal
constraints and precedence relations between tasks,
has a high probability of execution, a minimal cost
and a reduced time.
This problem consists in finding a set of tasks to
be executed respecting all temporal constraints and
precedence relations between tasks. By temporal con-
straints we mean the start times, the end times and
possible execution durations of tasks. By precedence
relation we mean the order of execution of tasks and
the delays between tasks. Our planner uses the tem-
poral constraint propagation technique (Bresina and
Washington, 2000) to simplify the resolution of a
given problem. Practically, that can consist in with-
drawing the values which do not belong to any solu-
tion. This filtering avoids many attempts at resolution
which are likely to fail.
In the following, we consider that an agent is con-
cerned with achieving a set of tasks connected to-
gether in a network that forms an acyclic directed
AND/OR graph where nodes are tasks and edges cor-
respond to precedence relations. Given a set of tasks,
a start time, an end time, a set of durations, a set of
probabilities and a set of constant costs for each task,
a time delay and a precedence relation between tasks,
our approach allows the agent to determine the set of
tasks to be executed. The goal will be achieved and
all temporal and precedence constraints will be satis-
fied in order to guarantee a correct execution.
A plan leading to the achievement of the desired goals
and satisfying temporal constraints would be consid-
77
Baki B. and Bouzid M. (2005).
A SCHEDULING TECHNIQUE OF PLANS WITH PROBABILITY AND TEMPORAL CONSTRAINTS.
In Proceedings of the Second International Conference on Informatics in Control, Automation and Robotics, pages 77-84
DOI: 10.5220/0001169300770084
Copyright
c
SciTePress
ered as admissible. From all admissible plans, we se-
lect the one with the minimal expected utility to be
executed.
The paper is organized as follows: in Section 2,
we describe some basic temporal concepts concern-
ing the knowledge of an agent, tasks and the repre-
sentation of a temporal precedence graph. In Sec-
tion 3 we formulate our problem; then in Section 4
we describe a temporal constraint propagation algo-
rithm. Section 5 shows how to calculate probabilities
of intervals of tasks, and in Section 6 we select the
admissible plan which has the minimal expected util-
ity. Finally, we present some analysis and experiment
results in section 8 and we conclude in Section 9.
2 FORMAL FRAMEWORK
In this section, we describe the notion of a task and
a temporal precedence graph of tasks that we use
throughout the rest of the paper.
2.1 Task Description
The goal of the agent is to choose a subset of exe-
cuting tasks to convert some initial states into some
desired goals.
Definition 1 We call a task, the action realized by
an agent throughout a duration of time. For a task
t, one associates the list < (I
t
, I
+
t
,
t
, P r
t
, C
t
) >,
where :
I
t
is the earliest start time, i.e., the earliest time at
which the execution of the task can start;
I
+
t
is the latest end time, i.e., the time at which the
execution of the task must finish;
[I
t
, I
+
t
] is the time window referring to absolute
time during which task t can be executed;
t
= {d
1
t
, d
2
t
, ..., d
m
t
} is a set of possible durations
of time such that d
i
t
(i = 1...m), is a period of
time necessary to accomplish the task t;
P r
t
= {pr
1
t
, pr
2
t
, ..., p r
m
t
} is a set of probabilities
such that pr
i
t
(0 pr
i
t
1 and i = 1...m) is
the probability to execute t during d
i
t
t
;
C
t
= {c
1
t
, c
2
t
, ..., c
m
t
} is a set of costs payed to ac-
complish the task t such that c
i
t
(i = 1...m) is
the cost to execute t during d
i
t
t
.
In this framework, we shall consider a task to be an
atomic activity which can be undertaken and accom-
plished in whole. No medium states are taken into
account - either the task is successfully accomplished
or it fails.
2.2 Precedence Constraints
In real world, The execution of task depends on cer-
tain conditions like the time, the resources and/or the
execution of other tasks. In this last case, we talk
about precedence constraints in the form of partial or-
der of a set of tasks. In this paper, We distinguish
between two kinds of precedence constraints :
1. Conjunctive Precedence Constraint: let
{t
1
, t
2
, . . . , t
k
} be tasks. There is a conjunc-
tive precedence constraint between t and the set of
tasks {t
1
, t
2
, . . . , t
k
}, denoted [t
1
, t
2
, . . . , t
k
] t,
if t can be executed only if all tasks t
1
, t
2
, . . . , t
k
have already been executed.
2. Disjunctive Precedence Constraint: let
{t
1
, t
2
, . . . , t
k
} be tasks. There is a disjunc-
tive precedence constraint between t and the set of
tasks t
1
, t
2
, . . . , t
k
, noted t
1
|t
2
| . . . |t
k
t, if t can
be executed if at least one of tasks t
1
, t
2
, . . . , t
k
is
executed.
A special case is when t has a unique predeces-
sor (t
t), in this situation we talk about simple
precedence constraint.
Note also that, it is often the case that after execut-
ing the preceding task one should wait for some time
before the execution of the following task becomes
possible. We shall call δ
t
i
,t
j
the time delay between
tasks t
i
and t
j
.
2.3 Temporal Precedence Graph
The goal of the agent is to execute a subset of tasks
represented by an acyclic temporal graph where nodes
represent tasks (described in 2.1) and arcs repre-
sent precedence constraints between tasks (described
in 2.2). More formally :
Definition 2 Let T be a set of tasks as described
in 2.1, E be a set of conjunctive and disjunctive
precedence constraints such that E = {c|c =
[t
1
, t
2
, . . . , t
k
] t or c = t
1
|t
2
| . . . |t
k
t where
t
1
, t
2
, . . . , t
k
T } and D be a set of delay con-
straints such that D = {δ
t
i
,t
j
|δ
t
i
,t
j
, t
i
, t
j
T and an arc from t
i
to t
j
}, a temporal prece-
dence graph is an acyclic oriented graph noted G =
(T, E, D) where nodes are elements of T and arcs are
elements of E.
Note that, nodes of the set T of any temporal prece-
dence graph G can be divided into three disjoint sets
T = T
I
T
M
T
F
of tasks having no preceding
tasks, intermediate tasks having preceding tasks and
being predecessors for other tasks and final tasks be-
ing no predecessors.
Figure 1 represents a temporal precedence graph G =
(T, E, D), where T = {t
1
, ..., t
18
}, E represents the
ICINCO 2005 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
78
Figure 1: A temporal precedence graph of tasks
precedence constraints between tasks and D repre-
sents delay between tasks. We represent conjunctive
precedence constraints by arcs.
3 STATING THE PROBLEM
Given a temporal precedence graph of tasks G =
(T, E, D) where T is a set of temporal tasks as de-
scribed in 2.1, E represents conjunctive and disjunc-
tive precedence constraints as described in 2.3 and D
is a set of delay between tasks, the problem to be
solved is to find a single plan of executable tasks in
T so that some goals which are of interest are satis-
fied. In fact a plan is specified by a partial order of
tasks. More formally :
Definition 3 A temporal plan generation problem is
a couple (G, T
) where G = (T, E, D) is a temporal
precedence graph of tasks and T
T
F
T is a
subset of final tasks in T .
The plan should satisfy all the constraints i.e.
AND/OR graph, precedence and temporal con-
straints. We are interested in finding a plan that has a
high probability to be executed during a reduced time
and with a reduced cost. To do that, we proceed in
four stages:
1. Determining of Feasible Plans. A feasible plan is
a subgraph of the initial graph G where constraints
are conjunctive or simple. This subgraph represents
path in the graph starting by initial tasks and ending
by goal tasks. We use both depth-first and back-
wards search methods to find all feasible plans. T
G
being the set of all goal tasks and T
I
the set of all
initial tasks, we start with the goal tasks to be ac-
complished, and we finish when all tasks in T
I
are
accomplished.
For example, consider the problem given by T
G
=
{t
18
} and T
I
= {t
2
} for the graph given in
Figure 1. Feasible plans, marked with a bold
line, are [{[t
2
, t
7
], [t
1
, t
6
]}, t
10
, t
14
, t
15
, t
18
] and
[{[t
2
, t
7
], [t
1
, t
6
]}, t
10
, t
16
, t
18
].
2. Determining of Admissible Plans. We call admis-
sible plan, a feasible plan where all temporal con-
straints of tasks and constraints between tasks are
satisfied.
3. Selection of The Most Likely Temporal Plan.
This step selects from all admissible plans, the best
likely one to be executed. This last must have a
high probability of execution and reduced cost and
time.
4. Selection of The Most Likely Temporal Schedul-
ing. This step selects from all scheduling of the
selected admissible plan, the one with the minimal
total expected utility.
We denote by P
F
the set of all feasible plans in tem-
poral precedence graph G and by T (P) the subset of
T of all the tasks occurring in the feasible plan P.
In the next section we present the propagation al-
gorithm of intervals execution allowing to determine
from the feasible plan set, the set of admissible plans.
4 CONSTRAINT PROPAGATION
ALGORITHM
Given a temporal plan generation problem (G, T
)
where G is a temporal precedence graph and T
is
a subset of final tasks, we determine for each task in
each feasible plan the set of temporal intervals during
which a task can be executed by propagating temporal
constraints through the graph. Recall that a feasible
plan is a subgraph where constraints are conjunctive
or simple.
This propagation organizes the graph into levels so
that: l
0
is the level containing initial tasks (T
I
), l
1
contains all nodes that are constrained only by ini-
tial tasks, l
i
contains all nodes whose predecessors in-
clude nodes at level l
i1
. For each node in any given
level l
i
, we compute all its possible execution inter-
vals from its predecessors.
Given a task t, we call s
t
(respectively e
t
) a possi-
ble start time of t (respectively a possible end time of
t), S
t
(respectively E
t
) the set of possible start times
of t (respectively the set of possible end times of t)
and I
t
the set of all possible execution intervals of
the t. A possible execution interval is formed by a
possible start time and a possible end time. I
t
=
{I
1
t
, I
2
t
, ..., I
m
t
} where I
i
t
= [s
i
t
, e
i
t
] is the possible ex-
ecution interval to task t taking its duration d
i
t
t
.
In the next section, we describe the algorithm used to
calculate the execution intervals of each task in each
feasible plan P.
A SCHEDULING TECHNIQUE OF PLANS WITH PROBABILITY AND TEMPORAL CONSTRAINTS
79
4.1 Execution Intervals of Tasks
Given a task t belongs a feasible plan P (t T (P))
where
t
= {d
1
t
, d
2
t
, ..., d
m
t
} is its set of durations,
I
t
is its earliest start time and I
+
t
is its latest end time,
the possible times for starting and ending execution of
t are calculated as follows :
level l
0
: t
i
T
I
(t
i
is an initial task) : Suppose that
the agent can begin its execution at a given time
noted start
time.
S
t
= {s
t
|s
t
= max(I
t
, start
time)}
For i = 1 to i = m where m is the number of
possible execution durations of task t
E
t
= {e
i
t
|e
i
t
= s
t
+ d
i
t
}
I
t
= {I
i
t
= [s
t
, e
i
t
] where i = 1..m}. I
i
t
is a
possible execution interval to task t.
level l
i
: for each task in level l
i
, its possible start
times are computed as all the times at which the
predecessor tasks can finish. Thus we define the
set of possible start and end times of each task at
level l
i
as follows :
1. If t T
M
T
F
where
t
= {d
1
t
, d
2
t
, ..., d
m
t
}
is the set of execution durations of t and t has a
unique task predecessor t
(t
t) where E
t
=
{e
1
t
, ..., e
p
t
} then :
(a) Determine the set S
t
(initialized to ) like that :
For i = 1 to i = p (p is the number of possible
execution end times of task t
)
S
t
= S
t
{s
i
t
= max(I
t
, e
i
t
+ δ
t
,t
)}
(b) Determine the set E
t
(initialized to ) like that :
For i = 1 to i = p
For j = 1 to j = m
E
t
= E
t
{e
ij
t
= s
i
t
+ d
j
t
}
We call I
ij
t
= [s
j
t
, e
ij
t
] a possible execution in-
terval of t where s
j
t
S
t
and e
ij
t
E
t
.
2. If t T
M
T
F
where
t
= {d
1
t
, d
2
t
, ..., d
m
t
}
is the set of execution durations of t which has
a set of direct task predecessors {t
1
, t
2
, . . . , t
n
}
([t
1
, t
2
, . . . , t
n
] t) and if for each task t
i
(i =
1..n), E
t
i
= {e
1
t
i
, e
2
t
i
, ..., e
j
i
t
i
} then :
(a) Determine the set S
t
(initialized to ) of possi-
ble execution start times of t like that :
For each task t
i
For k = 1 to k = j
i
S
t
= S
t
{s
k
t
= max(I
t
, max(e
k
t
i
+
δ
t
i
,t
))}
(b) Determine the set E
t
(initialized ) of possible
execution end time of task t like that :
For k = 1 to k = p (p represents the cardinal-
ity of the set S
t
calculated in 2a)
For r = 1 to r = m (m is the number of
possible execution durations of task t)
E
t
= E
t
{e
kr
t
= s
k
t
+ d
r
t
}
We call I
kr
t
= [s
k
t
, e
kr
t
] a possible execution inter-
val of t where s
k
t
S
t
and e
kr
t
E
t
.
4.2 Admissibility of Plans
A feasible plan P P
F
, in order to become an ad-
missible one, must satisfy all the temporal constraints.
More formally, for any task t T (P), for each
e
i
t
E
t
, the following condition : e
i
t
I
+
t
must hold.
If a possible end time of E
t
exceeds I
+
t
, we consider
that execution interval I
i
t
= [s
i
t
, e
i
t
] is not valid. In the
other hand, if all possible end times of E
t
exceed I
+
t
,
we consider that task t is not able to execute. Thus
we consider the plan which contains such task is not
admissible.
We denote by P
A
the set of all admissible plans P.
We have P
A
=
S
P, where P is an admissible plan.
5 PROBABILISTIC TEMPORAL
PROPAGATION
We describe in this section how we can weight each of
those intervals calculated as above, with a probability.
This probabilistic weight allows us to know the prob-
ability for a task to be executed during a given interval
of time. For that, a probability propagation algorithm
among the graph of tasks is described using for each
node its execution time probability and the end-time
probabilities of its predecessors.
The probability of a possible execution interval I
i
t
de-
pends on its start time (the end time of the previous
tasks) and the probability of execution time pr
i
t
. To
simplify, we consider in the rest of this paper, that no
time delay between tasks.
In the next section, we compute the probability that
the execution for a task t to occur during an interval
I
i
t
where s
i
t
is a possible start time and e
i
t
is a possible
end time of task t.
5.1 Probability Propagation
Algorithm
Before a task t can start its execution, all its direct
predecessors must be finished. The probability for the
execution of t start at s
i
t
is defined by :
1. If t has an only direct predecessor t
(t
t) in the
admissible plan P where E
t
= {e
1
t
, ..., e
p
t
} and
S
t
= {s
1
t
, s
2
t
, ..., s
m
t
} is the set of possible execu-
tion start time of task t then :
The probability that task t starts its execution at
s
i
t
when its predecessor t
finishes its execution
at e
j
t
, noted pr
start
(s
i
t
|e
j
t
), is calculated as fol-
lowing :
ICINCO 2005 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
80
For i = 1 to i = m do
For j = 1 to j = p do
If s
i
t
< e
j
t
then pr
start
(s
i
t
|e
j
t
) = 0
If s
i
t
e
j
t
then pr
start
(s
i
t
|e
j
t
) = 1
2. If t has a set of direct predecessors {t
1
, t
2
, . . . , t
n
}
in the admissible plan P i.e. [t
1
, t
2
, . . . , t
n
]
t then let t
i
{t
1
, t
2
, . . . , t
n
} where E
t
i
=
{e
1
t
i
, e
2
t
i
, . . . , e
j
i
t
i
} such that j
i
represents the num-
ber of possible end times of task t
i
and let S
t
=
{s
1
t
, s
2
t
, ..., s
m
t
} be the set of possible start times of
t then :
The probability that task t starts its execution at
s
r
t
(r = 1...m) when each direct predecessor
t
i
{t
1
, t
2
, . . . , t
n
} of t finishes its execution
at e
k
t
i
(k = 1..j
i
) is calculated as following :
If s
r
t
< max{e
k
t
i
} then pr
start
(s
r
t
|e
k
t
i
) = 0
If s
r
t
max{e
k
t
i
} then pr
start
(s
r
t
|e
k
t
i
) = 1
A special case has to be considered for the first tasks.
Indeed, these initial tasks ( T
I
) have no predeces-
sors, the probability of starting the execution of an
initial task t at s
t
is given by : pr
start
(s
t
) = 1.
5.2 Execution Intervals Probability
In this section, we describe the method used to calcu-
late the execution intervals probability which depends
on execution durations and execution start times.
Let pr
t
(d
i
t
|s
i
t
) be the probability that the execution of
task t takes d
i
t
units of time when it starts at s
i
t
.
The probability of an execution interval I
i
t
of task t
that has an only direct predecessor t
is the probability
P r
w
(I
i
t
|e
j
t
) that interval I
i
t
= [s
i
t
, e
i
t
] is the interval
during which a task t is executed, if the predecessor
task ends at e
j
t
. This probability measures the proba-
bility that a task t starts its execution at s
i
t
and ends at
e
i
t
. It is defined as following :
P r
w
(I
i
t
|e
j
t
) = pr
start
(s
i
t
|e
j
t
) pr
t
(d
i
t
|s
i
t
)
where e
j
t
is the end time of the last executed task.
Indeed, a task t can start its execution only when its
predecessor t
finishes. That is why the probability
of execution interval depends on the predecessor end
time.
In the case where t, such that
t
=
{d
1
t
, d
2
t
, ..., d
m
t
}, has a set of direct predecessors
{t
1
, t
2
, . . . , t
n
}, where t
i
{t
1
, t
2
, . . . , t
n
}, ends its
execution at e
k
t
i
t
i
(k
t
i
= 1..j
i
s.t. j
i
represents the
number of possible execution end times of task t
i
),
we have :
P r
w
(I
r
t
|e
k
t
i
t
i
) = pr
start
(s
r
t
|e
k
t
i
t
i
) pr
t
(d
r
t
|s
r
t
)
where r = 1..m.
A special case has to be considered for the first task.
The probability that an initial task t executes in the
interval I
r
t
is equal to the probability that it starts its
execution at s
t
and takes d
r
t
units of time. More for-
mally :
P r
w
(I
r
t
) = pr
start
(s
t
) pr
t
(d
r
t
|s
t
)
For example, suppose 0.7 is the probability for the
execution of task t that has an only direct predeces-
sor t
, to take 2 units of time when it starts at 5
(P r
t
(d
i
t
= 2|s
i
t
= 5) = 0.7). We assume that the end
execution of the predecessor task t
is 3. The proba-
bility of the interval [5, 7] is :
P r
w
(I
i
t
= [5, 7]|e
j
t
= 3) = 1 × 0.7 = 0.7
If for example task t
ends its execution at 7, we ob-
tain :
P r
w
(I
i
t
= [5, 7]|e
j
t
= 7) = 0 × 0.7 = 0
6 SELECTION OF THE MOST
LIKELY ADMISSIBLE PLAN
As the order of searching for plans is arbitrary, the
search may produce several admissible plans. In this
case, further criteria will be applied (Probability, cost
and time) to analyze and compare them so as to select
one to be executed. In this section we describe the
method we use to choose the most likely admissible
plan to be executed.
We are interested in finding a unique execution plan
that has a high probability and reduced cost and time.
To do that, we calculate expected utilities of cost and
time of all tasks. Then, we calculate the expected util-
ity of tasks of each admissible plan, finally we select
the one with the smallest expected utility to be the
most likely plan to be executed. We detail this as-
sumption in the next section.
6.1 Expected Utilities of Cost and
Time of Tasks
For each task in an admissible plan P, we calculate its
expected utility of cost and time. The expected utility
of cost is calculated in function of costs associated
of execution durations and of execution probabilities
associated of execution intervals (calculated in 5.2).
The expected utility of time is calculated in func-
tion of possible execution durations and of execution
probabilities associated of execution intervals (calcu-
lated in 5.2). More formally :
Let t, where
t
= {d
1
t
, d
2
t
, ..., d
m
t
} is the set of
possible durations of t, C
t
= {c
1
t
, c
2
t
, ..., c
m
t
} is the
set of execution costs of t where c
k
t
is the cost to ac-
complish t taking duration d
k
t
(k = 1..m).
A SCHEDULING TECHNIQUE OF PLANS WITH PROBABILITY AND TEMPORAL CONSTRAINTS
81
1. If t has an only direct predecessor t
such that
E
t
= {e
1
t
, e
2
t
, . . . , e
r
t
} is its set of possible ex-
ecution end times, and if the probability of t to be
executed in duration d
k
t
where its predecessor t
has
finished its execution at e
j
t
is noted P r
w
(I
k
t
|e
j
t
)
(section 5.2), then :
Expected Utility of cost of t is calculated as fol-
lowing :
µ(cost(t|t
)) =
r
X
j=1
m
X
k=1
P r
w
(I
k
t
|e
j
t
) c
k
t
To simplify, we denote µ(cost(t|t
)) by
µ(cost(t)).
Expected Utility of time of t is calculated as fol-
lowing :
µ(time(t|t
)) =
r
X
j=1
m
X
k=1
P r
w
(I
k
t
|e
j
t
) d
k
t
To simplify, we denote µ(time(t|t
)) by
µ(time(t)).
2. If t has a set of direct predecessor t
1
, t
2
, . . . , t
n
then, let E
t
i
= {e
1
t
i
, e
2
t
i
, . . . , e
r
t
i
t
i
} be the
set of possible execution end times of t
i
{t
1
, t
2
, . . . , t
n
} then :
Expected Utility of cost of t is calculated as fol-
lowing :
µ(cost(t|t
1
, . . . , t
n
)) =
n
X
i=1
µ(cost(t|t
i
))
To simplify, we denote µ(cost(t|t|t
1
, . . . , t
n
))
by µ(cost(t)).
Expected Utility of time of t is calculated as fol-
lowing :
µ(time(t|t
1
, . . . , t
n
)) =
n
X
i=1
µ(time(t|t
i
))
To simplify, we denote µ(time(t|t
1
, . . . , t
n
)) by
µ(time(t)).
In the next section, we calculate the total expected
utility of each admissible plan P.
6.2 Expected Utility of Plans
The expected utility of a plan P is calculated in func-
tion of expected utilities of cost and time (calculated
above).
The total expected utility of cost of a plan P is cal-
culated by adding all expected utilities of cost of all
tasks in this plan. More formally :
µ(cost(P)) =
n
X
i=1
µ(cost(t
i
))
where n is the number of tasks in P.
The total expected utility of time of a plan P is calcu-
lated as following:
µ(time(P)) is initialized to max(µ(time(t
i
)))
where t
i
T
F
If t has an only direct predecessor t
with
expected utility µ(time(t
)), then we add
µ(time(t
)) to the total expected utility of time
of the plan. More formally :
µ(time(P)) = µ(time(P)) + µ(time(t
))
If t has a set of direct predecessors
{t
1
, t
2
, . . . , t
n
} then, we add the maximum
of expected utilities of tasks t
1
, t
2
, . . . , t
n
to the
total expected utility of time of the plan. More
formally :
µ(time(P)) = µ(time(P))+max
n
i=1
µ(time(t
i
))
To calculate the total expected utility for each plan
P P
A
, we assign a value to each plan according to
the preferences of the user. We translate these pref-
erences into a function µ(P) : µ called function of
utility. This function is prone to the cost and the time
that are balanced by coefficients α and β. This al-
lows us to adjust the relative importance of the vari-
ous utilities according to the preferences of the user.
This utility function is described by :
µ(P) = αµ(cost(P)) + βµ(time(P))
where α + β = 1 and P P
A
.
Among all admissible plans, we choose the one
with the smallest utility to be executed :
P
= argmin
P∈P
A
µ(P)
This plan is the most likely one to be executed satis-
fying all constraints and that has a high probability to
be executed with reduced cost an time of execution.
In the next section, we determinate the most likely
scheduling to be executed.
7 SELECTION OF THE MOST
LIKELY SCHEDULING
We call scheduling of a plan P, the set of tasks of
P where each task is executed in a well defined in-
terval. If there is a simple precedence constraint be-
tween two tasks t
i
and t
j
(t
i
t
j
), then the execu-
tion interval of task t
i
must occur before the one of
task t
j
. More formally, let T (P) = {t
1
, t
2
, . . . , t
n
}
be the set of tasks of an admissible plan P, and
I
t
i
= {I
1
t
i
, I
2
t
i
, . . . , I
j
t
i
t
i
} be the set of execution in-
tervals of task t
i
in T (P), we have :
P
ord
= {(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
n
, I
k
t
n
t
n
)}
ICINCO 2005 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
82
is a possible scheduling in P where k
t
i
= 1..j
t
i
such
that if t
i
t
j
(t
i
and t
j
P
ord
) then e
k
t
i
t
i
s
k
t
j
t
j
.
We have also :
P =
[
P
ord
In the worst case, the total number of scheduling of
a plan P is equal to the product of cardinalities of all
possible execution interval sets of all tasks in T (P).
More formally this number is equal to :
No(P
ord
) = j
t
1
j
t
2
. . . j
t
n
In the next section, we calculate the expected utility
of cost and the expected utility of time for each task
(t, I
k
t
t
) P
ord
.
7.1 Expected Utilities of Cost and
Time of Tasks of Scheduling
for each P
ord
=
{(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
n
, I
k
t
n
t
n
)}, we calcu-
late the expected utility of cost and the expected
utility of time for each task t
i
to be executed in I
k
t
i
t
i
More formally :
1. If (t, I
k
t
t
) P
ord
has an only direct predecessor
(t
, I
k
t
t
) P
ord
where (t, I
k
t
t
) (t, I
k
t
t
) then :
The expected utility of cost of (t, I
k
t
t
) is calcu-
lated as following :
µ(cost((t, I
k
t
t
)|(t
, I
k
t
t
))) = P r
w
(I
k
t
t
|e
k
t
t
)c
k
t
t
The expected utility of time is calculated as fol-
lowing :
µ(time((t, I
k
t
t
)|(t
, I
k
t
t
))) = P r
w
(I
k
t
t
|e
k
t
t
)d
k
t
t
2. If (t, I
k
t
t
) P
ord
has a set of direct predeces-
sors {(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
p
, I
k
t
p
t
p
)} then, let
(t
i
, I
k
t
i
t
i
) {(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
p
, I
k
t
p
t
p
)}
then :
The expected utility of cost of (t, I
k
t
t
) is calcu-
lated as following :
µ(cost((t, I
k
t
t
)|(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
p
, I
k
t
p
t
p
)))
=
p
i=1
µ(cost((t, I
k
t
t
)|(t
i
, I
k
t
i
t
i
)))
The expected utility of time of (t, I
k
t
t
) is calcu-
lated as following :
µ(time((t, I
k
t
t
)|(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
p
, I
k
t
p
t
p
)))
=
p
i=1
µ(time((t, I
k
t
t
)|(t
i
, I
k
t
i
t
i
)))
In the next section, we calculate the total expected
utility of a scheduling P
ord
.
7.2 Expected Utility of Scheduling
To calculate the total expected utility of a scheduling
P
ord
, we calculate first the total expected utilities of
cost and time of P
ord
as following :
1. The total expected utility of cost of P
ord
is calcu-
lated by adding all expected utilities of all tasks in
P
ord
. More formally :
µ(cost(P
ord
)) =
n
X
i=1
µ(cost(t
i
, I
k
t
i
t
i
))
where n is the number of tasks of P.
2. The total expected utility of time of P
ord
is calcu-
lated as following :
µ(time(P
ord
)) is initialized to
max(µ(time(t
i
, I
k
t
i
t
i
))) where t
i
T
F
If (t, I
k
t
t
) has an only direct predecessor
(t
, I
k
t
t
) such that its expected utility is
µ(time(t
, I
k
t
t
)) then we add this expected
utility to the total expected utility of time of
plan. More formally :
µ(time(P
ord
)) =
µ(time(P
ord
)) + µ(time(t
, I
k
t
t
))
If (t, I
k
t
t
) has a set of direct predecessors
{(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
p
, I
k
t
p
t
p
)} then, we
add the maximum of expected utilities of these
tasks to the total expected utility of time of plan.
More formally :
µ(time(P
ord
)) =
µ(time(P
ord
)) + max
p
i=1
µ(time(t
i
, I
k
t
i
t
i
))
For each scheduling P
ord
=
{(t
1
, I
k
t
1
t
1
), (t
2
, I
k
t
2
t
2
), ..., (t
n
, I
k
t
n
t
n
)} of the ad-
missible plan P chosen to be executed, we calculate
its utility function, where α + β = 1 and, defined by :
µ(P
ord
) = α µ(cost(P
ord
)) + β µ(time(P
ord
))
From all scheduling formed by P we choose the one
with the smallest expected utility to be executed :
P
exec
= argmin
P
ord
P
µ(P
ord
)
This plan determines the expected intervals of execu-
tion in which tasks should be executed by the agent.
8 ANALYSIS AND EXPERIMENTS
The number of execution intervals for each task t de-
pends on the number of its direct precedence tasks, its
A SCHEDULING TECHNIQUE OF PLANS WITH PROBABILITY AND TEMPORAL CONSTRAINTS
83
time window [I
t
, I
+
t
] and the cardinality of its dura-
tion set |
t
|. When one of these constraints increases,
this number increases. The number of plans in a graph
depends on the number of execution intervals of tasks,
the number of tasks and the number of precedence
constraints. This number increases when the number
of execution intervals or the number of tasks increases
and it decreases when the number of precedence con-
straints increases.
In the worst case, the number of execution intervals
for an initial task is equal to the cardinality of its du-
ration set. The number of execution intervals for an
intermediate or final task which has an only direct pre-
decessor is equal to the cardinality of its duration set
multiplied by the cardinality of the set of the ends of
the direct predecessor task. The number of execution
intervals for an intermediate or final task which has
a set of direct predecessors is equal to the cardinality
of its duration set multiplied by all the cardinalities
of the sets of the ends of the direct predecessor tasks.
More formally, in the worst case :
If t T
I
then |I
t
| = |
t
|
If t T
M
T
F
where t has an only direct prede-
cessor t
then |I
t
| = |
t
| |E
t
|
If t T
M
T
F
and t has a set of direct predecessors
{t
1
, t
2
, . . . , t
n
} then |I
t
| = |
t
|
Q
n
i=1
|E
t
i
|
In our experimental tests, we used these parameters :
the total number of tasks, the number of plans we can
obtain if all temporal constraints are correct (worst
case) and the number of plans obtained without the
ones violating temporal constraints.
We remarked that theoretically, for 50 tasks with 5
execution intervals for each, we obtain 250000 plans
but with our approach, we generate only 20569 plans.
These first experimental results consolidate our idea
of the founded good of the approach. However, ad-
ditional experimental tests on the other factors, as
the size of the temporal windows and the number of
precedence constraints, are to be analyzed.
9 CONCLUSION
In this paper we present an approach of temporal
probabilistic task planning where we construct a plan
of tasks that satisfies all constraints and executes with
a high probability during a reduced time and with a
reduced cost. Our approach allows the agent to deter-
mine the set of tasks to execute and when to execute
them by respecting all temporal and precedence con-
straints. This approach is one of the first techniques
combining probability and time in planning.
Future work will be focused on other kind of exper-
imental factors and on comparing our approach with
other ones. Another issue consists in finding other
heuristics to choose the most likely plan to be exe-
cuted and reducing the search space then comparing
them with the heuristics presented in this paper.
REFERENCES
Baki, B., Beynier, A., Bouzid, M., and Mouaddib, A.
(2004). Temporal Probabilistic Task Planning in an
Emergency Service. In Complex Systems Intelligence
and Modern Technological Applications, CSIMTA-04,
pages 427–434.
Bresina, J. and Washington, R. (2000). Expected Utility
Distributions for Flexible Contingent Execution. In
Proceedings of the AAAI-2000 Workshop: Represen-
tation Issues for Real-World Planning Systems.
Bresina, J. L., Dearden, R., Meuleau, N., Ramakrishnan,
S., Smith, D. E., and Washington, R. (2002). Planning
Under Continuous Time and Resource Uncertainty: A
Challenge for AI. In AIPS Workshop on Planning for
Temporal Domains, pages 91–97.
Dean, T., Kaelbling, L., Kirman, J., and Nicholson, A.
(1993). Planning With Deadlines in Stochastic Do-
mains. In Proceedings of the 11th National Confer-
ence on Artificial Intelligence, pages 574–579. AAAI.
Draper, D., Hanks, S., and Weld, D. (1994). Probabilistic
Planning with Information Gathering and Contingent
Execution. In Proceedings of the Second International
Conference on AI Planning Systems, AIPS-94, pages
31–63.
Ghallab, M. and Laruelle, H. (1994). Representation and
Control in IxTeT, a Temporal Planner. In Proceedings
of the Second International Conference on Artificial
Intelligence Planning Systems, AIPS-94, pages 61–67.
Kushmerick, N., Hanks, S., and Weld, D. (1994). An Algo-
rithm for Probabilistic Least-Commitment Planning.
In Proceedings of the Twelfth National Conference on
Artificial Intelligence,AAAI-94, pages 1073–1078.
Laborie, P. and Ghallab, M. (1995). Planning with Sharable
Resource Constraints. In Proceedings of the Four-
teenth International Joint Conference on Artificial In-
telligence, IJCAI-95, pages 1643–1651.
Lemai, S. and Ingrand, F. (2004). Interleaving Tempo-
ral Planning and Execution in Robotics Domains. In
AAAI, pages 617–622.
Pemberton, J. C. and Greenwald, L. G. (2002). On the Need
for Dynamic Scheduling of Imagings Satellites. In
Proceedings of the American Society for Photogram-
metry and Remote Sensing, ASPRS-02.
Zilberstein, S. (1995). The Utility of Planning. SIGART
Bulletin, 6(1):42–47.
ICINCO 2005 - INTELLIGENT CONTROL SYSTEMS AND OPTIMIZATION
84