• No se han encontrado resultados

1.2. OBJETIVOS Y RESULTADOS ESPERADOS

2.1.2. Importancia y Contenido del Informe de Aseguramiento

Now, we are going to present the connection between TPNs and OCSTNs. Remember that there are two motivations for us to use OCSTNs to encode the TPNs: First, OCSTN is structurally similar to the TPN so that we can preserve all the necessary features; Second, OCSTN is a CSP-based formalism that enables us to use efficient constraint-based search techniques. We will be focusing on the first motivation in this section, and leave the second motivation for Section 3.3.

In [14], a mapping between Optimal Conditional CSP (OCCSP) was introduced to encode TPNs. However, the OCCSP formalism is not compact for relaxation problems in that it encodes the disjunctive episodes of a TPN as domain values for decision variables: making an assignment to a decision variable is equivalent to selecting a set of temporal constraints. Relaxing an over-constrained OCCSP would be adding a domain value, which contains all but suspended temporal constraints, to a decision variable. OCSTN is a more compact encoding for relaxation problems in that a relaxation can simply be represented by a suspended temporal constraint, regardless of the decision variables.

Intuitively, we make the connection between OCSTNs and TPNs through the mapping of decision events and decision variables, guards, episodes and temporal constraints. Recall that the decision events in TPNs encodes different sub-plans.

Similarly, by choosing a set of assignments to apply to the decision variables in an OCSTN, some of its guarded temporal constraints will be activated and ground the OCSTN into a component STN that corresponds to a sub-plan in the TPN. In ad-dition, we made an assumption in Section 2.4 that we only consider the schedule relaxation of over-constrained TPNs in this thesis. Therefore, we only preserve the temporal information in the encoding of TPNs while mapping the TPN episodes into OCSTN constraints.

For example, to map John’s trip plan TPN (Figure 3-1) to an OCSTN (Figure 3-2), all episodes are mapped to guarded temporal constraints. Each conditional constraint is guarded with the decision required to activate it, like ”ArriveCosi:(Dine-in Cosi) [15min,15min]”. The activation of this constraint depends on the assignment made to decision variable ”ArriveCosi”: it will be respected only if ”ArriveCosi” is assigned (Dine-in Cosi) instead of (Take-out Cosi).

Start

Leave Office

End [0min,80min]

Arrive Cosi (Drive Office Cosi)

[40min,50min]

Arrive Quiznos (Drive Office Quiznos)

[30min,40min]

Arrive Subway (Drive Office Subway)

[25min,35min]

Leave Cosi (Dine-in Cosi)

[15min,15min]

(Take-out Cosi) [5min,5min]

Arrive Home (Drive Cosi Home)

[30min,35min]

Leave Quiznos (Dine-in Quiznos)

[25min,25min]

(Take-out Quiznos) [10min,10min]

(Drive Quiznos Home) [35min,50min]

Leave Subway (Dine-in Subway)

[35min,35min]

(Take-out Subway) [10min,10min]

(Drive Subway Home) [30min,35min]

Figure 3-1: John’s trip modeled as a Temporal Plan Network

Start

Leave Office

End [0min,80min]

Arrive Cosi LeaveOffice:(Drive Office Cosi)

[40min,50min]

Arrive Quiznos LeaveOffice:(Drive Office Quiznos)

[30min,40min]

Arrive Subway LeaveOffice:(Drive Office Subway)

[25min,35min]

Leave Cosi ArriveCosi:(Dine-in Cosi)

[15min,15min]

ArriveCosi:(Take-out Cosi) [5min,5min]

Arrive Home LeaveOffice:(Drive Office Cosi)

[30min,35min]

Leave Quiznos ArriveQuiznos:(Dine-in Quiznos)

[25min,25min]

ArriveQuiznos:(Take-out Quiznos) [10min,10min]

LeaveOffice:(Drive Quiznos Home) [35min,50min]

Leave Subway ArriveSubway:(Dine-in Subway)

[35min,35min]

ArriveSubway:(Take-out Subway) [10min,10min]

LeaveOffice:(Drive Subway Home) [30min,35min]

Figure 3-2: John’s trip modeled as an Optimal Conditional Simple Temporal Network

Formally, we define the encoding between TPN and OCSTN as the following.

Definition 30. (OCSTN Encoding of a TPN) An OCSTN encoding of a TPN,P, is a 7-tuple < P, Pi, V, E, GC, RGC, f(P)> where:

• P is a set of decision variables corresponding to the decision events in P.

• Pi is a set of decision variables that are always active. It is used to represent the decision events in P that do not depend on choices made to any other decision events.

• V =v1, v2, ..., vi represents the domain of each decision variable pi ∈ P. Each domain value vik ∈vi corresponds to a choice in a decision event of P.

• E is the set of events in P. Each event can be assigned a real-valued time point.

• GC is the set of guarded simple temporal constraints. The guard is used to indicate the choice required to activate this constraint in P. For constraints that are always active, their guards are empty.

• RGC is a subset of GC which represents the simple temporal constraints that can be relaxed to restore temporal consistency without violating the completeness and consistency of the TPN.

• f(P) is the utility function that maps a set of assignments to a real value num-ber. f(P) is defined for each choice in the decision events of (P) such that a utility value can be computed for any combinations of choices.

Finally, we present the equivalence of OCSTN and TPN consistency. In this thesis, we focus on the temporal consistency and relaxations of temporal plans. We start the proof with the equivalence between the temporal consistency temporal plans and STNs, and then expand to TPNs and OCSTNs.

Theorem 1. A temporal plan, P, is temporally consistent if and only if its equiv-alent STN is consistent.

Proof. [Proof by contradiction]

Given a temporal plan, P, and its equivalent STN,S, assume thatS is consistent but P is temporally inconsistent.

• IfS is consistent, then there exists a set of time assignmentsT Asto all variables V in S such that all the simple temporal constraints C are satisfied.

• We can construct a scheduleSC toP that is identical to T Asbut with all the assignments made to the events in P.

• Given that all the constraints inS are mapped from the activities and temporal constraints inP, if T AssatisfiesC ∈ S, then SC can satisfy ACT and T C ∈ P.

Hence P is temporally consistent. the assumption does not hold.

We can prove the other direction using the same approach. Further, the theorem can be extended to TPNs and OCSTNs: if any of the candidate temporal plan in a TPN is temporally consistent, its equivalent OCSTN must have a component STN that is consistent. Therefore, we conclude that both the TPN and the OCSTN are consistent. Given a TPN, we can determine its consistency by encoding it into an OCSTN and checking the consistency of the OCSTN.

Theorem 2. A TPN, T PN, is consistent if and only if its equivalent OCSTN is consistent.

Documento similar