
## Evaladd(A)

Input : An action node a that does not belong to the current TA-graph. Output: A pair formed by a set of actions and a temporal value t.

1.

2.

3.

4.

5.

6.

7.
INIT 1 ← Supported_facts(Level(a));

$INTI_{i}\gets Support\,cat\_acts(Level(a))$;  $Rplan\gets\mathsf{Re}\,\mathsf{lexedP}|\mathsf{an}(Pr\,e(a),INTI_{i},\,\emptyset)$;  $t_{1}\gets MAX\,\{0,MAX\,\{Time(a^{\prime})\mid\Omega\mid=a^{\prime}\prec a\,\}\}$;  $t_{2}\gets MAX\,\{t_{1},End_{i}time(Rplan)\}$;  $A\gets Aset(Rplan)\cup\{a\}$;  $Rplan\gets\mathsf{Re}\,\mathsf{lexedP}|\mathsf{an}(Th\,eatsts(a),INTI_{i}-Thr\,eat\,ts(a),A\,)$;  $\mathsf{return}\,\mathsf{n}\,\langle Aset(Rplan),t_{2}+Duration(a)\rangle$.  

## Evaldel(A)

Input: An action node a that belongs to the current TA-graph.

Output : A pair formed by a set of actions and a temporal value t .

1.

2.

$$\begin{array}{l}{{:v\,e l\,(a)\,\!);}}\\ {{.f a c t\,s(a),\,I N\,I T_{l},\,\varnothing)}}\end{array}$$

INIT ↓ ← Supported_facts(Level(a)); Rplan ← Relaxed Plan( Un sup_fact s(a), IN IT t, ().

3.

return Rplan.
Figure 5: Algorithms for estimating the search, execution and temporal costs for the insertion (EvalAdd) and removal (EvalDel) of an action node a. Rplan is a pair of values, identified by Aset ( Rplan ) and End time ( Rplan ), where the first is a set of actions and the second a temporal value. Num acts, Supported-facts, Duration and Threats have been defined in Section 3.2.1. Unsup-facts ( a ) denotes the set of precondition nodes that become unsupported by removing a from A.

considering the preconditions of the actions that would become unsupported when removing a from the current action graph. More formally, E is defined as follows:

Execution_cost(a)' = Ea'E Aset(EvalAdd(a)) Cost(a') Temporal_cost(a) i = End_time(EvalAdd(a)) E (a)' Search cost(a)' = | A set(EvalAdd(a))| + ∑ a' ∈ A set(EvalAdd(α)) | T hr eats(α')| Execution cost(a)" = Ea'E Aset(EvalDel(a)) Cost(a') = Cost(a) E(a)' Temporal_cost(a)" = End_time(EvalDel(a)) SearchLost(a)" = | A set(EvalDel(a))| + Ea'EA set(EvalDel(a)) | Threats(a')|
where EvalAdd( a ) and EvalDel( a ) are the functions defined in Figure 5. EvalAdd( a ) returns two values: the set of actions in π r ( Aset ) and an estimation of the earliest time when the new action a would terminate ( End_time ). Similarly for EvalDel( a ), which returns the set of