CAPÍTULO 2. LA COMUNICACIÓN E INTERACCIÓN DE LAS PAREJAS QUE
2.4. Método, fuentes de datos y población de estudio
We want to produce a flexible plan, where start times of actions are not fixed, but constrained by distance constraints between each pair of actions. Recall that a flexible plan is called a solution to the planning problem, if and only if all its possible realizations arevalid. A realization is valid, if it generates avalid schedulefor each state variable and resource in the problem. This means that each solution flexible plan represents a set ofvalid scheduleson each state variable and resource.
To build a solution for a given planning problem we take a bottom-up approach by posting ordering/precedence constraints between transition pairs on each resource and state variable. Each precedence constraint (or ordering) implies a temporal constraint, that the transitions can’t overlap during execution. Each temporal separation due to a precedence constraint be-
§3.2 Overview of the Constraint Model 43
tween a pair of transitions puts a distance constraint between their corresponding actions’ start times. This is the case because the start times of transitions are synchronized with the start times of their actions. This approach is known as Precedence Constraint Posting (PCP)[48] in the constraint-based scheduling literature.
This chapter describes the constraint model for planning problems. The model assumes the number of occurrence of each action is bounded (as in CPT [52]). It includes constraint models for actions, state variables and resources. The main idea of the constraint model is to find out what actions should be in the plan and for state variables and resources how transitions are going to be supported. The constraint model has two layers : the first layer includes the constraint model for actions, where we decide which actions are included in the plan, and maintain the distance constraints between the start times of the included actions, and the second layer includes a constraint model for each state variable and resource. For each domain object, the constraint model contains the included transitions on the domain object and maintains the precedence constraints between them. The constraint models for resources and state variables in the second layer do not interact with each other directly, they interact via the constraint model for actions in the first layer.
Note that on each state variable, the transitions are totally ordered, except for PREVAIL transitions that require the same state, and all transitions pre-conditions must be satisfied. The constraint model for each state variable can be thought of as the constraint model for
causal links between pairs of state variable transitions. Recall that in partial order planning (POP)[37], acausal link a[p]a0, represents the fact that action aachieves the pre-condition p for action a0. In our representation, given a state variable sv, a causal link is represented as Tsv[s]Tsv0 , where Tsv is an EFFECT transition and Tsv0 is either an EFFECT or a PREVAIL
transition onsv, andsis a state ofsv, i.e. s∈ dom(sv). It represents that the EFFECT tran- sitionTsv achieves the states, wheresis the pre-condition ofTsv0 . When we say that a causal
linkTsv[s]Tsv0 holds, it means that in the final planTsvachieves the pre-condition ofT0, which
implies a precedence constraint between TsvandTsv0 . For each EFFECT transition Tsvon sv
that achieves state s, there can be more than one EFFECT transition Tsv0 such that Tsv[s]Tsv0
is a possible causal link. For any given EFFECT transitionTsvthat must execute on the state
variablesv, at most one such causal link will hold in the final plan, because all EFFECT transi- tions must be totally ordered. To solve the constraint problem on each state variable, we decide which causal links hold in the final plan, and impose the precedence constraints between those pairs of transitions.
Given a resource and the set of activities (transitions in our case), resource reasoning in the PCP approach is generally done in two steps [21]: first find a subset of activities that overlap in time and together produce or consume more resource than the capacity of the resource (this set is also known aspeak), and second, put enough precedence constraints between pairs of activities (note that each precedence constraint makes the pair of activities non-overlapping) in
the peak such that the subset of overlapping transitions’ total production or consumption lies between 0 and the capacity of the resource.
In our constraint model for resources, we have chosen a different resource reasoning ap- proach than the two step procedure described above. Our resource reasoning is based on the idea of modelling causal links on state variables. The constraint model for each resource is based on deciding thesupport links between pairs of transitions on the resource. On a re- sourcer, a support link, Tr[δ]Tr0, represents that transition Tr providesδamount of resource
towards the requirement ofTr0. Ifδ = 0, it means Tr does not provide any support toTr0. If δ>0, then the support link implies a precedence relation betweenTrandTr0. By deciding how
transitions provide support to other transitions, i.e. creating support links, we build a schedule on each resource.
Eachcausalandsupport linkimplies a precedence or ordering relation between a pair of transitions. A precedence relation between two transitionsT→T0means thatT0starts afterT finishes its execution. Since each transition is non-preemptive, and the start times of transitions and their corresponding actions are synchronized, each precedence constraint puts a distance constraint between the start times of the actions of the transitions. The constraint model for actions maintains the consistency of these distance constraints.
As described before, our constraint formulation has two layers, where the first layer in- cludes the constraint model for actions, and the second layer includes a constraint model for each resource and state variable. Each constraint model in the second layer interacts with the action constraint model in the first layer via two types of constraints:
• If an action is included in the plan, then all its transitions are also included in the plan/schedule of the state variables/resources that the transition affects, and vice versa.
• Start times of actions and their transitions are synchronized.
Note that in the second layer, the constraint models for state variables and resources do not interact with each other directly.
Since the constraint model of transitions plays a central role here, we call itThe Transition- based Constraint Formulationof the planning problem. An overview of the Transition-based Constraint Formulation is shown in Figure3.1. The action level maintains the distance con- straints between the action start times, and at the domain object level, each state variable and resource constraint model maintains the precedence constraints between transition pairs on them. To solve a planning problem, we first compile the given problem into a CSP, and solve the CSP by selecting actions to include in the plan, and selecting causal and support links such a way that