• No results found

The Timeline Representation Framework as a Planning and Scheduling Software Development Environment

N/A
N/A
Protected

Academic year: 2021

Share "The Timeline Representation Framework as a Planning and Scheduling Software Development Environment"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

The Timeline Representation Framework as a Planning and Scheduling

Software Development Environment

Amedeo Cesta and Simone Fratini

ISTC-CNR, National Research Council of Italy Institute for Cognitive Science and Technology

Rome, Italy {name.surname}@istc.cnr.it

Abstract

A planner and/or a scheduler consists not only in an outstand-ing algorithm but also in a significant piece of software that identify it as a “system”. This is true both in case of applied research and when developing an implementation for exper-iments connected to research work on some innovative algo-rithm. A desiderata for all theses cases consists in having the possibility to shorten the time spent to synthesize software and potentially dedicate more time to the innovative aspects rather than to implementation details. We have been work-ing for a while at creatwork-ing a software development environ-ment for a timeline based approach to planning and schedul-ing. In this paper we describe the status of our effort describ-ing features of a software framework called TRF (Timeline-based Representation Framework) and showing how it can be used to support development of both a particular applica-tion, a simple “classical” planner and a basic constraint-based scheduler. This paper underscores the importance of a soft-ware framework and identify direction for its robustification in the immediate future.

Introduction

The timeline-based approach models the planning and scheduling problem by identifying a set of relevantfeatures of the planning domain which need to be controlled to ob-tain a desired temporal behavior. Timelines model entities whose properties may vary in time and which represent one or more physical (or logical) subsystems which are relevant to a given planning context. The planner/scheduler plays the role of the controller for these entities, and reasons in terms of constraints that bound their internal evolutions and the desired properties of the generatedbehaviors(goals).

Current AI planning literature shows that timeline-based planning can be an effective alternative to classical plan-ning for complex domains which require the use of both temporal reasoning and scheduling features (see (Muscet-tola et al. 1992; Muscettola 1994; Jonsson et al. 2000; Chienet al. 2000; Cesta & Fratini 2005)). Most of these works are usually considered as application oriented and the related planner referred to as domain specific. Some works exist that have explored timelines as a useful modeling alter-native for the general planning problem (Cesta & Oddi 1996; Smith, Frank, & Jonsson 2000; Frank & J´onsson 2003; Verfaillie, Pralet, & Lemaitre 2008).

Our experience emerges from deploying some planning applications for space (see for instance (Cestaet al.2007)), from designing OMPS, a domain independent timeline based

planner (Fratini, Pecora, & Cesta 2008), and from our long term research work in scheduling. We have observed that a lot of effort is spent in designing, implementing and testing software components that could be reusable among the dif-ferent applications that share an underlying timeline mod-eling assumption. This observations fostered the goal of synthesizing the Timeline-based Representation Framework (TRF), a software library devoted to speed-up, simplify and increase the quality of planning and scheduling software de-sign and deployment process.

The TRF’s theoretical background is what we call

component-basedapproach, that unifies timelines of differ-ent nature under the unique concept ofcomponent, an entity that may assume a set of different legal temporal evolutions over a temporal interval, thehorizon, over which these evo-lutions are defined. Component evoevo-lutions are affected by planning and schedulingdecisions. An underlyingdomain theory specifies temporal and logical relationships among decisions that can be possibly taken. The TRF provides functionalities for temporal information management, com-ponent definition and integration, domain theory modeling and basic planning and scheduling features.

In this paper we briefly introduce the component-based approach, then we describe in some detail the TRFand we

present some examples of the process for deriving planning and scheduling applications from the TRF. In particular we

discuss three TRFuse-cases: (1) MrSPOCK, an application we have recently deployed to the European Space Agency, (2) STRIPLINE, a simple timeline-based planner for STRIPS

domains and (3) a family of constraint-based schedulers that efficiently address large scheduling problems.

The Component-Based Approach

The philosophy underlying the framework presented in this paper is inspired by classical control theory, in that the plan-ning and scheduling problem is modeled by identifying a set of relevant components whose temporal evolutions need to be controlled to obtain a desired behavior. Components are primitive entities for knowledge modeling, and represent logical or physical subsystems whose properties may vary in time. An intrinsic property of components is that they evolve

(2)

over time, and that decisions can be taken on components which alter their evolution. The approach shortly summa-rized here is the approach followed by the OMPSplanner and

scheduler, that has been presented in previous works (e.g., see (Fratini, Pecora, & Cesta 2008) among others).

Components and their behaviors. During any interval of

time a component can have one or more possible behaviors. Each behavior describes a different way in which the com-ponent’s properties vary in time during the temporal interval of interest. However, not every function over a given tem-poral interval can be taken as a valid behavior for a com-ponent. The evolution of components in time is subject to “physical” constraints. We callconsistentbehaviors the ones that actually correspond to a possible evolution in time ac-cording to the real-world characteristics of the entity we are modeling, i.e., those behaviors which adhere to the “phys-ical” constraints. For instance, if the component is a state variable, its behaviors are sequence of symbolic values. A set of rules that specify which transitions between allowed values are legal, and a set of lower and upper bounds on the duration of each allowed value are used to state which behaviors are legal (these constraints are often synthesized in a finite state machine). In the case of a component that model aresource, behaviors are numerical functions of time (to trace the resource availability at each time instant) and a lower and upper bound of resource availability state which behaviors are consistent (those that are always between the bounds) and which are not.

Now that we have introduced the concept of component as the fundamental building block of the component-based ap-proach, the next step is to define how component behaviors can be altered (within the physical constraints imposed by the consistency notion). Adecisionis a temporally tagged event. When applied to a component, a decision alters the component behaviors. In the case of state variables, a de-cision might be a choice of a value in a given temporal in-terval, while in a resource component a decision might be a resource consumption in a given interval (an activity) or a production/consumption (that positively or negatively alters the resource availability after a given time point). What is important to point out here, is that nothing is stated a-priori in general component definition about how actually a deci-sion alter the component behavior. The idea is that, given a set of components, a set of decisions determine their behav-iors, and each component must provide the implementation for computing its own behaviors once that a set of decisions have been stated. Moreover, since the notion of consistency is component-dependent as well, a component must be able to compute, given a set of decision, its own consistent be-havior and must provide the implementation for adjusting (whenever possible) the decisions to avoid inconsistencies.

Domain theory. After defining components in isolation

we select some of them to describe more complex target do-mains. When components are put together to model a real domain they cannot be considered as reciprocally decou-pled, rather we need to take into account the fact that they

influence each others behavior. Thedomain theory speci-fies such inter-component relations. As the notion of con-sistency describes which behaviors are consistent for each single component with their own “internal physical model”, the domain theory defines which combinations of behaviors of all components are acceptable with respect to decisions taken on other components. We represent such requirements by means ofsynchronizations. A synchronization specifies the “consequences” of decisions. A synchronization could for instance specify that a given amount of resource must be booked when a certain value is taken by a given state variable, or could specify a value and/or temporal relation-ship among the sequence of values taken by two different state variables. Once again it is important to notice that the notion of synchronization is general, and states a tem-poral and/or value relations among two or more decisions. In case of synchronization among state variables, the no-tion collapses into thecompatibilityconcept widely used in timeline-based planning. More in general the definitions of component, decision and synchronization in the component-based approach generalize the definitions of state variable, token and compatibility used in both HSTS or Europa plan-ners.

A comment. The purpose of the pursued generalization is very similar to the principle behind the object-oriented ap-proach that generalizes the notion of primitive data types. As an object abstracts a primitive type by providing a data representationand a set of methods for managing data, the component abstracts the notion timeline by providing both a representation of the behaviors and a consistency notion, and providing a set of methods for computing the effects of decisions (and methods for managing them). As an object-oriented application is built by defining objects and making them to interact, similarly a component-based do-main is built by defining components and specifying rules for putting them together and making them able to interact (the domain theory). This approach carries all the advan-tages typical of the object-oriented approach: modularity, reusability of components, possibility of building a library of planning and scheduling components reusable in different domains and so on. The TRFprovides the enabling technol-ogy for building component-based planning and scheduling applications.

Timeline-based Representation Framework

The TRF software architecture consists of layers organized in a hierarchy. Each layer is responsible for dealing with a particular aspect of the problem, and each layer uses the services provided by the underlying layers to implement its functionalities. The constraint-based nature of the approach is extremely visible in the way the different layers exchange information: constraints are posted on the underlying lev-els as a consequence of decisions taken on higher levlev-els, and decisions are taken on higher levels by analyzing the domains of the variables in the underlying levels. The archi-tecture has been conceived to be easily extensible by adding components. This capability is very important to achieve

(3)

Time & Parameters

Component Domain

Temporal Network

<V,E> = <Time Points, Temporal Constraints> <V,E> = <Parameters, Parameter Constraints> Decisions Component1 Component2 Decisions Decision Network <V,E> = <Decisions,Relations> Add/Remove/Propagate decisions Timeline Management (extraction, gap & inconsistency detection)

Add/Remove/Propagate Temporal and parameter constraints

Query Temporal Elements Occurrence (lower and upper bounds, distance)

and parameter values

Add/Remove/Propagate relations among decisions

Domain Theory Management

Timeline resolution (scheduling and completion) & Behavior extraction

Constraint Network

Figure 1:The layered implementation of the TRF.

a good balance between general, domain independent plan-ning (easily customizable to various domains) and special-ized, efficient reasoning (often needed in real world domains for efficiency reasons).

TRF’s architecture is subdivided in three levels: a Time/Parameters layer, a Component layer and a Domain layer. Layers are organized according to the hierarchy shown in Figure 1. The TRF design reflects the approach

induced by the component based approach. The planning domain is modeled as a set of concurrent threads (the time-lines) and the problem is to synthesize a set of decisions to obtain a desired behavior and to synchronize the threads. Hence the TRFstructure, where a common lower level

rep-resents the information shared among the timelines, tempo-ral information and parameter information, a middle level that represents the extension point where the modeler plugs the components, and an upper level that provides a unified, shared representation of the plan.

Time and Parameters Layer. This is the lowest layer in

the TRF’s architecture. Temporal and parameter information

is managed at this level. The interface provided by this level is simple and straightforward. Higher levels create temporal elements and parameters, impose constraints on them and query the database to access the information on events tem-poral positions and parameters values. The temtem-poral infor-mation is managed in shape of Temporal Constraint Net-works (TCNs) (Dechter, Meiri, & Pearl 1991). TCNs allow representing events, also calledtime points, and temporal constraintsthat represent distances, separation constraints, etc. This layer is endowed with propagation algorithms to maintain the consistency of the possible value assignments to time points. The current implementation in is based on the Simple Temporal Problem (Dechter, Meiri, & Pearl 1991). Two propagation algorithms are defined: the first one imple-ments an All Pair Shortest Path algorithm (less efficient but provides information about time points distances), the sec-ond one implements a Single Source Shortest Path algorithm (more efficient, but only time points lower and upper bound are provided). Parameters are managed through an external

CSP solver, CHOCO(CHOCO2008).

Component Layer. The component layer is the point of

expansion of the TRF architecture. In this architecture a component is a software module that encapsulates the logic for (1) computing a timeline resulting from decisions; (2) evaluating the consistency of the computed timeline with respect to a set of given rules and (3) computing a set of tem-poral and/or parameter constraints and further decisions to solve (if possible) any threat to the consistency of the com-puted timeline. A couple of practical examples might help in understanding the three points. Referring again to the state variable and to the reusable resource components pre-viously mentioned, a state variable component encapsulates the logic for computing, given a set of value choices, the sulting timeline. Temporally intersecting decisions must re-quire the same values, otherwise the resulting timeline will be inconsistent. If two decisions that requireP(x)andP(y) happen to overlap, the state variable component must be able for instance to deduce x = y to ensure the consistency. In the case of a reusable resource component, it encapsu-lates the logic for computing resource profiles given a set of allocated activities. An inconsistency is detected when

noverlapping activities requires a total amount of resource greater than the maximum availability. In this case the re-source component must be able to analyze the situation and to compute a set of temporal constraints between them that will solve the conflict. It is worth pointing that search is not supposed to be performed at this level: only necessary constraints deduced by propagation should be automatically posted within the components. Point of choice should be forwarded back to higher levels in the hierarchy of the ar-chitecture.

A component provides to higher levels basic timeline-management primitives (like timeline extraction and incon-sistencies detection). It is a point of expansion because the components make the architecture independent from the ac-tual implementation of the functionalities they provide, en-capsulating component-specific algorithms and hiding dif-ferences about behaviors, inconsistency detection and

(4)

reso-lution behind a common interface.

In the current implementation the TRFprovides two types

of standard components: state variables and reusable re-sources. State variables have behaviors that are piecewise constant functions over a finite, discrete set of symbols which represent the values that can be taken by the state variable. Each behavior represents a different sequence of values taken by the component. The consistency notion is stated as a set of sequence constraints, i.e., a set of rules that specify which transitions between allowed values are legal, represented as a timed automaton (Allur & Dill 1994). Inconsistency detection and resolution are implemented as in (Fratini, Cesta, & Oddi 2005). Resources behaviors are real functions over time. Each behavior represents a differ-ent profile of resource consumption. Propagation algorithms from (Laborie 2003; Baptiste & Le Pape 1995) are imple-mented and used for consistency detection and timeline ex-traction.

Domain Layer. The Domain layer presents to the TRF’s

users primitives to represent both domain theory and plans, and in general allows to use components. A plan is rep-resented as adecision network: given a set of components C, a decision network is a graphhV, Ei, where each vertex

δC V is a component decisions defined on a component

C ∈ C, and each edge(δm

Ci, δnCj)is arelationamong com-ponent decisionsδm

CiandδnCj.

Figure 2:Decision Network.

In Fig. 2 is represented a decision network for a domain with two state variable components, C1 andC2, with two

deci-sions for each component. A decision specifies a disjunction of required values for the corresponding state variable time-line (for instanceδ1

C1requires either a valueA(x1)or a value

B(x2)for the state variableC1). The fundamental tool for

defining dependencies among component decisions are re-lations, of which the TRF provides three types; temporal, valueandparameterrelations. Given two component deci-sions, atemporal relationis a constraint among the temporal elements of the two decisions (continuous arrows in Fig. 2, where for example theDEADLINEconstraint forδ2

C1andδ2C2

or theBEFOREconstraint betweenδ1

C1andδC22 are temporal

relations). A temporal relation among two decisions A and B can prescribe temporal requirements such as those modeled by Allen’s interval algebra (Allen 1983), e.g., AEQUALSB,

or the hybrid variant qualitative/quantitative, e.g., AOVER

-LAPS [l,u] B. Avalue relationbetween two component

de-cisions is a constraint among the values of the two dede-cisions.

A value relation among two decisions A and B (the dashed line in Fig. 2 betweenδ2

C1 andδ2C2 for instance) can

pre-scribe requirements such as AEQUALSB, or ADIFFERENT

B (meaning that the value of decision A must be equal to or different from the value of decision B). Lastly, aparameter relationamong component decisions is a constraint among the values of the parameters of the two decisions (the con-tinuous line between δ1

C2 andδC22 that statesx7 = 2x6in

Fig. 2 for example). Such relations can prescribe linear in-equalities between parameter variables. For instance, a pa-rameter constraint between two decisions with values “avail-able(?antenna, ?bandwidth)” and “transmit(?bitrate)” can be used to express the requirement that transmission should not use more than half the available bandwidth, i.e., ?bitrate 0.5·?bandwidth.

The domain level is where concurrent threads represented by each component in the underlying level are put together to constitute the component-based domain. The decision network provides a unified vision of the current solution, while the synchronizations that constitute the domain theory provide a unified means for expressing the constraints that the decisions must satisfy. In the current TRF implementa-tion an extension of theDDL.3 language (Fratini, Pecora, &

Cesta 2008) is used for specifying the domain theory. It is worth pointing that the decision network and the domain theory are flexible enough for representing a wide range of different problems. It is possible to model a timeline-based planning problem and represent a plan. In fact, a timeline-based domain independent planner as OMPS

can be easily refactored as a solver on top of the TRFwith

state variables. The solver implements search procedure and heuristics, while the TRFmaintain the planner search space,

also providing powerful functionalities for helping in build-ing such a search space. But also a pure schedulbuild-ing problem (and its solution) can be represented with a decision net-work. In fact the next section presents some use cases of the TRF, presenting also a scheduler forRCPSP/maxproblems

built on top of the framework.

Case Studies

In this section we survey three different cases in which we have used the TRFto develop specific solvers. The first is a deployed space application, named MrSPOCK, recently developed within the APSI project of the European Space Agency, the other two are more research oriented in nature: STRIPLINEis a simple planner for STRIPS domain recently synthesized as a step of an internal research activity and a family of constraint-based schedulers developed to import in the same framework previous research results.

MrSPOCK

MrSPOCK, the “MARSEXPRESSScience Plan

Opportuni-ties Coordination Kit”, is a new tool which required a com-bination of various research aspects from the planning and scheduling area. The system solves an interesting multi-objective optimization problem that requires the satisfaction of a number of temporal and causal constraints to produce long term plans for the MARS EXPRESSspacecraft

(5)

constraint-based representation that supports timeline-based planning and scheduling, an optimization algorithm that ex-ploits such representation and an interaction front end which has multiple features. The system has been first deployed to end users during May 2008 and it is currently being refined to perfectly match the details of the daily use. Apart the fielded application it is worth highlighting here the interest-ing leverage we obtained with respect to our previous experi-ence in ESAprojects, e.g., (Cestaet al.2007), due to the use

of the TRF. This general framework has allowed us to

cap-ture a number of constraints with a basic domain description language. Additionally the use of the timeline-based repre-sentation as a central concept for the user interaction front-end demonstrates its particular suitability to capture the way of working of human planners in space domains.

The problem. The open problem we addressed at ESA

with the MrSPOCK application was to support the collab-orative problem solving process between the science team and the operation team of the space mission. These two groups of human planners iteratively refine a plan containing all activities for the mission. The process starts at the long term plan (LTP) level – three months of planning horizon – and is gradually refined to obtain fully instantiated activ-ities at short term plan level – one week of planning hori-zon. This process continuously leads to weekly short term plans, which are then further refined every two days to pro-duce final executable plans. Goal of MrSPOCK is to develop a pre-planning optimization tool for spacecraft operations planning and, specifically, the generation of apre-optimized skeleton LTPwhich will then be subject to cooperative sci-ence team and/operation team refinement (see (Cestaet al. 2008) for a more detailed description of the whole work).

A critical point in developing an application to produce the MARS EXPRESSskeleton LTP is the need to consider a great number of operational constraints that cannot been removed after four years of daily mission operation prac-tice. In order to capture the work practice we had to cope with very specific constraints that are difficult for the gen-eral purpose solving framework but more easily to be taken into account in a domain specific solver, hence the choice of creating such solver on top of the TRF. In general it is worth

underscoring that in developing application of planning and scheduling in real context the trade-off generality/specificity is a relevant one even if it is usually not mentioned in offi-cial literature. In our previous experience to produce the MEXAR2 tool (Cestaet al. 2007) we have used a

model-based representation centered on timelines and several prin-ciples of mixed-initiative planning that are research prod-ucts of our area but the whole implementation was done on-purpose for the application. In MrSPOCK the amount of the general purpose modules used in the implemented system is quite high with respect to our previous work. It is also worth mentioning that the development of a solver entirely based on domain independent solver would require the customiza-tion of an amount of specific knowledge in the domain de-scription with a consequent production of a rather cumber-some domain model. Our choice has been to use TRF for

clean modeling purposes while relying on a specific module

for driving an efficient problem solving.

Use of the TRF. MrSPOCK uses the TRFdomain

model-ing capabilities to capture the main entities of the Long Term Plan domain within the MARSEXPRESSmission. In order to describe the components we used to model the problem it is important to remind an important distinction between: (1) Controllable Components, whose temporal behavior is decided by the solver. They define the search space for the problem, and their timelines ultimately represent the prob-lem solution; (2)Uncontrollable Componentsthe evolution of which is give to the solver as input. They represent val-ues imposed over time which can only be observed; they are seen as additional/external data and constraints for the prob-lem.

Figure 3:MrSPOCK domain model.

Figure 3 shows how the MARS EXPRESS LTP domain is

captured in the current release of MrSPOCK. In particular in this case we only use the component type “state variable”.

A single controllable state variable models the space-craft’s pointing mode (Pointing), which specifies the tem-poral occurrence ofScienceandMaintenanceoperations as well as the spacecraft’sCommunicationto Earth. The values that can be taken by this state variable, their durations (rep-resented as a pair[min, max]) and the allowed transitions among the possible states are synthesized by the automaton shown in the right side of Figure 3.

As uncontrollable variables we represent ground stations (GS) availability and the occurrence of the key orbit events (Apocentre and Pericentre). The temporal occurrences of pericentres and apocentres are shown in Figure 3 (“Apo” and “Peri” values on the timeline, left/top part of the picture) and are defined in time according to an orbit event file de-cided by the flight dynamics team. The other state variable maintains the visibility information of three ground stations (“MAD”,“CEB” and “NNO” timelines left/bottom part of the figure). The allowed values of these state variables

are: {Available(?rate,?ul dl,?antennas),

Unavailable()}, where the ?rates parameter in-dicates the bitrate at which communication can occur,

?ul dl indicates whether the station is available for upload, download or both, and the?antennasparameter indicates which dish is available for transmission.

Any valid plan needs temporal synchronizations among the pointing timeline and the uncontrollable variables. These synchronization constraints are represented as dotted arrows in the figure:Scienceoperations must occur during Pericen-tres,Maintenanceoperations must occur during Apocentres

(6)

andCommunicationmust occur during ground station vis-ibility windows. As mentioned, in addition to those syn-chronization constraints, the Pointing timeline should sat-isfy the transition constraints among values specified by the automaton and the minimal and maximal duration specified for each value (in the automaton as well). A solution is ob-tained when a set of consistent timelines for the controllable component are defined and all the operational constraints are satisfied.

Solver. A distinctive aspect of MrSPOCK is is the

syn-thesis of a problem solver directly connected to the timeline representation. In this way we exploit the TRFconstraint en-gines for propagating several types of constraints, while us-ing specialized search engines partly general partly tailored to the problem. In particular, MrSPOCK integrates a greedy one pass constructive search procedure with a generic op-timization cycle that uses a genetic algorithm approach as discussed in (Cesta et al. 2008). One of the interesting achievements in this work is the hybridization of a timeline based general purpose approach with a wrapping module that implements a genetic optimization search. It is worth underscoring again how the TRFis endowed with

propaga-tion algorithms hence it is not just a bookkeeping data struc-ture rather it has an active role as is current practice of con-straint satisfaction engines. In creating a complete architec-ture we situate MrSPOCK at an intermediate stage between generic timeline-based planners, e.g., our own OMPS

archi-tecture, and the domain specific timeline-based solver used in MEXAR2.

S

TRIP

L

INE

STRIPLINE is a planner for simple STRIPS domains

re-cently implemented on top of the TRF. It pursues the key idea of translating the STRIPS problem instances in terms of timelines and temporal constraints. Considering a STRIPS instance PST = hP, O, I, Giwhere P is a set of ground

literals, O is a set of actions,I P is the set of literals true in the initial state andG = hM, Nidescribes the fi-nal state, whereM P is the set of literals that must be true in the final state,N ⊆P is the set of literals that must be false andM ∩N = . An action a O is a tuple hα, β, δ, γi, where these four sets specify, in order, which lit-erals must be true for the action to be executable, which ones must be false, which ones are made true by the action and which ones are made false. An instance of a STRIPS prob-lemPST can be translated into a timeline planning problem

PT L=hC, S, DiwhereCis a set of components,Sis a set

of synchronizations andDis a set of decisions that describe the initial values of the timelines. This is described in the following.

Domain model. We need to represent with timelines both

the actions that constitute a plan and the state of the world resulting from the application of that sequence of actions. Since a STRIPS plan is simply an atemporal sequence of ac-tions, while in the TRFwe represent only temporally placed events, we discretize the TRF’s underlying temporal

repre-sentation by focusing onH events temporally placed over

an interval [0, H) at t0 = 0, t1 = 1 and so on until

tH−1=H−1. We suppose the application of a STRIPS

op-eratoraiat each eventti,i >0. Under this assumption, we

introduce animpulsive state variablecomponent, theagent, with values inOto represent with a timeline a STRIPS plan. The impulsive state variable, similar to a concept proposed in (Verfaillie, Pralet, & Lemaitre 2008), is a component sim-ilar to a state variable, whose decisions modify the compo-nent behavior in a given time point, instead of in a given time interval as in the case of state variables. As a conse-quence, the timeline for this component takes values in some time points (when decisions occur) while are undefined else-where. STRIPLINE plans the behavior of this timeline by choosing which action ai is applied at each time pointti.

The STRIPS state of the world is represented through “clas-sical” state variables, by defining for each literal inP a state variable with values in {TRUE,FALSE}. At each time in-stant ti, the values taken by these timelines in the interval

[ti, ti+1)model the state of the world of the STRIPS

do-main after the application of the actionaiatti(modeled in

the agenttimeline). On the other side, the values taken in the interval[ti−1, ti)model the state of the world where the

actionaiis applied.

Domain Theory Translation. The STRIPS domain

the-ory synthesizes, with the action schema, under what condi-tions an action can be applied and what the effects of the application are on the state of the world. In the translated domain these rules are both modeled as temporal synchro-nizations among the values taken by theagenttimeline and the values taken by the timelines that model the state of the world. A precondition of an action applied in a time instant

tiis translated into a value requirement for the proper

time-lines that model the required literals over an interval ending atti, while an effect of an action is translated into a value

requirement over an interval that starts atti. Let us consider

for instance a simple Blocks World Domain with 3 blocks

B1,B2andB3. An hypothetical actionato moveB1from

B2 toB3 would require as a precondition that (P1) B1 is

onB2, (P2)B1 is clear and (P3)B3is clear. As effect we

will have that (E1)B1is no longer onB2, (E2)B1is onB3,

(E3)B2becomes clear and (E4)B3is not clear any longer.

This action schema will be translated, supposing the time-lines (A) for the agent and (T1) ONB1B2, (T2) ONB1B3, (T3) CLEARB1, (T4) CLEARB2 and (T5) CLEARB3 for the

literals involved in the mentioned action schema, into the following synchronizations: (S1) (A) = a AT-END (T1) = TRUEand (A) =aAT-START(T1) = FALSEto model (P1) and (E1), (S2) (A) =aAT-START(T2) =TRUEto model (E2),

(S3) (A) =aDURING(T3) =TRUEto model (P2), (S4) (A) =aAT-START(T4) =TRUEto model (E3) and (S5) (A) =a AT-END(T5) =TRUEand (A) =aAT-START(T5) =FALSE

to model (P3) and (E4).

Timeline initialization. For each literal inIa valueTRUE

is put starting att0in the corresponding timeline. For each

literal inP−Ia valueFALSEis put starting att0in the

corre-sponding timeline. For each literal inMa valueTRUEis put ending attH in the corresponding timeline. For each literal

(7)

timeline.

Planning algorithm. The translation presented is quite

straightforward in the TRF. We had only to implement the

impulsive state variable component deriving it from the state variable component. The planning algorithm is quite simple and straightforward as well. It incrementally builds a plan from t1 choosing applicable actions by querying the TRF

about the current values of the timelines and updating the timelines once that an action has been chosen (again exploit-ing TRF’s functionalities):

1. Check all executable actions at t = tn. This is

per-formed by checking all those values of the agent time-line with synchronizations that require, for the timetime-lines that describe the state of the world, values in the interval [tn−1, tn)compatible with the current partial solution;

2. Execute one of them and check if the problem is solved. A plan has been found if all the values required attHhave

been achieved attn+1. If this is not the case, extend the

plan increasingt. The frame axiom induce some addi-tional temporal constraints on the decisions for the time-lines that represent literals not affected by the executed action. In fact the effects of these decisions have to be extended since they have not been modified;

3. If no further actions are available and the problem is not solved, then backtrack.

STRIPLINErepresents a preliminary work that still has not

produced a complete planner, even for simple STRIPS prob-lems. It is rather a first intermediate output of an ongoing work that aims at studying the possibility of planning tem-poral PDDL domains within a timeline based approach. The current STRIPLINE is not efficient and allows to perform only linear planning. Nevertheless is an example of how the TRFcan supports everyday research activity enabling us

to pursue new research directions.

Schedulers

One of the general goals in designing the TRF is to obtain

a unified software framework that supports both planning and scheduling. Actually the idea of component-based ar-chitecture was initially inspired by the need to identify an abstract architectural concept able to capture the common-alities between early timeline-based planning (Muscettola 1994) and constraint-based schedulinga-la(Cesta, Oddi, & Smith 1998). Having resources as primitive components fa-cilitates us in implementing a profile-based scheduler like the one based on conflict analysis of the earliest start time resource profile projection (for a detailed analysis see the ESTA algorithm in (Cesta, Oddi, & Smith 1998)). In TRF

terminology this implies including a component for each re-source in the problem and then inserting in an initial de-cision network the representation of the problem in form of the project graph with activities, temporal precedences among them and resource requirements for each of them1.

1Indeed we have endowed the TRFof an optimized

compo-nent calledmulti-resourceto more efficiently serve these problems, again showing the flexibility of the tool to serve different users needs.

Such a problem representation is then manipulated by a pro-file analysis procedure that return a set of conflict violations on the resource contention peaks (e.g., through sampling of minimal forbidden sets as in (Cesta, Oddi, & Smith 2002)) that are incrementally removed by posting precedence con-straints. To sum up the TRF can be easily enriched by a version of the greedy ESTAalgorithm that can be used to

populate the algorithms family on top of the TRF. It is worth observing that the ESTA-approach is also generically used to

detect conflicts among heterogenous components within the OMPS planner (Fratini, Pecora, & Cesta 2008). The possi-bility of dealing with actual scheduling decisions (like lev-eling a resource overcommitment) is in fact a key aspect in the planning and scheduling capability of OMPS.

Once defined the basic precedence-constraint posting scheduler we have further proceeded and defined a meta-heuristic procedure that uses the one pass ESTA heuristics

solver as the basic step. For example we have realized a variant of the iterative sampling procedure ISES described

in (Cesta, Oddi, & Smith 2002) and are able to solve rather challenging resource constrained problems with a good ef-ficiency and with performance in line with state of the art solvers in the area.

The TRF has been thought out as a generic development

environment. Other colleagues have developed schedulers for different goals: (a) some colleagues of ours (Oddi & Rasconi 2008) have created an implementation of theIFLAT

procedure introduced in (Cesta, Oddi, & Smith 2000) and then developed variants of the algorithm for carrying out re-search on scheduling on top of the TRF. At present, they have obtained competitive results on a new benchmark of 200 activities for the resource constrained problem; (b) other colleagues (Verfaillie & Pralet 2008) have synthesized a new scheduler and built an effective metaheuristic that solve huge instances of a real problem in the space domain as a case study within the APSI project.

Conclusions

In this paper we have presented our current work on timeline based planning and scheduling from a software architecture perspective. We have described the ideas underlying a ba-sic module, called the TRF, we have developed for support-ing timeline based reasonsupport-ing and shown how such a module can be used as a development environment for supporting both application oriented and research oriented work. The key concept we are trying to underscore concerns the rele-vance, in P&S research, of effective software development environments. The TRF described here is a Java

environ-ment based on the general concept of timeline. The reason we are trying to develop our own environment (instead of, for example, modifying the EUROPAdistribution (EUROPA

2008)) resides in our interest for a principled development of the architecture grounded on the layered ontology duced in this paper. In particular the generalization intro-duced with the concept of component and the description of heterogeneous domain in the decision network are interest-ing results contributed here to the general debate on timeline based planning and scheduling.

(8)

Our emphasis in the recent work has been to demon-strate the possibility of rapid prototyping in different direc-tions. This paper gives an overview of such capability. The steps that we are currently pursuing to extend the TRF con-cern three directions: (1) creating a more complete knowl-edge engineering environment developing tools for support-ing end users; (2) clossupport-ing the loop between plannsupport-ing and real-time execution by adding an exec layer to the timeline solver; (3) addressing the problem of coping with uncer-tainty adding capabilities of plan repair and plan adaptation by importing our previous work in scheduling (Policellaet al.2007; Rasconi, Cesta, & Policella 2008) and extending it to planning.

Acknowledgments. Authors are currently supported by

European Space Agency (ESA) within the Advanced Plan-ning and Scheduling Initiative (APSI). APSI partners are VEGA GmbH, ONERA, University of Milan and ISTC-CNR. We acknowledge the role played by our colleagues in our current effort: thanks to Federico Pecora for his work in OMPS, to Gabriella Cortellessa and Angelo Oddi for their

invaluable contribution to MrSPOCK, to Riccardo Rasconi for schedulers development and to Riccardo De Benedictis for his contribution to STRIPLINE.

References

Allen, J. 1983. Maintaining knowledge about temporal intervals.

Communications of the ACM26(11):832–843.

Allur, R., and Dill, D. 1994. A Theory of Timed Automata.

Theoretical Computer Science, ACM126(2):116–146.

Baptiste, P., and Le Pape, C. 1995. A theoretical and experimen-tal comparison of constraint propagation techniques for disjunc-tive scheduling. In Mellish, C. S., ed.,Proceedings of the

Four-teenth International Joint Conference on Artificial Intelligence,

volume 1, 600–606. Morgan Kaufmann.

Cesta, A., and Fratini, S. 2005. Controlling Complex Phys-ical Systems through Planning and Scheduling Integration. In

Proceeding of the 18th International Conference on Industrial & Engineering Applications of Artificial Intelligence & Expert Sys-tems, LNAI 3533, 197–207. Springer Verlag.

Cesta, A., and Oddi, A. 1996. DDL.1: A Formal Description of a Constraint Representation Language for Physical Domains. In M.Ghallab, M., and Milani, A., eds., New Directions in AI

Planning. IOS Press.

Cesta, A.; Cortellessa, G.; Denis, M.; Donati, A.; Fratini, S.; Oddi, A.; Policella, N.; Rabenau, E.; and Schulster, J. 2007. MEXAR2: AI Solves Mission Planner Problems. IEEE

Intelli-gent Systems22(4):12–19.

Cesta, A.; Cortellessa, G.; Fratini, S.; and Oddi, A. 2008. Look-ing for MrSPOCK: Issues in DeployLook-ing a Space Application. In

SPARK-08, Scheduling and Planning Applications woRKshop at

ICAPS.

Cesta, A.; Oddi, A.; and Smith, S. F. 1998. Profile Based Al-gorithms to Solve Multiple Capacitated Metric Scheduling Prob-lems. InAIPS-98. Proceedings of the4thInternational

Confer-ence on Artificial IntelligConfer-ence Planning Systems, 214–223.

Cesta, A.; Oddi, A.; and Smith, S. F. 2000. Iterative Flattening: A Scalable Method for Solving Multi-Capacity Scheduling Prob-lems. InAAAI-00. Proceedings of the17thNational Conference

on Artificial Intelligence, 742–747.

Cesta, A.; Oddi, A.; and Smith, S. F. 2002. A Constraint-based method for Project Scheduling with Time Windows. Journal of

Heuristics8(1):109–136.

Chien, S.; Rabideau, G.; Knight, R.; Sherwood, R.; Engelhardt, B.; Mutz, D.; Estlin, T.; Smith, B.; Fisher, F.; Barrett, T.; Steb-bins, G.; and Tran, D. 2000. ASPEN - Automated Planning and Scheduling for Space Mission Operations. InProceedings of

SpaceOps 2000.

CHOCO. 2008. Choco Project Web Site.

http://choco.sourceforge.net/.

Dechter, R.; Meiri, I.; and Pearl, J. 1991. Temporal constraint networks.Artificial Intelligence49(1-3):61–95.

EUROPA. 2008. Europa Software Distribution Web Site.

https://babelfish.arc.nasa.gov/trac/europa/.

Frank, J., and J´onsson, A. 2003. Constraint-based attribute and interval planning.Constraints8(4):339–364.

Fratini, S.; Cesta, A.; and Oddi, A. 2005. Extending a Sched-uler with Causal Reasoning: a CSP Approach. InProceedings of Workshop on Constraint Programming for Planning and Schedul-ing.

Fratini, S.; Pecora, F.; and Cesta, A. 2008. Unifying Planning and Scheduling as Timelines in a Component-Based Perspective.

Archives of Control Sciences18(2):231–271.

Jonsson, A.; Morris, P.; Muscettola, N.; Rajan, K.; and Smith, B. 2000. Planning in Interplanetary Space: Theory and Practice.

InProceedings of the Fifth Int. Conf. on Artificial Intelligence

Planning and Scheduling (AIPS-00).

Laborie, P. 2003. Algorithms for Propagating Resource Con-straints in AI Planning and Scheduling: Existing Approaches and new Results.Artificial Intelligence143:151–188.

Muscettola, N.; Smith, S.; Cesta, A.; and D’Aloisi, D. 1992. Co-ordinating Space Telescope Operations in an Integrated Planning and Scheduling Architecture.IEEE Control Systems12(1):28–37. Muscettola, N. 1994. HSTS: Integrating Planning and Schedul-ing. In Zweben, M. and Fox, M.S., ed.,Intelligent Scheduling. Morgan Kauffmann.

Oddi, A., and Rasconi, R. 2008. Iterative Flattening Search on RCPSP/max Problems: Recent Developments. Unpublished Manuscript.

Policella, N.; Cesta, A.; Oddi, A.; and Smith, S. F. 2007. From Precedence Constraint Posting to Partial Order Schedules. AI

Communications20(3):163–180.

Rasconi, R.; Cesta, A.; and Policella, N. 2008. Validating Scheduling Approaches Against Executional Uncertainty.

Jour-nal of Intelligent Manufacturing. DOI

10.1007/s10845-008-0172-7 (available on-line November 2008).

Smith, D.; Frank, J.; and Jonsson, A. 2000. Bridging the gap be-tween planning and scheduling. Knowledge Engineering Review

15(1):47–83.

Verfaillie, G., and Pralet, C. 2008. Modeling and solving the INTEGRAL mission long-term planning problem. Project pre-sentation at ESA-ESOC, July 23, 2008.

Verfaillie, G.; Pralet, C.; and Lemaitre, M. 2008. Constraint-Based Modeling of Discrete Event Dynamic Systems. Journal

of Intelligent Manufacturing. DOI 10.1007/s10845-008-0176-3

Figure

Figure 1: The layered implementation of the T RF . a good balance between general, domain independent
Figure 2: Decision Network.
Figure 3: MrSPOCK domain model.

References

Related documents

14 When black, Latina, and white women like Sandy and June organized wedding ceremonies, they “imagine[d] a world ordered by love, by a radical embrace of difference.”

For more information on crop irrigation, consult Agricultural Alternatives: Irrigation for Fruit and Vegetable Production and Agricultural Alterna- tives: Drip Irrigation

2 04 introduction 10 pyper 12 smula 14 touchstone 16 crystal 18 nazca 20 i forgiati 22 i pigmenti 24 rugiada 26 i velluti 28 le polveri 30 rifl esi 31 i gioielli 32 textura

Our im- plementation of AS-TRUST scheme using publicly available BGP traces demonstrates: (1) the number of ASes involved in violating the BGP behavioral assumptions is significant,

The results of the dynamic identification on the Z24 Bridge by means of a spectral-based method has been presented in this paper, pointing out how the dependence of outputs

cDNA pools generated from circulating EM28 ⫹ and EM28 ⫺ NY-ESO-1- specific T cells at different time points before and after vaccination as well as cDNA pools from NY-ESO-1-specific

The combination of trastuzumab with chemotherapy (anthracycline or paclitaxel) was active for the treatment of patients with HER2-positive metastatic breast cancer who had not

Additionally, the fact that coaching may encourage people to change careers, as seen in one of the quotes above, can provide benefits to the Organisation in that people who