Download presentation

Presentation is loading. Please wait.

Published byDamien Hankes Modified over 2 years ago

1
© Imperial College London Eplex: Harnessing Mathematical Programming Solvers for Constraint Logic Programming Kish Shen and Joachim Schimpf IC-Parc

2
Page 2 Introduction Motivation l Use state-of-the-art mathematical programming tools l Use CLP for modelling l Build hybrid solvers (MP - CP - LS) Eplex l Interface to XPRESS-MP (Dash) and CPLEX (ILOG) l Developed and used at IC-Parc since 1997 l Development driven by application requirements Motivation l Use state-of-the-art mathematical programming tools l Use CLP for modelling l Build hybrid solvers (MP - CP - LS) Eplex l Interface to XPRESS-MP (Dash) and CPLEX (ILOG) l Developed and used at IC-Parc since 1997 l Development driven by application requirements

3
© Imperial College London Page 3 Possible Uses From Within ECLiPSe Black-box –If problem is suitable for LP/QP/MIP/MIQP as a whole –But: Only one solution, non-incremental, rounding errors Incrementality and multiple instances –Results explicitly retrieved –Multiple independent subproblems Hybrid –Solvers work on (possibly overlapping) subproblems –Programmed cooperation strategy –Data-driven triggering Low-level interface

4
© Imperial College London Page 4 Why integrate into CLP enviroment? CP –General constraints –Pruning algorithm –Optimization via b&b –Programmed search –Open system LP/MIP –Linear+integrality constraints –Optimisation algorithm –Black box search –Closed system

5
© Imperial College London Page 5 Eplex Constraints Constraints –Vars $:: Min..Max –Expr1 $= Epxr2 –Expr1 $>= Epxr2 –Expr1 $=< Expr2 –integers(Vars) Linear expressions –X –123 3.4 –+Expr -Expr –E1+E2 E1-E2 CE*E1 –sum( List ) –List1 * List2 Benefit from CLP modelling –Predicate abstraction –Lists, arrays, structures –Recursion and loops –Metaprogramming

6
IC-Parc Page 6 Transportation Problem Model :- lib(eplex). main(Cost, Vars) :- Vars = [A1, A2, A3, B1, B2, B3, C1, C2, C3, D1, D2, D3], Vars $:: 0.0..1.0Inf, 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, eplex_solver_setup(min( 10*A1 + 7*A2 + 11*A3 + 8*B1 + 5*B2 + 10*B3 + 5*C1 + 5*C2 + 8*C3 + 9*D1 + 3*D2 + 7*D3), Cost).

7
IC-Parc Page 7 Summary: Eplex as black-box solver CLP modelling / LP or MIP solving –1. Do modelling and transformations in ECLiPSe –2. Load model into CPLEX/XPRESS-MP and solve using LP or MIP solver –3. Pass cost and solution values back to ECLiPSe LP / MIP search ECLiPSe External Solver variables & bounds cost constraints solution values X 1 X 2... X m = =< >= =Cost c1c1 c2 cncn Obj

8
© Imperial College London Page 8 Problems with Integrating MP Solvers Solvable constraint class severely limited –Pure LP/QP/MIP/MIQP Numerical problems –The external solvers use floating-point numbers, subject to rounding errors –Other ECLiPSe solvers are usually precise (intervals or rational numbers) –Instantiating the ECLiPSe variables to inexact values may cause other implementations of the constraints to fail! Lack of incrementality –Cannot find alternative optima –Cannot add constraints or variables MIP search is a straightjacket –A complex search process inside the black box –Hard to control (via dozens of parameters) –Hard to add problem-specific heuristics Unsuitable for solver cooperation!

9
IC-Parc Page 9 Eplex solver as compound constraint X 1 X 2... X m = =< >= =Cost c1c1 c2 cncn Obj solver setup External Solver Solver triggered by events, then: new bounds and constraints are sent to the external solver external solver is run cost bound (or failure) is exported solution values are exported and ECLiPSe variables annotated (optional)

10
Control Flow in Classical MIP Solver Choice Solve continuous relaxation Simplex step Choice

11
Control Flow with Constraint Propagation Search/Choice Propagation phase Search/Choice constraints

12
Control Flow with Constraint Propagation Search/Choice Propagation phase data driven priority order Search/Choice constraints Eplex instance demon can be integrated similar to a global constraint eplex instances

13
IC-Parc Page 13 Summary: Eplex in a hybrid setting CLP modelling and search / LP solving –1. Do modelling and transformations in ECLiPSe –2. Load relaxed model into external solver –3. Solve relaxed problem externally and get cost and solutions back –4. Do one search step (choice) in ECLiPSe Simplex ECLiPSe CPLEX / XPRESS-MP update bounds cost X 1 X 2... X m = =< >= =Cost c1c1 c2 cncn Obj relaxed solutions Search constraints

14
© Imperial College London Page 14 Performance Branching in ECLiPSe vs MIP branching: –Time per LP solve is similar –Depth-first default (more complex state in CP engine) –MIP can exploit more special structure Memory –Temporary data structures during constraint generation –Duplicate representations in hybrid settings Overheads not prohibitive –Largest problems solved >600000 vars, > 900000 cstrs

Similar presentations

OK

CPAIOR02 School on OptimizationC. Le Pape1 Integrating Operations Research Algorithms in Constraint Programming Claude Le Pape ILOG S.A.

CPAIOR02 School on OptimizationC. Le Pape1 Integrating Operations Research Algorithms in Constraint Programming Claude Le Pape ILOG S.A.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on question tags worksheets Ppt on viruses and anti viruses software Ppt on event handling in javascript all objects Ppt on regular expression builder Ppt on one word that will change your life Ppt on paintings and photographs related to colonial period clothing Ppt on cloud computing security Ppt on great indian astronauts What does appt only meant Ppt on different mode of transport