670 likes | 987 Views
Constraint Programming for Industrial Applications H.Simonis. What is common among. The production of Mirage 2000 fighter aircraft The personnel planning for the guards in all French jails The production of Belgian chocolates The selection of the music programme of a Pop music radio station
E N D
What is common among • The production of Mirage 2000 fighter aircraft • The personnel planning for the guards in all French jails • The production of Belgian chocolates • The selection of the music programme of a Pop music radio station • The design of advanced signal processing chips • The print engine controller in Xerox copiers They all use constraint programming to solve their problem
Constraint Programming - in a nutshell • Declarative description of problems with • Variables which range over (finite) sets of values • Constraints over subsets of variables which restrict possible value combinations • A solution is a value assignment which satisfies all constraints • Constraint propagation/reasoning • Removing inconsistent values for variables • Detect failure if constraint can not be satisfied • Interaction of constraints via shared variables • Incomplete • Search • User controlled assignment of values to variables • Each step triggers constraint propagation • Different domains require/allow different methods
Constraint Satisfaction Problems (CSP) • Combinatorial Optimization Problems • Different problems with common aspects • Planning • Scheduling • Resource allocation • Assignment • Placement • Logistics • Financial decision making • VLSI design
Characteristics of these problems • There are no general methods or algorithms • NP-completeness • different strategies and heuristics have to be tested. • Requirements are quickly changing: • programs should be flexible enough to adapt to these changes rapidly. • Decision support required • co-operate with user • friendly interfaces
Techniques behind CLP Predicate logic Unification Non-determinism Logic Programming Constraint propagation Consistency checking Demons CLP tools Artificial Intelligence Operations Research Simplex & Linear programming Integer programming Implicit enumeration Branch & bound Flow algorithms Scheduling methods Graph theory Combinatorics Spatial data structures Equation solving methods Mathematics
Eclipse • Prolog based “constraint toolkit” • Developed first at ECRC, then IC-Parc • Easy to develop new constraint methods • Sets of existing methods/libraries • Basis of problem solvers for PT • Widely used for academic work (> 500 sites)
CLP tool history logic based Other base language ALICE Prolog III CLP(R) CHIP CHIP SEPIA CAL SNI Prolog Decision Power Charme BNR Pecos cc(FD) Charme Object Prolog IV CHIP V4 Solver Eclipse CHIP lib Claire Oz CHIP V5
Classification of CLP solvers • Computation domain • Deterministic solver (search under user control) • Efficient methods • More than one application • Complete/incomplete • decide satisfiability of constraint sets • complexity of solver/ simplicity of programs • Methods • syntactic: domain independent • semantic: domain dependent
Constraint system structure Constraints Complete solver Incomplete solver Interval Finite domains Boolean Rational Others Boolean Others Control Constraint solver Domain concept Heuristics Back tracking Meta- heuristics semantic syntactic Variable selection Value selection numerical symbolic equality inequality disequality element cumulative diffn cycle among sequence
Computation domains • Finite domains • Linear arithmetic • Boolean • Pseudo Boolean • Non-linear arithmetic • Intervals • Sets, sequences, lists the initial domains in Prolog III, CLP(R) and CHIP
Incomplete finite domain solver • Domain • finite sets of values • subsets of natural numbers • Need for enumeration • Classification criteria • constraint granularity • richness of constraint sets • propagation results • user definable constraints/control • Methods • explicit domain representation • bound propagation/ removal of interior values • heuristics based on domains
Need for global constraints 1 X X in {2,3} Y 2 Y in {2,3} U in {1,2,3,4} Z 3 Z in {1,3} U 4 local reasoning, no action global reasoning, detect implications by bi-partite matching
Global constraints • Work on sets of variables • Global conditions, not local constraints • Semantic methods • Operations Research • Spatial algorithms • Graph theory • Network flows • Building blocks (high-level constraint primitives) • Multi-purpose • As general as possible • Usable with other constraints • Very strong propagation • Acceptable algorithmic complexity
Constraint morphology precedence diffn cumulative sequence cycle case among alldifferent setup disjunctive permutation prod/cons \= >=, distance atmost, atleast circuit element Different Order Resource Tour Dependency
Search tree visualization • Generation of search tree representation at run-time • Shows parent child relation, failed sub-trees, success nodes • In examples here • leaf failure nodes suppressed • failure trees not collapsed • Interface a set of simple meta-call predicates • Supported by work in DISCIPL Esprit project • Declarative debugging • Visualization of constraint programming results • Understand behaviour of different strategies
Search tree tool Menubar Panel Tree view Other Views, here domain state Info Area
Example of tree search credit([X1..X10],8, 10, my_delete, my_indomain,4,part(1,2)),
Success Stories for Constraint Logic Programming COSYTEC – IC-Parc
Hardware design Compilation Financial problems Placement Cutting problems Stand allocation Air traffic control Frequency allocation Network configuration Product design Production step planning Production sequencing Production scheduling Satellite tasking Maintenance planning Product blending Time tabling Crew rotation Aircraft rotation Transport Personnel assignment Personnel requirement planning Overview
Five central topics • Assignment • Parking assignment • Platform allocation • Network Configuration • Scheduling • Production scheduling • Project planning • Transport • Lorry, train, airlines • Personnel assignment • Timetabling, Rostering • Train, airlines
Stand allocation • HIT (ICL Hong-Kong) • assign ships to berths in container harbour • developed with ECRC’s version of CHIP • then using DecisionPower (ICL) • first operational constraint application (1989-90) • APACHE (COSYTEC) • stand allocation for airport • Refinery berth allocation (ISAB) • where to load/unload ships in refinery
AIR FRANCE - APACHE • Stand allocation system • Originally developed for Air France, CDG2 • Packaged for large airports • Complex constraint problem • Technical & operational constraints • Incremental re-scheduler • Cost model • Max. nb passengers in contact • Min. towing, bus usage • Benefits and status • Quasi real-time re-scheduling • KAL, Turkish Airlines
Network configuration • RiskWise (PT) • Locarim (France Telecom, COSYTEC) • cabling of building • Planets (UCB, Enher) • electrical power network reconfiguration • Load Balancing in Banking networks (ICON) • distributed applications • control network traffic • Water Networks (UCB, ClocWise)
RiskWise • Traffic analysis/optimization for IP networks • Find out end-to-end communication flows in the network of an ISP • Suggest changes in network which optimize investment • Handle incomplete data
Production scheduling • Atlas (Monsanto) • Herbizide production • Cerestar (OM Partners) • Glucose production • KAPSS (Mitsubishi Chemical) • offset printing plates • Trefi Metaux (Sligos) • heavy industry production scheduling • Michelin • rubber blending, rework optimization
DASSAULT - PLANE • Assembly line scheduling • developed by Dassault Aviation for Mirage 2000 Jet/ Falcon business jet • Two user system • production planning 3-5 years • commercial what-if sales aid • Optimisation • requirement to balance schedule • minimise changes in production rate • minimise storage costs • Benefits and status • replaces 2 week manual planning • operational since Apr 94 • now used in US for business jets
FINA - FORWARD • Oil refinery production scheduling • joint development by TECHNIP and COSYTEC • incorporates ELF FORWARD LP tool • Schedules daily production • crude arrival -> processing -> delivery • design, optimize and simulate • Product Blending • explanation facilities • handling of over-constrained problems • Status • generic tool developed in 240 man days • operational since June 94 • Operational at FINA, ISAB, BP
Transport • By Air • AirPlanner (PT) • Daysy (Lufthansa) • Pilot (SAS) • By Road • Wincanton (IC-Parc) • TACT (SunValley) • EVA (EDF) • By Rail • CREW (Servair) • COBRA (NWT)
EDF- EVA • Transportation of nuclear waste • developed by GIST + COSYTEC • plans evacuation and transport for 54 sites • Constraints • availability of transport vehicles and vessels • no and capacity of storage tanks • compatibility of waste to vessels • size of convoy, time • Status • operational since Oct 94 • 6 month plan in 5 minutes
SERVAIR - CREW • Crew rostering system • assign service staff to TGV train timetable • joint implementation with GSI • Problem solver • generates tours/cycles • assigns skilled personnel • Constraints • union, physical, calendar • Status • operational since Mar 1995 • cost reduction by 5%
Personnel Planning • RAC (IC-Parc) • OPTISERVICE (RFO) • Shifter (ERG Petroli) • Gymnaste (UCF) • MOSAR (Ministère de la JUSTICE)
RFO - OPTI SERVICE • Assignment of technical staff to tasks • overseas radio broadcasting network - Radio France Outre-mer • joint development by GIST and COSYTEC • 250 journalists and technicians • Features • schedule manually, check, automatic • rule builder to specify cost formulas • Optimization • minimize overtime, temporary staff • compute cost of schedule • Status • operational since 1997 • installed worldwide in 8 sites • Now used for other companies • TSR • Canal+
ATLAS (Monsanto, Antwerp) • Scheduling system in chemical factory • herbicide manufacturing and packaging • integrated inventory control system • Life system • first phase operational since July 93 • second phase operational since March 94 • major revision in 98 (SAP connection) • Developed jointly by • OM Partners (Antwerp) • COSYTEC • Multi-user PC/UNIX system • multiple schedulers • co-operative behavior
Manufacturing Process Formulation Packaging intermediate products Outside G finished products Dr Holding area F1 L1 raw material L2 F2 L3 Gr L4
Users Schedulers Factory Formulation Packaging Purchasing Production Dynamic Scheduling Environment Sales forecast (6 month horizon) Orders (delay 1day to 4 weeks) Stock level update planned/realized Data base Arrivals (lead time 3 weeks) Production Schedule Shop floor data
Scheduling Process Priority orders Users Schedulers Old schedule Fine tuning of sequence Factory Formulation Packaging medium/long term impact Purchasing Production Production problems Visualization of schedule (stock level, delays, down times...) New Schedule short term reaction Re-scheduling Formulation Re-scheduling Packaging
IBM - VMAntwerp IBM - MVSSASBrussels Architecture X 25 Scheduling CHIP USA ORACLE Users PC / XWindowsGUI HP UNIX Purchasing Planner Factory SchedulerFormulation Scheduler Packaging Production manager Ethernet
The system • Connection to other systems • Data download/upload from/to local and remote mainframes • End-user connection via PCs • Data base • Local on UNIX machine • ORACLE SQL standard • Forms/reports facilities • Multi-user tool • Multiple schedulers for parts of production • Inventory control • Production • Multiple scenarios; one schedule
Constraint solver • Constraints handled • Machine choice • Sequence/ machine dependent set-up • Manpower limits • Component consumer constraints • Finished product producer constraint • Producer/consumer constraints for intermediate products • Production planning for batch part • Number of batches for intermediate products • Optimum batch sizing • Limited stock levels
cumulative The Cumulative global constraint • Cumulative constraint • Resource limits over periods of time • Upper/lower limits • Soft/hard limits • Gradual constraint relaxation • Application • Resource restrictive scheduling, producer consumer constraints, disjunctive schedule, manpower constraints, overtime
Cumulative • Methods • obligatory parts • task intervals • available space • many more (25000 lines of C code) • Concepts • one constraint may be used for different purposes
diffn The Diffn global constraint • Diffn constraint • non overlapping areas on n-dimensional rectangles • distances between rectangles • limit use of areas • relaxation • Application • layout, packing, resource assignment, setup, distribution planning, time-tabling
Diffn • Methods • obligatory parts • region intervals • max flow on assignment • available space • many others (32000 lines of C code) • Concepts
cycle The Cycle global constraint • Cycle constraint • Finds cycles in directed graphs with minimal cost • Assign resources, find compatible start dates • Applications • Tour planning, personnel rotation, distribution problems, production sequencing
Cycle • Methods • connected components • bi-partite matching • non-oriented graph concepts • shortest/longest paths • micro-rules • many others (38000 lines of C code) • Concepts
ATLAS - Summary • End-user system • Direct manipulation • Constraints not visible to user • Changes/strategies expressed via interface • Complex scheduling problem • Real-life, not pure problem • Interaction/conflicts between constraints • Incremental expression with constraints • Development effort (250 days) • Integration • Data base reporting • Graphical interface • Problem solver
The CHIP system: Constraints and ... Application XGIP QUIC Objects Solvers CHIP Application CHIP CHIP++ EMC/CLIC
Behind the scene • CHIP kernel 175000 lines • Prolog 15000 • Core Constraints 20000 • Global Constraints 140000 • Interfaces 5000 lines • CLIC • EMC • QUIC • XGIP graphics 20000 lines • Graphics libraries 17000 lines