Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files...

38
Constraint Programming Chapter Overview Chapter Details Chapter 1: Introduction Helmut Simonis Cork Constraint Computation Centre Computer Science Department University College Cork Ireland ECLiPSe ELearning Overview Helmut Simonis Introduction 1

Transcript of Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files...

Page 1: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Chapter 1: Introduction

Helmut Simonis

Cork Constraint Computation CentreComputer Science Department

University College CorkIreland

ECLiPSe ELearning Overview

Helmut Simonis Introduction 1

Page 2: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Licence

This work is licensed under the Creative CommonsAttribution-Noncommercial-Share Alike 3.0 Unported License.To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ orsend a letter to Creative Commons, 171 Second Street, Suite300, San Francisco, California, 94105, USA.

Helmut Simonis Introduction 2

Page 3: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Outline

1 Constraint Programming

2 Chapter Overview

3 Chapter Details

Helmut Simonis Introduction 3

Page 4: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

What we want to introduce

Constraint ProgrammingUsing ECLiPSe LanguageWith Saros Eclipse IDE

Helmut Simonis Introduction 4

Page 5: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Outline

1 Constraint Programming

2 Chapter Overview

3 Chapter Details

Helmut Simonis Introduction 5

Page 6: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Constraint Programming (CP)

Solve hard combinatorial problemsWith minimal programming effortExploit strategies and heuristicsUnderstand and control problem solving

Helmut Simonis Introduction 6

Page 7: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

ECLiPSe Language

Open source constraint programming languageFlexible toolkit to develop/use constraintsContains different constraint solversHere: Use of finite domains/(mixed) integer programming

Helmut Simonis Introduction 7

Page 8: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Aims and Outcomes

Understand what constraint programming isHow constraint programs can be applied to a problemWhich application problems are good candidates for CPHow to write/run/analyze simple ECLiPSe programs

Helmut Simonis Introduction 8

Page 9: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

You should already know about...

No hard requirementsBasic understanding of programming assumedUseful to have some background in one of:

Network ManagementInteger ProgrammingCombinatorial Optimization

Helmut Simonis Introduction 9

Page 10: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Choices of materials

Slides PDF files for computer viewingContains animations of visualizationLarge file sizes

Handout PDF files for printing2 slides per pageDoes not contain all animations

Video Video presentation with audio (640x480 pixels)iPhone Video presentation tuned for iPhone display

(480x320 pixels)

Helmut Simonis Introduction 10

Page 11: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Outline

1 Constraint Programming

2 Chapter Overview

3 Chapter Details

Helmut Simonis Introduction 11

Page 12: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Chapters

Introduction (You are here) Video iPhone Slides Handout

First Steps - Hello World Video iPhone Slides Handout

Application Overview Video iPhone Slides Handout

Basic Constraint Reasoning Video iPhone Slides Handout

Global Constraints Video iPhone Slides Handout

Search Strategies Video iPhone Slides Handout

Optimization Video iPhone Slides Handout

Symmetry Breaking Video iPhone Slides Handout

Choosing the Model Video iPhone Slides Handout

Customizing Search Video iPhone Slides Handout

Limits of Propagation Video iPhone Slides Handout

Systematic Development Video iPhone Slides Handout

Visualization Techniques Video iPhone Slides Handout

Finite Set and Continuous Variables Video iPhone Slides Handout

Network Applications Video iPhone Slides Handout

More Global Constraints Video iPhone Slides Handout

Helmut Simonis Introduction 12

Page 13: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

More Chapters

Using Mixed Integer Linear Programming Video iPhone Slides Handout

A Hybrid Model Video iPhone Slides Handout

Comparing Technologies Video iPhone Slides Handout

Working with Implications Video iPhone Slides Handout

Adding Material Video iPhone Slides Handout

Lessons Learned Video iPhone Slides Handout

Helmut Simonis Introduction 13

Page 14: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Applications

Application Overview Video iPhone Slides Handout

SEND+MORE=MONEY Video iPhone Slides Handout

Sudoku Video iPhone Slides Handout

N-Queens Video iPhone Slides Handout

Routing and Wavelength Assignment Video iPhone Slides Handout

RWA - Demand Acceptance 1 Video iPhone Slides Handout

RWA - Demand Acceptance 2 Video iPhone Slides Handout

RWA - Static Design 2 Video iPhone Slides Handout

Balanced Incomplete Block Designs Video iPhone Slides Handout

Sports Scheduling Video iPhone Slides Handout

Progressive Party Video iPhone Slides Handout

Costas Array Video iPhone Slides Handout

SONET/SDH Ring Design Video iPhone Slides Handout

Network Applications Video iPhone Slides Handout

Car Sequencing Video iPhone Slides Handout

Shikaku Video iPhone Slides Handout

Helmut Simonis Introduction 14

Page 15: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Outline

1 Constraint Programming

2 Chapter Overview

3 Chapter Details

Helmut Simonis Introduction 15

Page 16: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Introduction

Aims and OutcomesOverview of chaptersHyperlinks to all materials

Video iPhone Slides Handout

Helmut Simonis Introduction 16

Page 17: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

First Steps - Hello World

How to install ECLiPSe and SarosWriting a first programRunning the programWhere to find information

Video iPhone Slides Handout

Helmut Simonis Introduction 17

Page 18: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Application Overview

Why constraint programming is interestingSolving industrial problems with CPMain application areas

AssignmentSchedulingNetwork problemsTransportationPersonnel Assignment

Video iPhone Slides Handout

Helmut Simonis Introduction 18

Page 19: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Basic Constraint Reasoning - SEND+MORE =MONEY

Finite Domain variablesCP: Variables + Constraints + SearchBounds reasoning on arithmetic constraintsSimple visualizers

Video iPhone Slides Handout

Helmut Simonis Introduction 19

Page 20: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Global Constraints - Sudoku

Modellimg the Sudoku puzzleOne model, different behavioursGlobal constraint: alldifferentBounds and domain consistencyA domain consistent alldifferent

Video iPhone Slides Handout

Helmut Simonis Introduction 20

Page 21: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Search Strategies - N Queens

How to search for a solutionVariable and value choiceHow to avoid deep backtrackingPartial search strategies

Video iPhone Slides Handout

Helmut Simonis Introduction 21

Page 22: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Optimization - Routing and Wavelength Assignment

OptimizationGraph algorithms libraryInteger Programming with eplex

Problem decompositionRouting and Wavelength Assignment in Optical Networks

Video iPhone Slides Handout

Helmut Simonis Introduction 22

Page 23: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Symmetry Breaking - Balanced Incomplete BlockDesigns

Balanced Incomplete Block DesignsPlanning Experiments and Testing FeaturesProblems with highly symmetrical structureSymmetry Breaking with lex constraints

Video iPhone Slides Handout

Helmut Simonis Introduction 23

Page 24: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Choosing the Model - Sports Scheduling

Complex sports scheduling problemHow to decide which model to useImproving reasoning by channeling

Video iPhone Slides Handout

Helmut Simonis Introduction 24

Page 25: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Customizing Search - Progressive Party

Scheduling Meetings between TeamsTeams only meet onceCapacity LimitsBuild customized search routines tailored to problemProblem decomposition: decide which problem to solve

Video iPhone Slides Handout

Helmut Simonis Introduction 25

Page 26: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Limits of Propagation - Costas Array

Antenna/Sonar DesignHard Benchmark ProblemNaive Enumeration works bestWhen clever reasoning doesn’t pay offCautionary Tale

Video iPhone Slides Handout

Helmut Simonis Introduction 26

Page 27: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Systematic Development

Developing ProgramsTestingProfilingDocumentation

Video iPhone Slides Handout

Helmut Simonis Introduction 27

Page 28: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Visualization Techniques

How to visualize constraint programsVariable VisualizersUnderstanding Search TreesConstraint VisualizersComplex Visualizations

Video iPhone Slides Handout

Helmut Simonis Introduction 28

Page 29: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Finite Set and Continuous Variables - SONET DesignProblem

Finite set variablesContinuous domainsOptimization from belowAdvanced symmetry breakingSONET design problem without inter-ring traffic

Video iPhone Slides Handout

Helmut Simonis Introduction 29

Page 30: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Network Applications

Overview of Network ApplicationsTraffic PlacementCapacity ManagementNetwork DesignUsing Advanced Techniques

Video iPhone Slides Handout

Helmut Simonis Introduction 30

Page 31: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

More Global Constraints - Car Sequencing

New global constraints: gcc and sequence

Choosing a better search strategy

Video iPhone Slides Handout

Helmut Simonis Introduction 31

Page 32: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Using Mixed Integer Linear Programming - RWADemand Acceptance 1

Mixed Integer Linear Programming in ECLiPSeeplex LibaryAlternative Models for Routing and WavelengthAssignment in Optical Networks

Video iPhone Slides Handout

Helmut Simonis Introduction 32

Page 33: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

A Hybrid Model - RWA Demand Acceptance 2

Hybridisation by decompositionCombination of MIP and FD solverBest current solution to routing and wavelengthassignment problem

Video iPhone Slides Handout

Helmut Simonis Introduction 33

Page 34: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Comparing Technologies

Compare static design and demand acceptance versionsof RWASee impact of objective functionCompare finite domain, MIP and SAT solutions

Video iPhone Slides Handout

Helmut Simonis Introduction 34

Page 35: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Working with Implications - Shikaku

Solving a placement problem without specializedconstraintsDecomposition into pattern generation and set partitioningUsing implications to propagate information

Video iPhone Slides Handout

Helmut Simonis Introduction 35

Page 36: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Adding Material

How to add new chaptersCopying template filesConfiguring templatesAdding frames to bodyIntegrating with other chapters

Video iPhone Slides Handout

Helmut Simonis Introduction 36

Page 37: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

Lessons Learned

New ELearning course for ECLiPSeModelling and programming with constraintsBased on sample problems solved and explained in detailA view on core constraint programming skillsStrong dependence on visualization to explain behavior

Video iPhone Slides Handout

Helmut Simonis Introduction 37

Page 38: Chapter 1: Introduction · Contains animations of visualization Large file sizes HandoutPDF files for printing 2 slides per page Does not contain all animations VideoVideo presentation

Constraint ProgrammingChapter Overview

Chapter Details

To continue

Branch from here to all materialsChoose presentation form which suits you

Helmut Simonis Introduction 38