European Computer-lndustry Research Centre (ECRC) ... CHIP is a new constraint logic programming language combining the declarative aspect of logic.
PROBLEM SOLVING THECAR.SEQUENCING INCONSTRAINT LOGICPROGRAMMING M. Dincbas,H. Simonis,P. Van Hentenryck Centre(ECRC) European Research Computer-lndustry Arabeltastrasse 17,8000Muenchen 81, F.R.Germany
Abstract CHIP is a new constraintlogic programminglanguagecombiningthe declarativeaspectof logic programming In the presentpaper,we showan withthe efficiency of constraintmanipulation techniques. in car problemwhichoccursin assemblyline scheduling application of CHIPto the car-sequencing lor manufacturing. Thisproblemis highlycombinatorial and hasbeenpresentedrecentlyas a "challenge" (Al)systems.We presentthe approachtakento solvethis problemin CHIPandgive ArtificialIntelligence some computational resultsfor differentconfigurations.lt is shownthat CHIP providesnot only the greatlythe problemstatement butalsothe flexibilitywhich froman Altoolby simplitying canbe expected efficiencywhichallowsto solvelargeassemblyline problems.This efficiencycomeslrom the abilityof to prunethe searchspacevery early. CHIPto use numericalandsymbolicconstraints
2
1. Introduction Mostof thembelongto the classof NPsearchproblems. Manyreal-lifeproblemsare constrained for a by Prolog,providesa powerfullanguage as examplified completeproblems[8]. LogicProgramming, declarativeformulationof these problems.lts relationalform and logicalvariablefeaturesare very liberatesthe user computation defininga problem.lts non-deterministic adequateto statethe constraints basedon the of this searchprocedure programming. Howeverdueto the inefficiency fromthe tree-search languageslike Prolog[20] havebeenuseduntilnowto paradigm,logicprogramming generate-and-fesf solveonly"toy"problems. Constraintprogrammingtechniqueson the other hand provide powerfulmechanismslike local propagation [6, 13,14] or forwardcheckingand lookingahead[9] (see [19,21], networkconsistency 12,Zglfor a surveyof this approach).Thesetechniqueshave been used in some systemsto solve problems[12, 5]. combinatorial with constraintprogrammingtechniquesis then very The idea of combininglogic programming appealing.Extensivework has been conductedin this direction during the '3st three years insidelogic of theseextensions ['f, 2, 3, 10,11,17,22,29,241.Thegeneralideabehindthe introduction andthe to solvenumericalconstraints tools(like simplex) programming is the use of somemathematical in order to solvesymbolicconstraints techniques checkingand constraintpropagation useof consistency to prune the search space in an a priori way, insteadof using them as tests as in the case of generate-and-test. language,CHIP,to the of suchan extendedlogicprogramming In this paperwe showan application problem.lt consistsof schedulingcars in an assenbly line. The problem so-called"car-sequencing" comesfromthe factsthatcars mayrequiredifferentsetof optionsandthatthe assemblylinehascapacity constraintson lhese options.This problemhas been recentlytackledwith theoremprovingand expert was that systemtools withoutmuch success[15,16]. The authors'conclusionaftertheir experiments thesetools are not adequateto solvethe problemlor morethan 10 cars or so. More generallythey claimedthat Al techniquesare of no use for this problem.This papershowsthat a particularAl tool, of the statement languageCHIP,enablesnotonlya declarative namelythe constraintlogicprogramming o/o problembut alsoan efficientresolutionof it. Problemswith 200 cars and 90 resourceutilizationhave time of the point is lhe very shortdevelopment been solvedwithina few minutes.Anotherinteresting CHIPprogram(abouttwo days). corresponding ln the following,we first give a briefoverviewol CHIPwherewe introduceinformallynumericaland usedto solvethe problem.We thenpresentthe car sequencing symbolicconstrainthandlingtechniques problemwhich is solvedin two steps. ln the first step, all the constraintsdefiningthe problemare computedwitha standardPrologprogram.In the secondstep,we searchfor a leasiblesolutionsatisfying
3 andsolvedin We showon a smallexamplehowthe problemis formulated the constraints of theproblem. resultsfor largeexamplesare then presentedshowingthe adequacyof the CHIP. Computational approach.
2. Brief Overviewof CHIP languagedevelopedat ECRC. Handlingln Prolog)is a conslraintlogicprogramming CHIP(Constraint of constraintsolvingtechniques.lt differs It combinesthe declarative aspectof Prologwiththe efficiency languages by its "active"use of constraints fromthe usuallogicprogramming [{ thal enablesit to avoid the combinatorialexplosion.Besidesresolution,CHIP uses a new reasoningparadigmbased on constraintpropagatianactivatedby demons. Sincethis paradigmis embeddedin a logic programming problemscan be easilyaddedwhennecessary. language,heuristics specificto particular CHIP allowsto handleboth numericaland symbolicconstraintsusing consistencycheckingand lt also providesother advancedfeatureslike booleanunification, constraintpropagationmechanisms. purposes.Withthese predicates lor optimization demonsand higher-order delaymechanism, specialized scheduling we havesolvedin CHIPseveralreal-lifeproblems,for instancedisjunctive extensions, [4] or to specificprogramswrittenin procedural diagnosisof digitalcircuits[18],with an efliciencycomparable languages. of The recentworkin the Prolog-lll[1] and CLP(R)[11]projectswhichare aimingat the introduction can be relatedto CHIP.Besidessome numericalconstraintsolvinglechniquesinsidelogicprogramming CHIPdiffersfromthesetwo systemsmainlyby puttingthe emphasison discrete technicaldifferences, numericalconstraintsand providingmore generalconlrol mechanisms(dennndriven computation, handling. propagation) thatcan be alsousedfor symbolicconstraint checkingandconstraint consistency In the followingwe will brieflypresent(throughexamples)two aspectsof CHIPwhichare especially problem: numericalconstrainthandlingand symbolic used in this paperto solvethe car-sequencing constrainthandling. 2.1. Numerical Constralnt Handllng (noted?S=(, 4, ;'= , >) on ln CHIPwe can dealwith linearequations(noted3s =) and inequations is expressed as (bounded)naturalnumberst3l. A linearinequality >= b1*Yl+ ..' + br'Y. ar*X,+ ..' + an*Xn
(i.e' where ai's and b,'s are constants(naturalnumbers),and X''s and I's are domain-variables is Thiskind of discretenumericalconstraints variableswith a boundeddomainin naturalnumbers)[22]. We give an example handledin CHIPby reasoningaboutvariationintervalsand constraintpropagation. X and Y with domain {0..9}.Supposethe in the following.Supposewe have two domain-variables
4
lollowinginequalities hold (1) 2'X+3'Y ==4
From the first inequalityCHIP deducesthat X =< 3 and Y =< 2. These new constraintsare propagated into the secondinequalitywhich givesX >= 2 and Y >= 1. Thus the domainsof the variablesare reduced respectivelyto {2,3} and {1,2}. This kind of consistencychecking and constraint propagationreduces drasticallythe search space. This pruning is carried out for handling numericalconstraintsin the carsequencingproblem.
2.2. Symbollc Constraint Handling Partof the originalityof CHIP is the handlingof "symbolb"constraints.As in the caseof numerical constraints,they are used in an "active"way. Indeedthe consistencycheckingand conslraint reasons, for efficiency propagation mechanisms can be appliedon anylogicprograml24,23l.Obviously, shouldbe built-in.We will showheretwo of themwhichare usedin this somefrequently usedconstraints problem. paperfor solvingthe car sequencing in CHIPis constraint usedsymbolic Oneol the mostfrequently element(N,L,V) The meaningof this predicateis thatthe whereN andV are domainvariablesand L is a listof constants. ln and lunctionalconstraints. Nfr elementof the list L is V. This predicateallowsto expressconditional lact it is not only seen as a functionwhichgivesthe valueV when N is known,but it is treatedas an betweenN andV thrcughL. When whichmakesa correspondence "adirectional" dernondrivenconstraint propagated ontoV (resp.ontoN). We a newconstraintis addedonto N (resp.ontoV), it is immediately willseethison an example.Supposewe havetheconstraint 1,4],C) element(X,[5,3,9, we get a When,duringthe conputation, Thedomainsof X andC are respectively {1..5}and{1,3,4,5,9}. propagated by "element"whichgivesX * 2 andX+ 4. The domains constraintC >= 4, it is immediately we get a newconstraintX =< 3 then of X and C are now{1,3,5}and {4,5,9}.lf, furtherin the computation, this "elemenf'willbe awakedreducingthe domainof X to {1,3} and lhat of C to (5,9}. This kind of is the basisof the CHIPlanguage. constraintpropagation demon-driven usedin this paperis The secondsymbolicconstraint LIST,VAL) atmost-NB-of-LIST-equaho-VAL(NB, The meaningof this where NB and VAL are naturalnumbersand LIST is a list of domain-variables. predicateis that at most NB elementsof the list LIST havethe value VAL. As before,this symbolic constraintis usedin an "active"way in the sensethat whenNB elementsof LISTare boundlo VAL,this
5 of LIST. elements of the remaining fromthedomains removed valueis immediately of this symbolicconstrainthandlingtogetherwith the numerical ln the following,the application problem. of thecar-sequencing andthe resolution processing willbe shownon thedescription constraint
Problem 3. The Car-Sequencing Statement 3.1.Problem by thefactthatthe carsproducedin a singledayon a The manufacture of autonpbilesis characterized eachcar may requirea slightlydifferentset of options.For singleassemblyline are not homogeneous: whileanotheronecan requireFM stereoradio' instance, one car mightrequireairconditioning lt is unreasonable to requirethat the assemblyline movesslowlyenoughto alloweveryoptionto be put on everycar. Instead,the line hasto be designedin sucha way that it can handlea predetermined ratioof carsfor eachoption.Let us takean examplefrom[15]to illustratethis point.Assumethatfewer Assumefurtherthat the cars are than 60 % of the cars orderedare requiredto haveair-conditioning. stationin the movingthroughthe line at sucha ratethat five carswill passthroughthe air-conditioning on 50 % of on onecar. In orderto be ableto installair conditioning timeit takesto installair-conditioning teamsat the station.As a car requiringair mnditioning to havethreeinstallation the cars,it is necessary passesthroughthe frontof the air-conditioning station,an availableteamwill startworkingon it, walking alongwithcar untilit reachesthe endof the station.At thispoint,four morecarswill havepassedthrough the othertwo teamswill be ableto handle the stationentrance.lf anytwo of themrequireair-conditioning, the stationwill be unableto reactfast the load. lf, however,a fourthcar requiresan air-conditioner, .3 enough.Thereforewe can say that the assemblyline has a capacityconstraintof out of 5" for air conditioning. Nowwe are in positionto definemorepreciselythe problem.We are givenan assemblylinewith a set definedby an of possibleoptionsfor the cars.Foreachpossibleoption,the linehasa capacityconstraint, a givenoptioncanoccuron the line.We are alsogivena setof integerratio,whichtellsus howfrequently carsto be runthroughthe lineand,for eachcar,the set of optionsto be installedon it. The assemblyline sequencingproblemconsistsin linding a schedulingof the cars in such a way that the capacity are satisfied. constraints 3.2. Problem Descrlption and Resolutlon in CHIP The car sequencingproblemis solvedin CHIPin two steps.In the first step,cars are clusteredinto deliningthe classes(eachclasscontainingall the carsrequiringthe sameset of options)and constraints problemare generated.In the secondstep a solutionis searchedsatisfyingall the constraints.In the are generated. that classesare computedand constraints following,we will skipthe first stepsupposing
6 andsolvedin CHIP. Wewillexplainon a smallexamplehowtheproblemis formulated on carsandoptions. Table3-1givesthe requirements Wetakean example with10carsand5 options.
classes option_1 option_2 option_3 option_4 option_5
1 0 1 1 0
0 0 0 1 0
n 1 0 0 1
0 1
0 1 0
1 0 1 n 0
1 1
0 0 0
nb of cars
TableS1: Datalor the carsandoptions the Fromthis tablewe see that the 10 cars havebeenclusteredinto 6 differentclasses.Concerning optionsfor each class,a "1" meansthat this classrequiresthis option,and a "0" meansthe contrary. the options1,3 and4. The capacity Thus,for instance the firstclass(whichhasonlyone car)requires constraints are givenin thefollowingtable. I option_1 | option_2 | option-3 | option-4 | option-S I lloutol2 | 2outof3 | loutof3 | 2outofs I loutof5 I Thesetwo tablesgiveallthe dataaboutthe problem.We will see nowhowto formulatethe problemin line. in the assembly for "slots",i.e.positions 51,...,516 10domainvariables CHIP.Wefirstintroduce I Sr I Sz I Ss I Sl I Ss I Se I Sz I Se I Sg I Sro I
of The domainof S,'sis {1..6},i.e.the ditferentclasses.The problemis thenfindingan assignment One can see that the complexityof this problem,i.e. the classesto the slotssatisfyingthe constraints. In the generalcase,givenN cars(i.e. withdomaint1..61). sizeof the searchspace,is 6101t0variables problem of the car sequencing slots)whichcan be clusteredin M differentclassesthe intrinsiccomplexity of carsin classes.Thisavoidsto considerredundant of the clustering is MN. Herewe seethe advantage solutionsdueto the perfectsymmetricroleplayedby the cars requiringthe sameoptionset.Witftoutthis of the problemwouldbe NNinsteadol MN. notionof class,the complexity of the problem.Indeed, in the formulation The clusteringof cars intoclassesinducesnewconstraints sincethe numberof cars in eachclassis fixed,lhis shouldbe takenintoaccountwhileassigningvalues For instancefor our problem,among10 slots,one mustbe (i.e. classes)to the slots(i.e.positions). we will use the abovementioned assignedto 1, two to 3, etc. To expressthis kind of constraints,
7 predicateatmost-N}-of-LlST-eguatto-VAL. Let NC* denotethe numberof cars in the kthclass.The predicate B_ol_LlST_equalto_VAL(N C1,[S1,...,S16],k) atmost_N we will shouldbe equaltok. Sincethereare6 classes, expresses thatat mostNC*of theslotsSr,...,Sro have6 constraints of thatformin the program. on the options.We introducevariablesO',, Nowwe will see howto lormulatethe capacityconstraints interpreting themas for eachoptioni andeachslotj. Wetakethedomain{0,1}forthesevariables j = Oi.i '' 1, if the slot hastheoptioni, and = 0. othenalise. we have50 variables of thiskind.Wewillusethese Sincewe have10 slotsand5 optionsin our problem, are in the that theseconstraints variablesto expressthe capacityconstraints on the options.Remember lorm "at mostM slotsout of N can havethe optioni", i.e. at nrostM carswiththe optioni can occurin a of thetype constraints by the numerical sequenceof N cars.In CHIP,thiscanbe expressed Oi,;+Oi,;*r+ ...+ O;,;*p=< M
forl=1 to 10-N
Forinstance, for the optionnumber2 we havethefollowing8 inequalities O z , t+ O z , z +O z 3 = . 2 Oz,s+ O2,,4=.2 Qzi.,z* Oz,e+ Oz,s+ Oz,to=.2 is N-N,+1,where "M,outof N;",the numberof suchinequations Foran optioni withthe capacityconstraint for option1, 8 for option2, N is the numberof slots. Thus,in our presentproblem,we have9 inequations 8 for option3, 6 for option4 and6 for option5, i.e.37 in total. relatingthe optionvariablesO;,;to problemconcernsthe expression of constraints The lastdescription of the optioni in the sloti. Foreach the occurrence the slot variablesS;. Rememberthat O,,,represents of optioni, we knowits occurrencein eachclassk, but not in slots. Let Li denotethe listof occurrences (i.e.theoptionnumber1 occursin the we haveL' = [1,0,0,0,1,1] the optioni in allclasses.Forinstance, between to makethe correspondence classes1,5and 6 but not in 2,3 and4). Herewe needa constraint predicaleelement.Sincefor eachoptioni the Oi,i,Si and L,.Thiscan be achievedby the abovementioned list L, is known,the constraint element(S;,L1,O;,;) expressesexactlywhatwe want.lf S, is boundto k (i.e.the kthclass),thenO,,,is boundto the kh element thevalueof S, is known is notonlyusedto givea valueto O,,;when of the listL,. ln CHIP,thisconslraint but also, and especially,to propagateadditionalconstraintsfrom S; to O;,;and vice-versa(see the the searchspace.Sincewe have10 slotsand 5 options,we previoussection).This reducesdrastically
I to slots. options willhave50 constraints of thistyperelating 37 linear The above presented93 constraints,i.e. 6 of type atmost-NB-of-LlST-equalto-VAL, of the presentproblem.Theycan be usedto inequalities and50 of typeelementdelineallthe constraints solvethe problemtogetherwith a labelingprocedurefor slot variablesSi. W" give in the followingthe programin CHIP.Notethat in the actualprogram,these constraintsare sketchof the corresponding generatedin thefirststep. automatically prog(Sx,Ls) :car_sequence (Sx, Ls) , Iabeling(Sx). ?- domain car_seqgence(1..6,_) :car_sequence(Sx,Ls)
.
S x = [ S r r . . . , S 1 g l, Lg = [Lrr...rl,5l, atnost_NB_of_LlST_equalto_VAl
(1' Sr, 1) '
adogt-lra-of-LlsT-equalto-VAl
12, S=, 61,
eIa;rpnt
(S1, Ll, Or, r) ,
eierent
(51, L5, os. r) ,
::: g t a r n a r r g ( S 1 6 ,L 1 , 0 1 , 1 9 ) , eienent
(s10, I,s, os, ro),
or,r * or,, =( 1' or,g * or,ro =( 1, ::: os,r * os,zt os,s * os,l * os,s 4
1,
o s , e * o s , z * o s , e * o s . g * o u , r o= ( 1 ' putsdownthe constraints of the problem,andthe fn the aboveprogram,the predicatecar_sequence tabelingprocedureassign values to the variablesS, whose domain is {1..6}. L''s are parameters of the labelingpredicateis leftto the programmer. computedin the firstpartof the program.Thedefinition A simplewayto defineit in the presentcaseis Iabeling(tl). :labeling([xlY]) r r e r n b e r( X , [ 1 , 2 , 3 , 4 , 5 , 6 l ) ' Iabeling(Y).
labelingprocedures arepossiblein CHIP(ct.[4])' Othermoresophisticated to add someredundant To achievea goodbehaviourof the programlor largeexamples,it is necessary Theywill allowfailuresto be detectedearlierin the search.The ideais thelollowing.Suppose constraints.
9 we have N cars to schedule,M of them requiringa certainoption.lf the capacityconstraintfor that particularoptionis M, out of N,,then we knowthat the slotsfrom 1 to N - N' mustincludeM - M' cars requiring thisoption(seebelow). =(Mi
)=M-Mt
t_l N-Nr
1
Othenriseit wouldnot be possibleto scheduleallthe cars requiringthis optionsincewe can onlyput easilyin CHIPby statingan inequality can be expressed M,of themin the lastNi slots.Sucha constraint thisoptionfor eachslot,i.e. constraint on the variablesrepresenting Or+...+Oll-N,t=M-Mi
G e n e r a l i z i n g t h e a r g u m e n t , w e c a n c o n c l u d e t h a t t h e s l o t s f r o mm l t uo sNt -i n k 'cNl ui d e N - k * M i * cars requiringthis optionfor all naturalintegerk suchthat N - k Mi is greateror equalto 0. A simple lt will improve CHIPprogramcan be written,whichgeneratesfor eachoplionthesesetsof constraints. failuresas soonas possible. of the basicprogramby detec{ing the efficiency drastically Let us seethe behaviorof this improvedprogramon our 10 slots,5 optionsproblem.In the beginning, all the constraintsare suspended.Whenwe assignthe first value 1 to the first slot variableSt, the propagation reducesthedomainsof the otherslotvariablesto immediately mechanism s2={2..4}, S3={2..4,6}, s4=s5=s6=s7=s8=ss=s1 O={2..6} variables Afterthe assignment of the secondvariableS, to its firstpossiblevalue,i.e.2, all the remaining gettheirvalues 59=6,S4=3,S5=5,56=4,S7=4,S8=5,S9=3,519=6. ! lf we ask to tind all the Thusthe problemis solvedwith just two choicesandwithoutany backtracking time is 0.5s.for findingthe first solutions,the programfindsthe 6 solutionsot the problem.The execution withthetimesgivenin [15]and (onSUN3/160). Thisshouldbe compared and3s.for allsolutions solution problem:35 min.usingITPand15 min.usingOPSS! [16]fora smaller(5 slots,5 options)
results. 3.3.Gomputation on large ln orderto estimatethe efficiencyof our approach,we haveperformedseveralexperiments problemsetswhichare nowreported. was that the assemblyline supportedlive differentoptions of our experiments The basicassumption 1 out of 2,2 outof 3, 1 out of 3, 2 out ol 5 and 1 out ol 5. Given with the followingcapacityconstraints: of the problemwere stillfree:the numberof carsdenotedby N, the severalparameters this assumption,
10 particularrequirementsof the cars and the percentageof utilizationof each option unit. ln our experiments, N has beenvaryinglrom 5 to 200, randomdata has beengenerated for the utilization percentageand the optionsrequiredby lhe cars.This randomgenerationhas beendone in a way to achievean overallpercentage of utilization of the resources.Typically,we ask for an overallutilization percentageof 70 "/" or 8A % but experiments have shownthat it is possibleto lurtherincreasethis percentage' Foreachsuchexperiment, we generatedlargesampleof data(around100). WhenN is smaller( . 50),the programlindsa solutionin a few secondsandgenerally withveryfew backtracking il any. WhenN is equalto 50, the scheduling timeis in averagearound15 seconds.Onceagain,veryfew backtracking are necessary to reachthe solution.
N
c
o/o-1
To'2
%-3
"/"4
%-5
CPU-Time
100 100 100
24 24 21
72 74 84
72 75 68
72 100 75
67 90 60
7A 60 75
52 sec. 58 sec. 56 sec.
Table3'2: 100hundredcarsscheduling witharound70 o/ool optionsutilization When N is equal to 100, the averageschedulingtime is less than 1 minutewhen the utilization percentageof eachunit is around70 "/o.Table3-2 reportssometypicalresults.The first columnis the numberof cars,the secondcolumnindicatesthe numberof differentclassesof cars (i.e.cars requiring the sameoption),the nextfive columnsindicatethe utilization percentage of eachoptionard the lastone showsthe CPUtime requiredto generatethe constraints andto finda feasiblescheduleon a SUN3/160. lncreasingthe overallutilizationpercentageto 80 % only increasesthe cpu time by a lew seconds. Typicalresultsare showin table3-3.
N
c
%-1
%-2
o/"-3
100 100 100
25 22 27
88 78 80
84 80 81
72 84 75
"/"4
%-5
77 90 72
75 70 75
CPU.Time 62 sec. 58 sec. 59 sec.
Table3'3: 100hundredcarsscheduling witharound80 % ot optionsutitization When N is equalto 200, the averagescheduling time is around5 minuteslor an overallutilization percentage ot 70 "/". The averagescheduling timedoesnotchangewhenwe increasethe percentage to 80 %. Table3-4 reportssometypicalresults.Notethatthe complexity of the lastprobtemis 3tm0; it has
11 constraints rangingover0-1, morethan1000symbolic rangingover1 to 31, '1000variables 200variables constraints. andthousandsof numerical
N
c
o/"-1
o/o-2
%-3
o/o-4
o/"-5
204 200 200
29 29 31
B6 89 84
77 82 81
89 83 95
85 83 82
85 95 100
CPU-Time 336sec. 340sec. 345sec.
witharound8A "/"ol optionsutilization Table3-4: 200 hundredcarsscheduling it is always what can be concludedfromthesedata?Firstnotethat,sincethe problemis NP-complete, amountof time. possibleto find a problemwherethe systemwill not find a schedulein an reasonable Sucha caseis notveryfrequent:it hasnot appearedin our experiment.As a matterof fact,the program percentage over90 o/o. was ableto schedule200carswithan overallutilization Moreover,as it can be seenlrom the abovedata,the behaviourof the programis quadraticin the aspectof the problem,sucha behaviouris verygood,clearlyshowing average.Giventhe combinatorial the adequacyol the CHIPfor solvingthisproblem.
4. Conclusion problem.lt has been shownpreviouslythat problemis a ditficultermbinatorial The car-sequencing toolsare not adequatelor solvingthis problem: they are expertsystemand automatictheorem-proving to tacklelargeinstancesof the problem.In this paper,we havepresentedthe solutionof too inefficient this problem in CHIP, a new generationconstraintlogic programminglanguage.CHIP allows a formulationof the problemto be executedetliciently.Largeinstancesof the car-sequencing declarative problemhave been solvedwithinthe systemshowingthe adequacyof the approach.The efficiency in orderto prunethe search constraints bothsymbolicand numerical comesfromthe abilityto manipulate the development couldbe addedwithoutany difficulty.Furthermore, spacevery early.Specilicheuristics by the useof CHIP(abouttwo days). shortened timerequiredto writethe programwas substantially of ol [16]:"we hadall the inefliciency withthe conclusion The resultsof this papershouldbe contrasted using lifth generationtools withoutany of the llexibility".CHIP providesboth flexibilityin the problem slatementandefficiencyin its resolution.
Acknowledgement
T.Gral and A.Heroldfor many fruitful A.Aggoun,F.Berthier, We would like to thank H.Gallaire, discussions.
12
References CNET, en Logique, 1986- Programmation 1. Colmerauer, A. NotesurProloglll. Ac{esdu Seminaire Tregastel, France, Mai,1986,pp.159-173. of FranceDatabases.Proceedings and Deductive 2. Dincbas,M. Constraints, LogicProgramming 1986,pp. ICOT,Tokyo,Japan,October, Intelligence ScienceSymposium, JapanArtificial andComputer 1-27. SolvingandConstraint Equation M.,Simonis, H. andVanHentenryck, P. Extending 3. Dincbas, in Algebraic of Equations on the Resolution Handling in LogicProgramming. Proceedings of Colloquium (CREAS), MCC,Austin,Texas,USA,May,1987. Structures in Logic Problems P. "Solving LargeCombinatorial 4. Dincbas, M.,Simonis, H. andVanHentenryck, (to appea\ (1988). Programming". JournalofLogicProgramming CMU-CS-83-161, A CaseStudyof Job-Shop Scheduling. 5. Fox,M.S. Constraint-Directed Search: December, 1983. Carnegie-Mellon University, of theACM21 (November expressions". Communications 6. Freuder,E.C. "synthesizing constraint 1978),958-966. IEEESymposium on LogicProgramming, H. Logicprogramming: furtherdevelopments. _,7. Gallaire, Boston,July,1985,pp.88-99.Invitedpaper. W.H.FreemanandCompany,New and lntractability. 8. Garey,M.R.andJohnson,D.5.. Computers York,1979. problems.". for constraint satisfaction treesearchefficiency 9. Haralick,R.M.and Elliot,G.L. "lncreasing t4 (1980),263-31 Artificialintelligence 3. Proceedings of the 14thACMPOPL LogicProgramming. 10. Jaffar,J. and Lassez,J-1. Constraint Munich,WestGermany, January,1987. Symposium, of a CLPSystem.Proc.Fourth 11. Jaffar,J. and Michaylov, S. Methodology and lmplementation Australia, May,1987,pp. 196-218. Melbourne, lnternationalConference on LogicProgramming, Problems". 12. Lauriere,J-L. "A Languageanda Programfor Statingand SolvingCombinatorial Artificiallntelligence 10, 1 (1978'),29-127. 8,1 (1977),99-118. in networkof relations".Artificiallntelligence 13. Mackworth, A.K.. "Consistency properties to picture andapplications : fundamental 14. Montanari, of constrainls U. "Networks processing" 4), 95-132. . Information Science7,2 ('197 'lob-ShopScheduling UsingAutomatedReasoning:A .- 15. Parrello,8.D.,Kabat,W.C.andWos,L. 2, 1 (1986),1-42. Reasoning Problem".JournalofAutomated CaseStudyof the Car-Sequencing 1988), Binhof an ExpertSystem".Al Expert3, 1 (January 16. Parrello, B.D. "CARWARS:The(Almost) 60-il. 17. Simonis,H. and Dincbas,M. Usingan ExtendedPrologfor DigitalCircuitDesign.IEEElnternational October,1987,pp. Munich,W.Germany, to CADSystemsfor E'ectronics, Workshopon Al Applications 165-188. in DigitalCircuits. for FaultDiagnosis M. UsingLogicProgramming H. andDincbas, 18. Simonis, '1987,pp. (GWAI-87), September, Geseke,W.Germany, GermanWorkshopon ArtificialIntelligence 48. 139-1 Languagebasedon of a ComputerProgramming 19. Steele,G.L. Ihe Definitionand lmplementation Constraints.Ph.D.Th.,MlT,August1980. 20. Sterfing,L. and Shapiro,E.. TheArt of Prolog:AdvancedPngrammingTechniques.MIT Press, 1986. Alnnst-Hierarchical for Expressing Language G.J.andSteele,G.L. "CONSTRAINTS-A 21. Sussman, t4, 1 (1980),1-39. Artificiallntelligence Descriptions".
13 of the National Proceedings 22. YanHentenryck, P. and Dincbas,M. Domainsin LogicProgramming. pp. 759-765. 1986, August, USA, (AAAI-86), Philadelphia, lntelligence Conference on Artificial of Namur, Ph.D.Th., University in LogicProgramming. 23. Van Hentenryck, P. Consistency Techniques Belgium, July1987. Proc.Fourth 24. VanHentenryck, P. and Dincbas,M. ForuardCheckingin LogicProgramming. pp.229'256. 1987, May, Australia, Melbourne, Logic Programming, lnternationaf on Conference
i
Tableof Contents Abstract 1. Introductlon 2. Brlet Overviewof CHIP 2.1.Numerical Handling Constraint 2.2.Symbolic Handling Constraint 3. The Gar-Sequencing Problem 3.1.Problem Statement Descrlption in CHIP 3.2.Problem andResolutlon results. 3.3.Computation 4. Conclusion Acknowledgement
1 2 3 3 4
5 5 5 9 11 11
ii
Table3-1: Table3-2: Table3-3: Tabte3-4:
List of Tables Datafor the cars and options 100hundredcars schedulingwith aroundT0"/"of optionsutllization 100hundredcars schedulingwith around80 % of optionsutilizatlon of optionsutlllzatlon 200hundredcars schedullngwith aroundsAo/o
6 10 10 11