Cpsol2013 Talk
-
Upload
mhenley8059 -
Category
Documents
-
view
218 -
download
0
Transcript of Cpsol2013 Talk
-
7/27/2019 Cpsol2013 Talk
1/22
An introduction to Choco 3.0
an Open Source Java Constraint Programming Library
C.Prudhomme, JG. FagesEMNantes, INRIA TASC, CNRS LINA
Nantes, France
16th September 2013
16th September 2013 CPSolvers 2013 Choco 1 / 22
http://find/ -
7/27/2019 Cpsol2013 Talk
2/22
The Choco constraint solver
Outline
1 The Choco constraint solver
2 Inside Choco
3 Dealing with real world problems
4 The future of Choco
16th September 2013 CPSolvers 2013 Choco 2 / 22
http://find/ -
7/27/2019 Cpsol2013 Talk
3/22
The Choco constraint solver
A solver for teaching and research
History1999 a first CLAIRE impl. within the OCRE project
an national initiative for an open constraint solver for both teaching
and research (Nantes, Montpellier, Toulouse, Bouygues, ONERA)
2003 Choco 1.0 : a first Java implementationPortability, ease of use for newcomers, etc.
Guillaume Rochart (Bouygues), Hadrien Cambazard (Grenoble INP)
2008 Choco 2.0 : a user-oriented versionSeparation between modeling and solving, more constraints.
Charles Prudhomme (EMN), Hadrien Cambazard, Arnaud Malapert (Univ. Nice)
2013 Choco 3.0 : towards efficiency and reliability !Deep code refactoring, easy-to-use (and to maintain)
Charles Prudhomme, Jean-Guillaume Fages (EMN), Xavier Lorca (EMN)
16th September 2013 CPSolvers 2013 Choco 3 / 22
http://find/ -
7/27/2019 Cpsol2013 Talk
4/22
The Choco constraint solver
An open constraint solver
Open (online source repository a, BSD license)
Readable and flexible (designed for teaching and research)
Efficient and reliable (solves real world problems)
More than 60000 DL (2003-2013), worldwide
Code : >60
k LOC, >700
Classesa. github.com/chocoteam/choco3
16th September 2013 CPSolvers 2013 Choco 4 / 22
http://localhost/var/www/apps/conversion/tmp/scratch_7/github.com/chocoteam/choco3http://localhost/var/www/apps/conversion/tmp/scratch_7/github.com/chocoteam/choco3http://find/ -
7/27/2019 Cpsol2013 Talk
5/22
The Choco constraint solver
Academic users
In France :
Universities : Nantes, Montpellier, Paris, Rennes, Toulouse,Clermont-Ferrand
Engineering schools : ENSTA, ENAC, Ecole des Mines deNancy, Ecole des Mines de Nantes, ISIMA
Around the world :
UK : University of GlasgowIreland : University of Cork
Canada : Ecole Polytechnique de Montreal
16th September 2013 CPSolvers 2013 Choco 5 / 22
Th i l
http://find/ -
7/27/2019 Cpsol2013 Talk
6/22
The Choco constraint solver
Industrial users
Big companies : Safran, Dassault, PSA
Research agencies : ONERA, NASASoftware and Integrators : Kls-Optim, alfaplan GmbH,Easyvirt, Hedera Technology, etc.
16th September 2013 CPSolvers 2013 Choco 6 / 22
I id Ch
http://find/ -
7/27/2019 Cpsol2013 Talk
7/22
Inside Choco
Outline
1 The Choco constraint solver
2 Inside Choco
3 Dealing with real world problems
4 The future of Choco
16th September 2013 CPSolvers 2013 Choco 7 / 22
Inside Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
8/22
Inside Choco
Embedded Variable Types
A wide variety of variable paradigms :
Integer variables
Boolean variablesSet variables
Graph variables
Real variables
16th September 2013 CPSolvers 2013 Choco 8 / 22
Inside Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
9/22
Inside Choco
A Large Choice of Implemented Constraints
More than 80 available constraints in Choco :
Classical arithmetic constraints : =,=, ,,
A large set of usefulglobal constraints
: AllDifferent,GlobalCardinality, NValue, Cumulative, Diffn, Occurrence,Element, Regular, Circuit . . .
Exclusive constraints : Tree, CostRegular, Ibex . . .
Reified constraints : any constraint can be reified.
16th September 2013 CPSolvers 2013 Choco 9 / 22
Inside Choco
http://find/http://goback/ -
7/27/2019 Cpsol2013 Talk
10/22
Inside Choco
Discrete-continuous hybridization
The Ibex global constraint :
Handles numerous non linear continuous expressions+,, , /,=,,, , min, max, abs, sqr, sqrt, exp, log, pow,
cos, sin, tan, acos, asin, atan ...
Can mix integer and real variables.
16th September 2013 CPSolvers 2013 Choco 10 / 22
Inside Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
11/22
Inside Choco
Explanations
Choco natively supports explained constraints.
Both generic and ad hocexplanations schemas
Asynchronous and lazy computation, flattened or unflattened
storageImprove resolution (CBJ, DBT, path repair, LNS)
Next steps :
Providing feedback to the user
Nogood recording / SAT Solver interaction
16th September 2013 CPSolvers 2013 Choco 11 / 22
Inside Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
12/22
Search-related tools
Different kinds of use :
Get a solution,
Enumerate all solutions,
Find an optimal solution
Predefined search methods :
Built-in search strategies (DomWDeg, ABS, IBS, etc.)
and some optimization procedures (LNS, fast restart, Last
Conflict, etc.).
16th September 2013 CPSolvers 2013 Choco 12 / 22
Inside Choco
http://goforward/http://find/http://goback/ -
7/27/2019 Cpsol2013 Talk
13/22
An intuitive user interface
Use of Factories to build a model :
Variables : VariableFactory ,
Constraints : IntConstraintFactory ,LogicalConstraintFactory , SetConstraintsFactory . . .
Strategies : IntStrategyFactory , SetStrategyFactory . . .
16th September 2013 CPSolvers 2013 Choco 13 / 22
Inside Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
14/22
Choco diffusion
Contestant within the MiniZinc Challenge (2012, 2013)
JSR-331 implementation (in progress)
CP-Viz interface
One-sheetdocumentation, teaching materials, articles, demomaterial (> 60examples), etc.
16th September 2013 CPSolvers 2013 Choco 14 / 22
Inside Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
15/22
Langfords number problem
The problem is to arrange k sets of numbers 1 to nso that each appearance of the number m is m numbers on from the last.Ex : L(k = 3, n = 9)= 347 8 3 945 3 6 748 5 2 9 6 2 7 5 2 8 1 6 1 9 1
S o lv e r s = new S o l v e r ( L a n g f o r d ) ;
I n t V a r [ ] p = V F . e n u m e r a t e d A r r a y ( p, nk , 0 , kn1, s ) ;f o r (i n t i = 0 ; i < n ; i++) {
f o r (i n t j = 0 ; j < n( k 1) ; j+=n) {s . p o s t ( I C F . a r i t h m ( VF . o f f s e t ( p [ i + j ] , i + 2 ) ,=, p [ i +(j+n ) ] ) ) ;
}}s . po st (ICF . arit hm (p [ 0 ] ,
-
7/27/2019 Cpsol2013 Talk
16/22
Outline
1 The Choco constraint solver
2 Inside Choco
3 Dealing with real world problems
4 The future of Choco
16th September 2013 CPSolvers 2013 Choco 16 / 22
Dealing with real world problems
http://find/ -
7/27/2019 Cpsol2013 Talk
17/22
Attacking real world problems
Entropy, Easyvirt, Hedera : data center management (VMplacement),
Vaberlin, GSD lab : software development, code generation,
Safran, Dassault Aviation : mission planning,KLS Optim, Optilogistic : loading plans for vehicles andpalettes,
Biotrial, Maif : personal scheduling,
Kosmos : timetabling for secondary schools,PSA : online car configuration (prototype),
16th September 2013 CPSolvers 2013 Choco 17 / 22
Dealing with real world problems
http://find/ -
7/27/2019 Cpsol2013 Talk
18/22
Entropy
They like
Modeling (declarative, reliable),
Ad hocconstraints (simplicity),
Scalability (more than 100,000 VMs).
Issues
Clear problem statement,
Unaware of NP-hardness,
Discrete-continuous hybridization,
Multi-objective resolution.
16th September 2013 CPSolvers 2013 Choco 18 / 22
Dealing with real world problems
http://find/ -
7/27/2019 Cpsol2013 Talk
19/22
Discussion
Few feedbacks from users
only when they have trouble modeling a problem,
or when there is a bug.
BSD license
Academic inconvenience
Cannot provide professional support (heavy administration),
Not interested in turnkey project (SQL, HMI) : AIMMS ?
16th September 2013 CPSolvers 2013 Choco 19 / 22
The future of Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
20/22
Outline
1 The Choco constraint solver
2 Inside Choco
3 Dealing with real world problems
4 The future of Choco
16th September 2013 CPSolvers 2013 Choco 20 / 22
The future of Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
21/22
Current hot topics inside Choco
Explanations :
User-oriented explanationsSAT Solver interaction
Discrete-continuous bridge in practice
Parallelization / distribution
Robotic applications (Ibex)
16th September 2013 CPSolvers 2013 Choco 21 / 22
The future of Choco
http://find/ -
7/27/2019 Cpsol2013 Talk
22/22
Acknowledgements
Thank you for your attention !Fathers
Founding fathers : Francois Laburthe (Amadeus), NarendraJussien (EMN, LINA)
Funding fathers : Ecole des Mines de Nantes, (Bouygues SA,Amadeus SA)
16th September 2013 CPSolvers 2013 Choco 22 / 22
http://goforward/http://find/http://goback/