The ECLiPSe Optimization Platform

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems.
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Reliable Scripting Using Push Logic Push Logic David Greaves, Daniel Gordon University of Cambridge Computer Laboratory Reliable Scripting.
Course Summary What have we learned and what are we expected to know?
Satisfiability Modulo Theories (An introduction)
SCIP Optimization Suite
The GDSE Framework A Meta-Tool for Automated Design Space Exploration Tripti Saxena Graduate Student Vanderbilt University 1.
School on Optimization, Le Croisic, 23-24, March, Hybrid Constraint Solving in ECLiPSe: Framework and Applications Farid AJILI, IC-Parc, Imperial.
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
Mathematical Optimization in Stata: LP and MILP
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
© Imperial College London Eplex: Harnessing Mathematical Programming Solvers for Constraint Logic Programming Kish Shen and Joachim Schimpf IC-Parc.
CS162 Week 2 Kyle Dewey. Overview Continuation of Scala Assignment 1 wrap-up Assignment 2a.
LPs and MIPs background and solution approaches Dr. Greg Bernstein Grotto Networking
Hybridisation Solver Cooperation in ECLiPSe. 2 Introduction  Motivation  Sending Constraints to Different Solvers  Probing  Column Generation  Motivation.
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
Optimal Rectangle Packing: A Meta-CSP Approach Chris Reeson Advanced Constraint Processing Fall 2009 By Michael D. Moffitt and Martha E. Pollack, AAAI.
Progress in Linear Programming Based Branch-and-Bound Algorithms
Introduction to Linear and Integer Programming
All Hands Meeting, 2006 Title: Grid Workflow Scheduling in WOSE (Workflow Optimisation Services for e- Science Applications) Authors: Yash Patel, Andrew.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
Andreas Bauer, Viorica Botea, Mark Brown, Matt Gray, Daniel Harabor & John Slaney CP 2010, 522—536 Presented by Heath Roehr.
Supply Chain Design Problem Tuukka Puranen Postgraduate Seminar in Information Technology Wednesday, March 26, 2009.
Solving the Protein Threading Problem in Parallel Nocola Yanev, Rumen Andonov Indrajit Bhattacharya CMSC 838T Presentation.
Constraint Systems Laboratory March 26, 2007Reeson–Undergraduate Thesis1 Using Constraint Processing to Model, Solve, and Support Interactive Solving of.
A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla Gomes and Bart Selman Cornell University Muri Meeting March 2002.
Emanuele Pasqualucci Extending AppManager Monitoring with the SNMP Toolkit.
1 Global Meta-Hybrids for Large-Scale Combinatorial Optimization Professor Leyuan Shi Department of Industrial Engineering University of Wisconsin-Madison.
Constraint Satisfaction Problems
1.Database plan 2.Information systems plan 3.Technology plan 4.Business strategy plan 5.Enterprise analysis Which of the following serves as a road map.
Database Systems Group Department for Mathematics and Computer Science Lars Hamann, Martin Gogolla, Mirco Kuhlmann OCL-based Runtime Monitoring of JVM.
ILOG Solver Directions Laurent Perron ILOG SA. Outline Constraint Programming, a powerful technology The CP suite in ILOG CP faces new challenges Recent.
Set Domain Solvers. 2 ic_sets - the set constraint solver  Load the ic_sets library by using :- lib(ic_sets). at the beginning of your code, or type.
Chapter 14 Part II: Architectural Adaptation BY: AARON MCKAY.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
The european ITM Task Force data structure F. Imbeaux.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Tool Integration with Data and Computation Grid GWE - “Grid Wizard Enterprise”
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
Column Generation By Soumitra Pal Under the guidance of Prof. A. G. Ranade.
Chapter 5 Constraint Satisfaction Problems
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
FATCOP: A Mixed Integer Program Solver Michael FerrisQun Chen Department of Computer Sciences University of Wisconsin-Madison Jeff Linderoth, Argonne.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Tool Integration with Data and Computation Grid “Grid Wizard 2”
Constraint Programming for the Diameter Constrained Minimum Spanning Tree Problem Thiago F. Noronha Celso C. Ribeiro Andréa C. Santos.
Roman Barták (Charles University in Prague, Czech Republic) ACAT 2010.
IENG 212 LAB 1 Research Assıstant: Kehınde Adewale ADESINA
Constraint Programming (CP): Fun and Power
Analysis models and design models
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
Constraint satisfaction problems
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Constraint satisfaction problems
Chapter 6. Large Scale Optimization
IENG 212 LAB 1 Research Assıstant: Kehınde Adewale ADESINA
Presentation transcript:

The ECLiPSe Optimization Platform www.eclipse-clp.org OSSICP’08, Paris Joachim Schimpf and Kish Shen

Outline Motivation History Components Scripting Modelling Solvers and Interfaces Scripting Search Propagation Open Sourcing and plans

Motivation ECLiPSe attempts to support the most common techniques used in solving Constraint (Optimization) Problems: CP – Constraint Programming MP – Mathematical Programming LS – Local Search and combinations of those ECLiPSe is built around the CLP (Constraint Logic Programming) paradigm

History – 1995 ECRC (European Computer Industry Res Centre) First ECLiPSe release 1990, predecessors earlier Logic Programming, databases, parallelism, fd+set constraints Shared roots with CHIP system 1995 – 2005 IC-Parc, Imperial College London Focus on hybrid constraint solving, CHIC2 project MIP integration, repair techniques, new solvers 1999 – 2004 Parc Technologies Ltd, London Airline and Telecom product development 2004 – Cisco Systems Networking applications 2006 Open-sourced www.eclipse-clp.org Mozilla-style licence

What is ECLiPSe A Constraint Logic Programming system, consisting of A core engine VM with data-driven computation, backtracking, garbage collection A collection of libraries Solvers, algorithms, search methods, interfaces to third-party solvers A high-level modelling and control language Logic programming based Development environments and tools Saros (ECLiPSe/eclipse), TkECLiPSe Interfaces for embedding into host environments Java , C/C++, Tcl/Tk

ECLiPSe Architecture ECLiPSe Global constraints Graphs Sets Intervals Finite domain Libraries testing ECLiPSe runtime system glue language document coverage xref Propagation Solvers Gap COIN/OR Xpress-MP CPLEX Development support Libraries Solver Interfaces Hybridisation forms Techniques Linear probing Branch-and-bound Column generation Generalised Prop SBDD,SBDS Paradigms CHR Local Search Libraries Libraries

ECLiPSe as black box solver: Flat Model, including instance data model(Vars, Obj) :- Vars = [A1, A2, A3, B1, B2, B3, C1, C2, C3, D1, D2, D3], Vars :: 0..inf, A1 + A2 + A3 $= 200, B1 + B2 + B3 $= 400, C1 + C2 + C3 $= 300, D1 + D2 + D3 $= 100, A1 + B1 + C1 + D1 $=< 500, A2 + B2 + C2 + D2 $=< 300, A3 + B3 + C3 + D3 $=< 400, Obj = 10*A1 + 7*A2 + 11*A3 + 8*B1 + 5*B2 + 10*B3 + 5*C1 + 5*C2 + 8*C3 + 9*D1 + 3*D2 + 7*D3.  500  300  400 200 100 400 300 10 8 9 7 5 11 3 Plant capacity Client demand Transportation cost A B C D 1 2

ECLiPSe as black box solver: Applying Finite Domain solver :- lib(ic). :- lib(branch_and_bound). solve(Vars, Cost) :- model(Vars, Obj), Cost #= eval(Obj), minimize(search(Vars, 0, first_fail, indomain_split, complete, []), Cost). model(Vars, Obj) :- Vars = [A1, A2, A3, B1, B2, B3, C1, C2, C3, D1, D2, D3], Vars :: 0..inf, A1 + A2 + A3 $= 200, B1 + B2 + B3 $= 400, C1 + C2 + C3 $= 300, D1 + D2 + D3 $= 100, A1 + B1 + C1 + D1 $=< 500, A2 + B2 + C2 + D2 $=< 300, A3 + B3 + C3 + D3 $=< 400, Obj = 10*A1 + 7*A2 + 11*A3 + 8*B1 + 5*B2 + 10*B3 + 5*C1 + 5*C2 + 8*C3 + 9*D1 + 3*D2 + 7*D3. Specify libraries Specify heuristics  500  300  400 200 100 400 300 10 8 9 7 5 11 3 Plant capacity Client demand Transportation cost A B C D 1 2

ECLiPSe as black box solver: Applying LP solver :- lib(eplex). solve(Vars, Cost) :- model(Vars, Obj), eplex_solver_setup(min(Obj)), eplex_solve(Cost). model(Vars, Obj) :- Vars = [A1, A2, A3, B1, B2, B3, C1, C2, C3, D1, D2, D3], Vars :: 0..inf, A1 + A2 + A3 $= 200, B1 + B2 + B3 $= 400, C1 + C2 + C3 $= 300, D1 + D2 + D3 $= 100, A1 + B1 + C1 + D1 $=< 500, A2 + B2 + C2 + D2 $=< 300, A3 + B3 + C3 + D3 $=< 400, Obj = 10*A1 + 7*A2 + 11*A3 + 8*B1 + 5*B2 + 10*B3 + 5*C1 + 5*C2 + 8*C3 + 9*D1 + 3*D2 + 7*D3. Specify solver library  500  300  400 200 100 400 300 10 8 9 7 5 11 3 Plant capacity Client demand Transportation cost A B C D 1 2

ECLiPSe Language - Modelling Logic Programming based Predicates over Logical Variables X #> Y, integers([X,Y]) Disjunction via backtracking X=1 ; X=2 Metaprogramming (e.g. constraints as data) Constraint = (X+Y) Modelling extensions Arrays M[I,J] Structures task{start:S} Iteration/Quantification ( foreach(X,Xs) do …) Solver annotations Solver libraries :- lib(ic). Solver qualification [Solvers] : Constraint One language for modelling, search, and solver implementation!

Sample Model Generic Model, no data model(Capacities, Demands, Dists, Vars, Obj) :- length(Capacities, NP), length(Demands, NC), matrix(NP, NC, Plants, Clients, Vars), Vars :: 0.0..inf, ( foreach(Client, Clients), foreach(Demand, Demands) do sum(Client) $= Demand ), ( foreach(Plant, Plants), foreach(Capacity, Capacities) do sum(Plant) $=< Capacity Obj = (Dists*Vars).

Constraint Solver Libraries Var Domains Constraints class Behaviour suspend numeric Arbitrary arithmetic in/dis/equalities Passive test fd integer, symbol Linear in/dis/equalities and some others Domain propagation ic real, integer Bounds/domain propagation ic_global integer N-ary constraints over lists of integers ic_sets set of integer Set operations (subset, cardinality, union, …) Set-bounds propagation grasper graphs Graph relations (path, scc, …) Propagation ic_symbolic ordered symbols Dis/equality, ordering, element, … sd unordered symbols Dis/equality, alldifferent propia Inherited any various eplex Linear in/equalities Global, optimising tentative open Violation monitoring

Solvers The real/integer domain solver lib(ic) A very general numeric solver, based on interval arithmetic Real-valued variables Integrality is a constraint Infinite domains supported Subsumes finite domain functionality Not as fast as specialised FD solver, but general and good for hybrids.

Mathematical Programming Interface “eplex” Features supported by solvers CPLEX XPRESS CLP/CBC SYMPHONY/CLP problem types LP,MIP,QP,MIQP LP, MIP, QP* LP, MIP solving methods simplex, barrier, network simplex, sifting simplex, barrier simplex, barrier* simplex Incremental changes  costly Probe Col Gen Support User defined global cuts Infeasibility information (IIS) all problem types linear problems no * interfaced via solver-specific code

ECLiPSe as Glue and Scripting Language Real-life applications involve many integration tasks integrating models in various forms integrating data and delivering results And a lot of experimentation-heavy tasks specifying search strategies specifying heuristics specifying solver interaction specifying propagation behaviour How to tackle these tasks Do-It-Yourself in your favourite language use a language with features suited to the task

ECLiPSe Language for Scripting Logical variables (problem variables) with multiple attributes (domain, LP solution, reduced costs, tentative values, violations, …) Symbolic manipulation (“meta-programming”) to build symbolic constraints, post, decompose, inspect, etc Safe arithmetic unlimited precision integers and rationals, safe floating point interval arithmetic Search programming on top of built-in undo (backtrack) and copying facilities Data-driven computation for constraint propagation, external solver triggering, visualisation High-level building blocks solver-independent branch-and-bound, generalised propagation, specific hybridisation forms

Embedding MiniZinc Models Embedding MiniZinc strings: queens(N) :- mzn_run_string(“ int: n; array [1..n] of var 1..n: q; constraint forall (i in 1..n, j in i+1..n) ( q[i] != q[j] /\ q[i]+i != q[j]+j /\ q[i]-i != q[j]-j ); solve satisfy; ", [n = N], % parameter map: ZincId=EclipseValue fzn_ic). % solver mapping to use Model files, with parameter/variable mapping: queens(N, Q) :- mzn_load("n_queens.mzn", fzn_ic, [n = N], [q = Q], _State), labeling(Q). Work with symbolic ECLiPSe-term representation of MiniZinc [int:n, array([1..n] of var(1..n)):q, constraint(forall(…),(…))]

Search Scripting E.g. Limited Discrepancy Search User-defined LDS straightforward to program: lds_labeling(AllVars, MaxDisc) :- ( fromto(Vars, Vars, RestVars, []), fromto(MaxDisc, Disc, RemDisc, _) do select_variable(X, Vars, RestVars), once select_value(X, Value), ( X = Value, RemDisc = Disc ; Disc > 0, RemDisc is Disc-1, X #\= Value, indomain(X) ) ).

Search Scripting Restart with seeds, heuristics, limits Jobshop example (approximation algorithm by Baptiste/LePape/Nuijten) init_memory(Memory), bb_min(( ( no_remembered_values(Memory) -> once bln_labeling(c, Resources, Tasks), % find a first solution remember_values(Memory, Resources, P) ; scale_down(P, PLimit, PFactor, Probability), % with decreasing probability member(Heuristic, Heuristics), % try several heuristics repeat(N), % several times limit_backtracks(NB), % spending limited effort install_some_remembered_values(Memory, Resources, Probability), bb_min( bln_labeling(Heuristic, Resources, Tasks), EndDate, bb_options{strategy:dichotomic} ), remember_values(Memory, Resources, Probability) ) EndDate, Tasks, TasksSol, EndApprox, bb_options{strategy:restart} ).

Propagation Scripting Arc-consistency Arc consistency on top of weaker consistency (e.g. test, forward checking) ac_constr(Xs) :- ( weak_constr(Xs), member(X, Xs), indomain(X), once labeling(Xs) ) infers fd. “Generalised Propagation” operator

Propagation Scripting Singleton Arc-consistency Singleton arc consistency from arc consistency, on a subproblem: sac_constr(Xs) :- ( ac_constr(<some Xs>), …, ac_constr(<some Xs>), member(X, Xs), indomain(X) ) infers ic. If performed on the whole problem, simpler variant: shaving shave(Xs) :- ( foreach(X,Xs) do findall(X, indomain(X), Values), X :: Values ). Shaving often effective as a preprocessing step before actual search. E.g. sudoku solvable with ac-alldifferent and shaving – no deep search needed [Simonis].

Open Sourcing Experience Historically, ECLiPSe was proprietary from the start But research centre couldn’t provide commercial support Parent/sponsor companies didn’t want to sell tool and/or support Academic licences, but uptake limited by bureaucracy Academic licences, but no commercial upgrade path Small user base within parent companies, not enough testers But: exclusivity was nevertheless considered important by spin-out investors and academic IPR exploitation outfits In retrospect, community uptake and reputation of system suffered Possibly also negative consequences for robustness and feature set

Now and Next Technical Organisational Interface to COIN/OR solvers still being polished and extended MiniZinc link recently released ECLiPSe release 6.0 forthcoming, includes a new compiler Saros development environment – released, needs manpower New solver interfaces (MiniSat, Gecode) planned Organisational Cisco continues support and maintenance 2 academic collaboration projects currently in selection phase Wider contributions sought

ECLiPSe Resources Open-sourced (MPL) by Cisco 9/2006 Sources and binaries on www.sourceforge.net/eclipse-clp Project web site www.eclipse-clp.org Open-source user community Traditionally academic teaching/research Audience widening since open-sourcing Book Constraint Logic Programming using ECLiPSe Krzysztof Apt & Mark Wallace, Cambridge University Press, 2006.