Predit: a Temporal Predictive Framework E.Paolucci, E.Patriarca, M.Sem, G.Gini

From: AAAI Technical Report SS-92-01. Compilation copyright © 1992, AAAI (www.aaai.org). All rights reserved.
Predit: a TemporalPredictive Framework
for Scheduling Systems
E.Paolucci, E.Patriarca, M.Sem,G.Gini
Politecnico di Milano
Piazza Leonardoda Vinci 32
20133 Milano - Italy
Paolucci@ipmelLpolimi.it
Abstract
Schedulingcan be formalizedas a ConstraintSatisfaction Problem(CSP). Withinthis frameworkactivities
belongingto a plan are interconnected via temporal
constraints that accountfor slack amongthem.Temporal representationmustincludemethodsfor constraints
propagationand provide a logic for symbolicand numerical deductions.
In this paper we describe a support frameworkfor
opportunisticreasoningin constraint directed scheduling. In order to focusthe attention of an incremental
scheduler on critical problemaspects, somediscrete
temporalindexesare presented.Theyare also useful for
the predictionof the degreeof resourcescontention.
Thepredictive methodexpressed through our indexes
can be seen as a Knowledge
Sourcefor an opportunistic
schedulerwith a blackboardarchitecture.
1. Formalization of scheduling problem and
strategies for its solution
Schedulingcan be formalizedas a ConstraintSatisfaction Problem(CSP)[Kengand Yun, 1989]. This approachis concernedwith the assignmentof values to
variablessubjectto a set of constraints. In scheduling
variablesare constituted by activities start times and
fromresources allocation; for this reason wehaveto
deal explicitely with twotypes of constraints:temporal
relations amongtasks andresourcescapacity[Fox, 86].
In our approachweassumethat wehavea set of plans
to be scheduled,wherea plan is defined as a partial
orderingof activities. Eachactivity mayrequire oneor
more resources and for each of them there can be
alternative choices. Besideresources capacity can be
used contemporarly
by different tasks; for the sake of
simplicity wewill assumeall resources with unary
capacity.
Weare concernedwith the issue of howit’s possible to
focus the attention of an incrementalscheduleron the
mostcritical schedulingchoicesin order to evaluate
whichare the mostcritical points, whichdecisionsseem
to be the mostpromisingin reducingsearch complexity
andimprovingquality of resulting schedule.
Ourstrategy is to identify the most"solvable"aspects
of the problemthroughthe evaluationof the degreeof
interaction existing among
activities belongingto different orders. Theaimis to reducethe number
of steps
requiredto obtain a solution.
Thenecessity to overcome
the limits of partial decomposition approach,such as order-basedand resourcebased decompositions, has led us towards an
event-basedperspective whit chronologically-grouped
information.
This basic searchstrategy is realized throughmost-constrainedandleast-impactpolicies. Everystep is divided
into twoparts: first the rnost-constrainedpoliey
selects
dynamicallyon whichagent must be focused scheduling attention; then, the least-impactpolicy choosesfor
that agent a value whoseimpact on the rest of the
non-scheduled
agentsis as small as possibile. Thegoal
is the identification
of critical activitiesthat heavilyrely
on the possessionof highly contendedtemporalintervals or resourcesbecauseof intra-order andinter-order
interactions (look-aheadstrategy).
This two policies neednumericindexes which,analyzing the particular structure of a problem,are able to
measurethe interaction among
activities andresources
in terms of variable looseness and value goodness
[Sadehand Fox, 88].
Scheduling is an NP-hard problem and methodsrequiredfor its solution mustface this complexity.In our
research wedecidedto focusour attention on contribution in schedulingcomingfromAI, andparticularly on
opportunistic reasoning[Hayes-Roth,79].
1. This workhas been partially supportedby CNRPRF
Project and Maurogrants
140
Variable looseness is the measureof howconstrained
is a resource or an activity; value goodnessmeasures
whichvariable value, among
all the feasible ones, gives
the least impact (i.e. a sort of maximum
slack)
availability of feasible (and good)valuesfor non-scheduledvariables.
Weidentified somenumericindexesthat contain informationrequiredto realize an event-basedpolicy: these
indexesare usefulfor different reasons:
the>, makepossibleto point out critical resources
andactivities;
[] they identify "islandof certainty" that will be a
part of problemsolution;
[] an internal bound(INT), whichrepresents the
minimuntime interval whichmust separate the
endof the first lapse fromthe beginof the second
of tworelated lapses;
[] an external bound0EXT),whichrepresents the
maximum
time interval fromthe begin of the first
lapse to the endof the second.
n they give informationaboutactivities start times
that havethe least impacton non-scheduled
activities.
This behaviouris a sort of "oppommisticreasoning"
[Hayes-Roth,79]: this term has been used to characterize a problem-solvingprocess wherereasoning is
consistently directed towardsthose actions that appear
mostpromisingfor solving a problem.
Throughthese two parameters it’s possible to model
any temporalrelation in a schedulingproblem.Theyare
simplerthan thirteen Allen’sprimitiverelations; moreover, INTand EXTimprovegreatly the efficiency of
numerictemporalreasoning, that is instead a limit in
Allen’sprimitive.
Ourpredictive approach,used together with an opportunistic reasoning,is also usefulto detect unsatisfiable
CSPsas soon as possible, simply by analyzing the
indexes wedefined. In this sense the system can be
viewedas a Knowledge
Source in a blackboardarchitecture, whichassumesresponsibility for preventive
analysisof activities interactionsandfor the detection
of prospectivebottlenecks.
3. The Predit indexes
Temporal
relation constraints are usedto describepartial orderingsamong
activities as providedby the process planningstep.
2. The predictive approach: basic assumptions
Themaingoal of our research wasto provide a simple
but completeinference mechanism
to support scheduling, workingin a discrete time domain.This mechanism
is basedon someindexesand is designedto performan
a-priori guidancefor search in schedulingdomain.We
kept a particular attention on the efficiencyandon the
speed of such a mechanism,becausewerealized that
such propertiesare necessaryin schedulingsystemsfor
real applicativeenvironments
like, for instance, manufacturing ones. For this reasonwedecideto considera
discrete representationof time instead of a continous
one.
Wehaveto schedulea set of activities (A1,A2
..... AN).
Let Ik be the timeinterval associatedwithAk.Activities
are connectedby a set of temporalrelation constraints,
thereby forming a TCG.Weview TCGsas undirected
graphs. AnArc in a TCGindicates the presence of a
temporalrelation betweentwo intervals representedby
the coupleINT-EXT
(Fig. 1).
Wewill refer to the graphdefinedby these constraints,
for a given CSP,as the CSP’sTemporalConstraint
Graphs O’CG).
Ai
I
I
ETi
STi
Aj
Ourindexesare basedon the constraints analysis (and
on the propagation of the temporal ones) and on
particular representationof existingtime relations.
In terms of constraints analysis wedifferentiate betweenrestrictions and preferences[Fox, 86]. Temporal
preferencesare representedthroughutility functions
definedon activity start timesthat mapspossiblevalues
onto utility levels rangingfrom0 to 1. Moreover
in our
analysis we consider the existence of intra-order
(among
activities belongingto an order) andinter-order
constraints (among
activities belongingto different orders).
Themodeladoptatedin representing time and in reasoningabout temporalrelation is basedon the concept
of lapse, that is definedas the periodof time associated
withan activity. In a temporalaxis a lapseis represented
by two temporalparameters,namelystart time and end
time. Relationsbetweendifferent lapses are expressed
by twoparameters[Paolucci, 90]:
141
Figure1
Additionallythere are capacityconstraints limiting the
use of eachresourceto onlyoneactivity at a time. The
next examplepresents a simple case of a TCGcomposedof two orders.
In order to providea predictivesupportfor opportunistic schedulersoperating in a discrete time domainwe
have consideredinteractions amongactivities caused
by temporalrelations.
Thefirst issue wefacedwasto detect as soonas possible
duringthe schedulingthe possiblearising of conflicts
dueto interactions among
activities.
For tiffs issue wedefinedan index called
D.ggr.~(CD),whichmeasuresthe howtight is the link
existing betweentwo generic activities Ai and Aj connectedby a temporalrelation constraint (representedby
INT-EXT)
in a contraint graph.
To sumup, the CDindex detects (following the mostconstrainedpolicy)the mostcritical activities withrespeet to intra-order temporalrelations (expressedby
INTand EXT)and to temporal windows(expressed
activity start andendtime).
The second index, called Preferential Start Time
(PST), is a local measureof value goodnessand globally, a measure
of variableloosenessfor activities start
times. It helps in choosingamongall admissiblestart
[1]
Di + Dj +/Nr ~ ~j - sri
times the one that minimizesfuture conflicts. It is
calculated betweeneachpair of activities connectedin
[2]
Di + Dj + INT ~
the TCG
(i.e. AiandAj) andit dependson the start time
of
the
first
activity(i.e. sti).
Thefirst inequalityverifies that time interval composed
of activities durationsandInternal Bound
is includedin
The main goal of PSTindex was to introduce some
maximum
temporal windowallowed by Aj latest end
estimationrule for activity start timesin orderto identtimeandAiearliest start time.
ify the least impactvalues arising from intra-order
interactions.
Thesecondinequalitycontrols that the sametime interval doesn’tviolate ExternalBoundtemporalconstraint.
PSI’ indexis computed
for everyactivity start time sti
These inequalities lead to define the CDformula
evaluatedbetweenearliest start time (STi), or value
througha multiplicationof their members:
allowedby INT-EXT,
andlatest start time (ETi-Di),
valueallowedby INT-EXT,
increasingsti with the fixed
timeunit.
2
( Di* +( Di+
PSTis expressedby the ratio:
ETi- INT)
S~ )
[31 CDij- EXT
Temporalrelations betweenintervals maysimply be
expressedby using potential inequalities associated
with the boundsof intervals suchas :
O <CO~i < l
[4] PSTij( sti )
Dk = Akduration INT= internal boundbetween Ai and Aj
"intii( sti )
EXT- Di - Dj - INT
o <_ PST
O(st~)<_1
STk= Akstart time EXT= external boundbetweenAi and Aj
ETk= Ak end time
where:
= intij(s~ ) = relative internal bound
The Constraint Degreeis calculated on the notion of
slack betweentwoactivities tied by temporallinks.
= EXT-Di-Dj-INT
= maximum
slack between the
activities
= CDij = 1 meansthat Ai allows no slack to Aj
(mostconstrained)
Thenumeratoris calculatedfor sti valuesfromEarliest
Start Timeto the maximum
allowed by temporal constraints, increasingeachtimesti witha chosentimeunit.
It maybe also consideredas "actual" slack betweenthe
twoactivites corresponding
to sti value.
=
CDij= 0 meansthat Ai allows maximum
slack to
Aj.
The CDcomputational algorithm considers all connectedactivities fromthe beginningto the endof the
graph.Therefore,for endingactivities weset CDindex
to zero (endingactivities are not constrained,with temporal relation, withanyother activity in the graph).
The validity of CDindex is preservedby a previous
optimizationprocedurein orderto adjust activities temporal windows
cutting out start time values that can
never be involved in CDcomputation(the same is
madefor other indexes).
142
Therefore, the denominatormaybe viewedas the maximum
slack betweenthe two activities. Thecloser is
PSTijvalueto one, the greater is the slack betweenAi
andAj. Therefore,for a generic activity PSTmeasures
for eachadmissiblestart time its goodnessandlikelihoodto minimizefuture schedulingconflicts.
To computeactivity Indlvidnal Demandfor resources,
wehave combinedthe value goodnessof every start
time (expressedby PST)with the activities durations.
Moreover,as assumedin [Sadeh-Fox,88], an activity
Aican use a resourceRjif Ai is active at timet andAi
usesRj at timet to fulfill its resourcerequirement.
Fromeach PSTgraph we achieve an Individual Demandgraph (whosevalues are expressed by ID index)
for each activity, expandingPSTvalues with a lapse
equalto the activity duration andaddingall valuesin
function of time. Weobtain a histogramrepresenting
activity resource demand
in function of time.
Individual Demandvalues are combinedto measure
resource Ag~egateDemand(AD), always in function
of time. ADshowswhenresource competitionis particularly high andwhichare activities that heavilyrely
in the possessionof these resources. ADvaluesmustbe
tightly evaluatedin function of time becausetemporal
consa’aint propagationdoesn’t allow for any resource
preference(as explainedbefore, weassumeall resources with unary capacity). Therefore, ADindex can
estimate the amountof contention for each resource
overtemporalaxis but only as a functionof start time.
Moreover,it’s easy to improvethis approachrepresenting, for example,resourcespreferenceswith utility
functionsand propagatingthese resourcesreservations
through the TCGgraph.
AD Resource
R3
AD
10 -
10
4"
"4
2-
-2
0
--
,
10
,
20
,
30
,
40
Time
,
rio
,
70
¯
00
0
60
Figure3
Psi
a7 Order
2
Pit.
j
0.3.
’ ’ ’0;2:1
..’ ...................................... O;2~IF’
O.~,
................................................
0,25¯ ""
~
0,2t
0,21
0,16
0.16
0.100’2
,’
Figure2 showsa simpleexamplein order to illustrate
our graphic results concerningtemporaldiscrete indexes presented above.
0.1"
0,05-
10
12
1.4
16
10
20
22
24
23
20
-qO
Time
Figure4
Next results are concernedwith the reasonablesteps
that an OpportunisticSchedulershouldachievein order
to producethe final Ganttchart.
Order
2
lpo
A1
0,25
A2
0,2
A3
0,2
A4
0.182
A5
0
Table1: CDvaluesfor order 1 activities
A6
0,25
Figure2
Thetemporalconstraint associated at each linker is
equalfor all coupleof activity andit is expressedby
INT=0and EXT--40.However,these values maybe
optimizedas described
before.
Start Timeand EndTime are expressed by numbers
aboveeach activity andthe sameis madefor requested
resources.For the sake of simplicity,in this example
we
havenot introducedpreferentialstart times(so activity
start timesare equallypreferred).
143
A7
0,25
A8
0
Table2: CDvaluesfor order2 activities
Amongthe aggregate demands,the most highly contendedresourceis R3(fig. 3), required by A2,A3,A4,
A7;the nextactivities wewill focusour attention onare
A4, A3and A7(becauseA2has an alternative in R1).
Takinga look at the CDindexesof order 1 andorder 2,
A7appearsto be the mostconstrainedactivity because
of its highest CDvalue. Now,A7PSTgraph (fig. 4)
presents a maximum
for t=20 and scheduling A7with
st=20 wecan assign the resourceR1to the activity A2
at the samestart time.
predictive supportin an opportunisticschedulingsystem.
The same considerations based on temporal indexes
evaluationallowthe identification ofotheractivitypreferential start timesleadingto the Ganttchart presented
belowin fig. 5.
Weimplementedthis model in a MS-DOS
environment
with a particular attention towardsspeedperformances.
Ourexperimentsindicate that our approachis successful in supportingopporumisticscheduling.This system
is very efficient (it takes fewsecondsto calculate indexesin non-trivial real problems).
Ourmodelseemsto be highly appropriatefor problems
wherethe costs of backtracking
is highbecauseit’s able
to point out scheduling decisions that will minimize
intra-orderandinter-orderconflicts. It increasessignificantly the performances
of an opportunisticscheduler,
makingit possible to introduce such a tools in real
applications.
GANTT CHART order I
o 5 to ,s ~o 2~ so 35 40 ,5 ~o 55
GANTT CHART order 2
6n iS5 ?0
Moreoverthe policies used by Predit to control the
solution search(mustconstrainedandleast impact)can
be used also in dynamicmanufacturingenvironments.
Weare developing
our researchin this sense, also trying
to support reactive scheduling and to managemultiagent productioncontrol systems.
[--rf---]
0
5
I0
15 20 I~5
30 35 40 4 l~
50 61~
60 65 70
’rtme
Figure5
Thequality of a scheduleis basedon the capability of
the schedulerto satisfy a set of performance
measures.
References
[Fox, 1896], FoxM., Observationon the role of constraints in problemsolving, ProceedingsSixth Canadian Conferenceon Al, Montreal,1986.
Moreover,a satisfiable schedule is always a com[Hayes-Roth,
79], Hayes-Roth
B. et al., Modeling
planning as an incrementalopportunisticproblem,Proceedpromisebetweenthe attempt to meet performancerequiredandthe necessityto respect all its constraints:
ings 3rd lJCAl, Tokio, 1979.
schedulequality mirrors this trade-off. Eachset of
[Kengand Yun,89], Keng.N. and YunD., A planning
organizationalconstraints has its effects on final proscheduling
methodologyfor the constrained resource
duetion schedulesand, followingthe CSPformulation,
if wechangethe constraints the solution will change problem", ProceedingsIJCA11989,pp. 998-1002.
tOO.
[Paolucci,90], Paolucciet. al., "CRONOS-III:
requirements
for
a
knowledge-based
scheduling
tool
covering
In order to improveschedulequality, our research is
a broad class of production environments",in Expert
focusingon the evaluationof whichimpactmighthave
an unexpectedevent on the resulting solution. PREDIT systemsin engineering,G.Gottloband W.Nejdl(eds.),
approach
through theevaluation
ofdiscrete
temporal Springer-Verlag,1990.
indexes
produces
relatively
accurate
early
predictions
[Sadehand Fox, 88], SadehN. and FoxM., Preference
ofactivities
behaviour
assoon
asPREDIT
receives
their propagationin temporal capacity constraint graphs,
changes
andaslongasconstraints
remain
constant Technical report CMU-CS-88-193.
during
indexes
computation.
Theability
toreact
to
changes
thatoccur
indynamic
environments
providing
a feasible
solution
ina sufficiently
short
time
isvery
important
cxpecially
inmanufacturing
scheduling
domain.
4. Concluding remarks
Theapproachwepresentedin this paperconstitutes the
basis for integrating an event-basedmechanism
and a
144