An introduction to Choco

Similar documents
An introduction to Choco 3.0

Nuclear reactors construction costs: The role of lead-time, standardization and technological progress

Barista at a Glance BASIS International Ltd.

About this Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Mahout

Optimizing the planning of harvest, transport and grape crushing activities in the wine supply chain

Find the wine you are looking for at the best prices.

LiveTiles CSP Partner Program Guide. Version: 1.0

Herbacel - AQ Plus Citrus. for optimising the quality, calorie content and cost of burger patties

Semantic Web. Ontology Engineering. Gerd Gröner, Matthias Thimm. Institute for Web Science and Technologies (WeST) University of Koblenz-Landau

Environmental Monitoring for Optimized Production in Wineries

think process! DONUT AND MORE

-- Final exam logistics -- Please fill out course evaluation forms (THANKS!!!)

Constrained Global Optimization for Wine Blending

Restaurant reservation system thesis documentation. Restaurant reservation system thesis documentation.zip

CS 322: (Social and Information) Network Analysis Jure Leskovec Stanford University

PROFESSIONAL COOKING, 8TH EDITION BY WAYNE GISSLEN DOWNLOAD EBOOK : PROFESSIONAL COOKING, 8TH EDITION BY WAYNE GISSLEN PDF

ARM4 Advances: Genetic Algorithm Improvements. Ed Downs & Gianluca Paganoni

Trade Promotion in the Wine Sector

Improving Ingredient Substitution using Formal. Concept Analysis and Adaptation of Ingredient Quantities with Mixed Linear Optimization.

2016 AGU Fall Meeting Scientific Program Public Affairs

A New Information Hiding Method for Image Watermarking Based on Mojette Transform

benefits of electronic menu boards: for your business and your customers

Introduction to Management Science Midterm Exam October 29, 2002

Olea Head and Neck DCE VPMC-14290A

Réseau Vinicole Européen R&D d'excellence

GCSE 4091/01 DESIGN AND TECHNOLOGY UNIT 1 FOCUS AREA: Food Technology

THE SAVOY COCKTAIL BOOK BY HARRY CRADDOCK

Pre-Test Unit 6: Systems KEY

Fibonacci. books that contributed to the study of mathematics. These books introduced Europe to Indian and

Managing Multiple Ontologies in Protégé

think process! DOUGH AND MORE

The aim of the thesis is to determine the economic efficiency of production factors utilization in S.C. AGROINDUSTRIALA BUCIUM S.A.

Roux Bot Home Cooker. UC Santa Cruz, Baskin Engineering Senior Design Project 2015

Candidate Agreement. The American Wine School (AWS) WSET Level 4 Diploma in Wines & Spirits Program PURPOSE

Wideband HF Channel Availability Measurement Techniques and Results W.N. Furman, J.W. Nieto, W.M. Batts

Lesson 41: Designing a very wide-angle lens

WEL COME T O SER TINOS COFFEE

HRTM Food and Beverage Management ( version L )

POSITION DESCRIPTION. DATE OF VERSION: August Position Summary:

Lesson 41: Designing a very wide-angle lens

India Elephant Sanctuary

LEAN PRODUCTION FOR WINERIES PROGRAM

IT tool training. Biocides Day. 25 th of October :30-11:15 IUCLID 11:30-13:00 SPC Editor 14:00-16:00 R4BP 3

Jure Leskovec, Computer Science Dept., Stanford

Lecture 9: Tuesday, February 10, 2015

What makes a good muffin? Ivan Ivanov. CS229 Final Project

Brand identity guidelines

How Many of Each Kind?

AMERICAN FROZEN FOOD INSTITUTE February 23-27, Naturipe Farms

-- CS341 info session is on Thu 3/18 7pm in Gates Final exam logistics

Contact. A report undertaken by 33entrepreneurs in 2014Q2 500 StartUps reviewed 10 in-depth analysis

DEVELOPING PROBLEM-SOLVING ABILITIES FOR MIDDLE SCHOOL STUDENTS

Software engineering process. Literature on UML. Modeling as a Design Technique. Use-case modelling. UML - Unified Modeling Language

Master planning in semiconductor manufacturing exercise

Food brands. Food Europe. Food North America

THE APPLICATION OF NATIONAL SINGLE WINDOW SYSTEM (KENYA TRADENET) IN PROCESSING OF CERTIFICATES OF ORIGIN. A case study of AFA-Coffee Directorate

Salmon Brand Building in Asia

Building Reliable Activity Models Using Hierarchical Shrinkage and Mined Ontology

Recursion. John Perry. Spring 2016

VINEHEALTH AUSTRALIA DIGITAL BIOSECURITY PLATFORM

Vegetarian/Vegan Options. Lidia Nesci

Panorama. Packaging technology > Packaging your ideas... The Magazine from the Piepenbrock Group

Nestlé Investor Seminar 2014

Future Market Insights

Camras Good Beer Guide 2018 No 45

Bishop Druitt College Food Technology Year 10 Semester 2, 2018

SIGMA The results count

BRIQUTTE SECTOR IN KENYA. Briquettes have been produced on a small scale in Kenya since the 1970 s.

Managing grapevine leafroll disease in red berry varieties in New Zealand vineyards

Fairtrade Policy 2018

Demand, Supply and Market Equilibrium. Lecture 4 Shahid Iqbal

Sustainable oenology and viticulture: new strategies and trends in wine production

DETERMINANTS OF GROWTH

Napa Valley Vintners Teaching Winery Napa Valley College Marketing and Sales Plan February 14, 2018

2015 CATALOG DISTRIBUTED BY

Step 1: Prepare To Use the System

Lack of Credibility, Inflation Persistence and Disinflation in Colombia

Cafeteria Ron software

About Wine By Dellie Rex, J. Patrick Henderson

Best Of Wine Tourism AWARDS 2018 CONTEST RULES. Turismo Oficial do Porto. Rua Clube dos Fenianos, PORTO PORTUGAL Tel:

DOC / KEURIG COFFEE MAKER NOT WORKING ARCHIVE


WINE RECOGNITION ANALYSIS BY USING DATA MINING

2 Recommendation Engine 2.1 Data Collection. HapBeer: A Beer Recommendation Engine CS 229 Fall 2013 Final Project

DONOR PROSPECTUS March 2017

LIFE 2018 Conference in Zagreb 2nd of February 2018

Unit title: Fermented Patisserie Products (SCQF level 7)

Washington Wine Commission: Wine industry grows its research commitment

Predicting Wine Quality

How caffeine affect college students mentality?: I-Search Research Process

DOWNLOAD OR READ : YEAR OF GOOD BEER PAGE A DAY CALENDAR 2019 PDF EBOOK EPUB MOBI

The R&D-patent relationship: An industry perspective

COUNTRY PLAN 2017: TANZANIA

Development of smoke taint risk management tools for vignerons and land managers

SANREMO PRESENTATION

WOK OF FURY: HOW TO COOK CHINESE BY KHOAN VONG DOWNLOAD EBOOK : WOK OF FURY: HOW TO COOK CHINESE BY KHOAN VONG PDF

A BOOK DISCUSSION Guide

Bite Size: Elegant Recipes For Entertaining By Francois Payard

with MesoOptics Training Manual This information is for Ledalite sales representatives only. Not for public use.

EAT TOGETHER EAT BETTER BEAN MEASURING ACTIVITY

Transcription:

An introduction to Choco A java Constraint Programming Library G. Rochart, N. Jussien, X. Lorca Charles Prud'homme, Hadrien Cambazard, Guillaume Richaud, Julien Menana, Arnaud Malapert Bouygues SA, École des Mines de Nantes (LINA CNRS UMR 6241) '08/05 OSSICP'08 Choco 1 / 25

The Choco constraint solver Outline 1 The Choco constraint solver A little bit of history The design of Choco General features 2 The practice of Choco 3 Choco around the World 4 The future of Choco 5 Acknowledgements '08/05 OSSICP'08 Choco 2 / 25

The Choco constraint solver A little bit of history A solver for teaching and research 1999 : a rst CLAIRE implementation within the OCRE project an national initiative for an open constraint solver for both teaching and research (Nantes, Montpellier, Toulouse, Bouygues, ONERA) 2003 : a rst Java implementation portability, ease of use for newcomers, etc. 2008 : Choco V2 a clear separation between the model and the solving machinery ; a complete re-factoring ; a user-oriented version '08/05 OSSICP'08 Choco 3 / 25

The Choco constraint solver A little bit of history An open constraint solver An open system a source forge project BSD license for all possible usages A glass box designed for both teaching and research ecient yet readable readable yet ecient '08/05 OSSICP'08 Choco 4 / 25

The Choco constraint solver The design of Choco General Schema of Choco's Architecture Model (1) generic model of a constraint (2) generic model of a variable (3) API for creating variables and constraints How to make a problem? CP-Model implementation of a Model in the CP paradigm Choco Solver API Solver (1) constraints data structures (2) variables data structures (3) data structures related to the search algorithm CP-Solver (1) data structure implementation (2) parser from CP-Model to CP-Solver How to solve a problem? Memory (1) trailing (2) recomputation (3) copying '08/05 OSSICP'08 Choco 5 / 25

The Choco constraint solver General features Embedded Variable Types A wide variety of variable paradigms : Integer variables : enumerated and bounded, Set variables : enumerated and bounded, Real variables, Composite variables : integer expression and real expression composed with operators like plus, mult, minus, scalar, sum, power,... (rst-class citizen) Work in progress : Intervals list. '08/05 OSSICP'08 Choco 6 / 25

The Choco constraint solver General features A Large Choice of Implemented Constraints About 70 available constraints in Choco : Classical arithmetic constraints : equal, not equal, less or equal, greater or equal, A large set of useful global constraints : AllDierent and BoundAllDierent, GlobalCardinality and BoundGCC, AtMostNvalue, Cumulative, Occurence, Element,... Exclusive constraints : Tree,... Reied constraints : and, or, not, implies, ifonlyif,... '08/05 OSSICP'08 Choco 7 / 25

The Choco constraint solver Search-related tools General features User can use predened search methods : Searching CSP solutions : solve for searching rst solution and solveall for searching all solutions Optimizing a problem by maximizing ou minimizing a variable value (maximize and minimize) with or without restart Some new feature in next release like solve with restarts (useful for heuristics with learning)... '08/05 OSSICP'08 Choco 8 / 25

The Choco constraint solver Embedded Search Heuristics General features Choco proposes a set of implemented Search Heuristics. Two kinds are distinguished : Variable choice : MinDomain, RandomIntVarSelector, StaticVarOrder, DomOverDeg, DomOverDynDeg, DomOverWDeg, DomOverFailureDeg, LexIntVarSelector,... Value choice for a Variable : DecreasingDomain, IncreasingDomain, MaxVal, MinVal, MidVal, RealIncreasingDomain, RandomIntValSelector, RandomSetValSelector,... '08/05 OSSICP'08 Choco 9 / 25

The practice of Choco Outline 1 The Choco constraint solver 2 The practice of Choco A First Problem The Nqueens problem Custom branching Good Practice 3 Choco around the World 4 The future of Choco 5 Acknowledgements '08/05 OSSICP'08 Choco 10 / 25

The practice of Choco x + y = z A First Problem Two parts : the Model and a Solver. Model m = new CPModel() ; Solver s = new CPSolver() ; '08/05 OSSICP'08 Choco 11 / 25

The practice of Choco x + y = z A First Problem Two parts : the Model and a Solver. Model m = new CPModel() ; Solver s = new CPSolver() ; Model = Variables + Expressions + Constraints. IntegerVariable v1 = makeboundintvar(v1,1,5) ; IntegerVariable v2 = makeboundintvar(v2,1,5) ; IntegerVariable v3 = makeboundintvar(v3,1,5) ; IntegerExpressionVariable e1 = plus(v1,v2) ; Constraint c1 = eq(v3,e1) ; '08/05 OSSICP'08 Choco 11 / 25

The practice of Choco x + y = z A First Problem Two parts : the Model and a Solver. Model m = new CPModel() ; Solver s = new CPSolver() ; Model = Variables + Expressions + Constraints. IntegerVariable v1 = makeboundintvar(v1,1,5) ; IntegerVariable v2 = makeboundintvar(v2,1,5) ; IntegerVariable v3 = makeboundintvar(v3,1,5) ; IntegerExpressionVariable e1 = plus(v1,v2) ; Constraint c1 = eq(v3,e1) ; Linking Variables and Constraints m.addvariable(v1,v2,v3) ; m.addconstraint(c1) ; '08/05 OSSICP'08 Choco 11 / 25

The practice of Choco x + y = z A First Problem Two parts : the Model and a Solver. Model m = new CPModel() ; Solver s = new CPSolver() ; Model = Variables + Expressions + Constraints. IntegerVariable v1 = makeboundintvar(v1,1,5) ; IntegerVariable v2 = makeboundintvar(v2,1,5) ; IntegerVariable v3 = makeboundintvar(v3,1,5) ; IntegerExpressionVariable e1 = plus(v1,v2) ; Constraint c1 = eq(v3,e1) ; Linking Variables and Constraints m.addvariable(v1,v2,v3) ; m.addconstraint(c1) ; Feeding the Model to the Solver s.read(m) ; s.solve() ; '08/05 OSSICP'08 Choco 11 / 25

The practice of Choco Problem and Variables declaration The Nqueens problem A well-known problem : the nqueens problem Model and Solver declarations Model m = new CPModel() ; Solver s = new CPSolver() ; A model using three kinds of Variables IntegerVariable[] q = new IntegerVariable[n] ; IntegerVariable[] d1 = new IntegerVariable[n] ; IntegerVariable[] d2 = new IntegerVariable[n] ; i [1, n], q[i] = makeenumintvar(q+i,1,n) ; i [1, 2 n], d1[i] = makeenumintvar(d1-+i,1,2 n) ; i [1, 2 n], d2[i] = makeenumintvar(d2-+i, n,n) ; '08/05 OSSICP'08 Choco 12 / 25

The practice of Choco Constraint declaration The Nqueens problem Model and Solver declarations A model using three kinds of Variables Equality (channeling) constraints are dened : Constraint[] equalities = new Constraint[2 n] ; int i,j = 0 ; while (i < n) { equalities[j] = eq(d1[i],plus(q[i],i)) ; equalities[j+1] = eq(d2[i],minus(q[i],i)) ; i++ ; j+=2 ; } AllDierent constraints are dened Constraint[] alldiff = new Constraint[3] ; alldiff[0] = alldifferent(q) ; alldiff[1] = alldifferent(d1) ; alldiff[2] = alldifferent(d2) ; '08/05 OSSICP'08 Choco 13 / 25

The practice of Choco The Nqueens problem Relating Variables and Constraints Model and Solver declarations A model using three kinds of Variables Constraint declaration. Relating Variables and Constraints in the Model. m.addvariable(q) ; m.addvariable(d1) ; m.addvariable(d2) ; m.addconstraint(equalities) ; m.addconstraint(alldiff) ; '08/05 OSSICP'08 Choco 14 / 25

The practice of Choco Search Heuristic and Resolution The Nqueens problem Model and Solver declarations A model using three kinds of Variables Constraint declaration. Relating Variables and Constraints in the Model. Feeding the Model to the Solver : s.read(m) ; A search heuristic : choosing a Variable whose domain has a minimum size... s.setvarintselector(new MinDomain(s,s.getVar(q))) ; Resolution begins... s.solve() ; '08/05 OSSICP'08 Choco 15 / 25

The practice of Choco Custom branching Customizing the search Customizing the search can be done by custom branching (for instance) Creating an AbstractargeIntBranching class s.attachgoal(new DichotomicBranching(s.getVar(q))) ;... DichotomicBranching extends AbstractLargeIntBranching { Implementing some functions like public int getfirstbranch(object x) { return 1 ; } public int getnextbranch(...) { return i+1 ; } public boolean finishedbranching(..) { return i == 2 ; } public void godownbranch(..)... {... int middle = (var.getsup() + var.getinf()) / 2 ; if (i == 1) var.setsup(middle) ; else var.setinf(middle + 1) ; '08/05 OSSICP'08 Choco 16 / 25

The practice of Choco In a few words Good Practice Keep your mind, in Choco : Modeling and search are separated through Model and Solver Variables and Constraints are separated from Model and Solver The Choco philosophy : an open, user-oriented constraint solver a clear separation between model and solver a living solver '08/05 OSSICP'08 Choco 17 / 25

Choco around the World Outline 1 The Choco constraint solver 2 The practice of Choco 3 Choco around the World 4 The future of Choco 5 Acknowledgements '08/05 OSSICP'08 Choco 18 / 25

Choco around the World Academic usage of Choco (as far as we know) in France : Universities : Nantes, Montpellier, Rennes, Toulouse, Clermont-Ferrand Engineering schools : ENSTA, Ecole des Mines de Nancy, Ecole des Mines de Nantes in Europe : UK : University of Glasgow Ireland : University of Cork '08/05 OSSICP'08 Choco 19 / 25

Choco around the World Industry usage of Choco (as far as we know) Big companies : Bouygues, Amadeus, Dassault Research agencies : ONERA, NASA Software and Integrators : Kls-Optim, alfaplan GmbH '08/05 OSSICP'08 Choco 20 / 25

The future of Choco Outline 1 The Choco constraint solver 2 The practice of Choco 3 Choco around the World 4 The future of Choco 5 Acknowledgements '08/05 OSSICP'08 Choco 21 / 25

The future of Choco Choco diusion A ChocoDay alongside the French CP days (in June) For the rst time : contestant within the CP solver competition A dynamic website : downloads, teaching material, demo material, etc. '08/05 OSSICP'08 Choco 22 / 25

The future of Choco Current hot topics inside choco integrating explanations (PaLM V2) implementing automatic reformulation techniques global constraint automatic and generic generation integration with LP! '08/05 OSSICP'08 Choco 23 / 25

Acknowledgements Outline 1 The Choco constraint solver 2 The practice of Choco 3 Choco around the World 4 The future of Choco 5 Acknowledgements '08/05 OSSICP'08 Choco 24 / 25

Acknowledgements The Choco team the founding fathers François Laburthe (Amadeus), Narendra Jussien (EMN, LINA) the core team Guillaume Rochart (Bouygues), Hadrien Cambazard (4C) the new generation Charles Prud'homme (EMN project management), Xavier Lorca (EMN teaching, training), Guillaume Richaud (EMN dev.), Julien Menana (EMN dev.), Arnaud Malapert (EMN dev.) the funding fathers École des Mines de Nantes, Bouygues SA, Amadeus SA '08/05 OSSICP'08 Choco 25 / 25