SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
May 25, 2016
© 2016 IBM Corporation
An introduction to CP Optimizer
Philippe Laborie
IBM Analytics, Decision Optimization
© 2016 IBM Corporation2
Outline
1) Overview of CP Optimizer
2) Modeling concepts
3) Automatic search
4) Development tools
© 2016 IBM Corporation3
Overview of CP Optimizer
 A component of IBM ILOG CPLEX Optimization Studio
 A Constraint Programming engine for combinatorial problems
(including scheduling problems)
 Implements a Model & Run paradigm (like CPLEX)
– Model: Concise yet expressive modeling language
– Run: Powerful automatic search procedure
Search algorithm is complete
 Available through the following interfaces:
– OPL
– C++ (native interface)
– Python, Java, .NET (wrapping of the C++ engine)
 Set of tools to support the development of efficient models
© 2016 IBM Corporation4
Overview of CP Optimizer
 First version in 2007/2008
 Search “CP Optimizer” on Google Scholar to get an idea of how
CP Optimizer is being used across academy and industry
2007 2008 2009 2010 2011 2012 2013 2014 2015
0
10
20
30
40
50
60
70
80
90
100
Google Scholar citations (“CP Optimizer”) per year
© 2016 IBM Corporation5
Overview of CP Optimizer
User model
OPL,C++,Python,Java,.NET
Model
Solution Automatic Solve
 Model & Run paradigm
© 2016 IBM Corporation6
Overview of CP Optimizer
© 2016 IBM Corporation7
Overview of CP Optimizer
Interval variables
© 2016 IBM Corporation8
Overview of CP Optimizer
Functions
© 2016 IBM Corporation9
Modeling concepts
 Two main types of decision variables:
– Integer variables
– Interval variables
© 2016 IBM Corporation10
Modeling concepts (integer variables)
Variables Expressions Constraints
Variables are discrete
integer
Domains can be
specified as a range
[1..50] or as a set of
values {1, 3, 5, 7, 9}
dvar int x in 1..50
Expressions can be integer or
floating-point, for example
0.37*y is allowed
Basic arithmetic (+,-,*,/) and
more complex operators
(min, max, log, pow etc.) are
supported
Relational expressions can be
treated as 0-1 expressions.
e.g. x = (y < z)
Special expressions:
x == a[y]
x == count(Y, 3)
y == cond ? y : z
Rich set of constraints:
Standard relational constraints
(==, !=, <, >, <=, >=)
Logical combinators
(&&, ||, !, =>)
Specialized (global) constraints
allDifferent(X)
allowedAssignments(X, tuples)
forbiddenAssignments(X, tuples)
pack(load, container, size)
lexicographic(X,Y)
inverse(X,Y)
© 2016 IBM Corporation11
Modeling concepts (interval variables for scheduling)
 Scheduling (our definition of):
– Scheduling consist of assigning starting and completion times to a
set of activities while satisfying different types of constraints
(resource availability, precedence relationships, … ) and optimizing
some criteria (minimizing tardiness, …)
– Time is considered as a continuous dimension: domain of possible
start/completion times for an activity is potentially very large
– Beside start and completion times of activities, other types of
decision variables are often involved in real industrial scheduling
problems (resource allocation, optional activities …)
start end
Timeactivity
© 2016 IBM Corporation12
Modeling concepts (interval variables for scheduling)
 Extension of classical CSP with a new type of decision variable:
optional interval variable :
Domain(x) Í {}  { [s,e) | s,e, s≤e }
 Introduction of mathematical notions such as sequences and
functions to capture temporal aspects of scheduling problems
Absent interval Interval of
integers
© 2016 IBM Corporation13
Modeling concepts (interval variables for scheduling)
 In scheduling models, interval variables usually represent an
interval of time whose end-points (start/end) are decision
variables of the problem
 Examples:
– A production order, an operation in a production order
– A sub-project in a project, a task in a sub-project
– A batch of operations
– The setup of a tool on a machine
– The moving of an item by a transportation device
– The utilization interval of a machine
– The filling or emptying of a tank
 Idea of the model (and search) is to avoid the enumeration of
start/end values
© 2016 IBM Corporation14
Modeling concepts (interval variables for scheduling)
 An interval variable can be optional meaning that it is a decision
to have it present or absent in a solution.
 Examples:
– Unperformed tasks and optional sub-projects
– Alternative resources, modes or recipes for processing an order, each
mode specifying a particular combination of operational resources
– Operations that can be processed in different temporal modes (e.g.
series or parallel), left unperformed or externalized
– Activities that can be performed in an alternative set of batches or
shifts
© 2016 IBM Corporation15
Example: Resource Constrained Project Scheduling Problem
 RCPSP: a very classical academical scheduling problem
– Tasks ai
with fixed processing time Pi
– Precedence constraints
– Discrete resources with limited instantaneous capacity Rk
– Tasks require some quantity of discrete resources
– Objective is to minimize the schedule makespan
a1
a3
a2
a6
a5
a4
a7
a8
R1
R2
© 2016 IBM Corporation16
Example: Resource Constrained Project Scheduling Problem
 RCPSP: Standard time-indexed MIP formulation
ai
Pi
xit
 {0,1}
© 2016 IBM Corporation17
Example: Resource Constrained Project Scheduling Problem
 Basic CP Optimizer model for RCPSP:
© 2016 IBM Corporation18
Example: Resource Constrained Project Scheduling Problem
 Comparison of this time-indexed MIP formulation against the CP
Optimizer model on a set of:
– 300 classical small RCPSP instances (30-120 tasks) +
– 40 slightly more realistic larger ones (900 tasks)
– time-limit: 2mn, 4 threads
 Note: industrial scheduling problems are often much larger,
typically several 1.000 tasks (we handled up to 1.000.000 tasks in
an RCPSP-like scheduling application in V12.6)
© 2016 IBM Corporation19
Example: Resource Constrained Project Scheduling Problem
 Comparison of CP Optimizer and MIP performance on RCPSP
© 2016 IBM Corporation20
Example: Job-shop Scheduling Problem
 Example: Job-shop Scheduling Problem
 Minimization of makespan
op11 op12 op13
M1
M2
M3
op21 op22 op23
op31 op32 op33
op41 op42 op43
© 2016 IBM Corporation21
Example: Job-shop Scheduling Problem
 CP Optimizer model for Job-shop:
© 2016 IBM Corporation22
Example: Job-shop Scheduling Problem
 Properties:
– Complexity is independent of the time scale
– CP Optimizer is able to reason globally over a sequence variable
– Avoid quadratic models over each pair (i,j) of intervals in the
sequence
 Compare:
– Quadratic disjunctive MIP formulation with big-Ms:
b[i][j]{0,1} // b[i][j]=1 iff a[i] before a[j]
end[i] <= start[j] + M*(1-b[i][j])
end[j] <= start[i] + M*b[i][j]
– CP Optimizer model:
a[i]
Time
noOverlap(all(i in …) a[i])
a[j]
…
© 2016 IBM Corporation23
Example: Job-shop Scheduling Problem
 Comparison of the CP Optimizer model vs a disjunctive MIP
formulation on a set of 140 classical Job-shop instances (50-2000
tasks), time-limit: 2mn, 4 threads
 See [1] for some comparisons against more sophisticated MIP
models for Job-shop scheduling (but with similar conclusions)
[1] W.Y. Ku and J. C. Beck. Mixed Integer Programming Models for Job Shop
Scheduling: A Computational Analysis. Computers & Operations Research,
2016
© 2016 IBM Corporation24
Example: Job-shop Scheduling Problem
 Comparison of CP Optimizer and MIP performance on Job-Shop
© 2016 IBM Corporation25
Example: Flexible Job-shop Scheduling Problem
 CP Optimizer model
© 2016 IBM Corporation26
CP Optimizer modeling concepts
 CP Optimizer has mathematical concepts that naturally map to
features invariably found in industrial scheduling problems
Optional interval
variables
Intensity functions
Sequence variables
Cumul functions
Optional activities
Over-constrained problems
Resource alloc. / alternatives
Work-breakdown structures
Calendars
Resource efficiency Unary resources
Setup times/costs
Travel times/costs
Cumulative resources
Inventories
Reservoirs
General arithmetical
expressions
Earliness/tardiness costs
Net Present Value
State functions
Parallel batches,
Activity incompatibilities
© 2016 IBM Corporation27
Automatic Search
 Search algorithm is Complete
 Core CP techniques used as a building block:
– Tree search (Depth First)
– Constraint propagation
 But also:
– Deterministic multicore parallelism
– Model presolve
– Algorithms portfolios
– Machine learning
– Restarting techniques
– Large Neighborhood Search
– No-good learning
– Impact-based branching
– Opportunistic probing
– Dominance rules
– LP-assisted heuristics
– Randomization
– Evolutionary algorithms
© 2016 IBM Corporation28
Automatic Search – Constraint propagation
 Dedicated Propagation Algorithms for Scheduling
– Edge-Finding
– Not-First/Not-Last
– Detectable Precedences
– Timetable
– Timetable Edge-Finding
– Max Energy Filtering
– etc.
Edge-Finding: C cannot start before 18.
© 2016 IBM Corporation29
Automatic Search – Large Neighborhood Search (LNS)
 LNS is able to converge very quickly to quality solutions
1) Start with an existing solution
© 2016 IBM Corporation30
Automatic Search – Large Neighborhood Search (LNS)
 LNS is able to converge very quickly to quality solutions
1) Start with an existing solution
2)Take part the solution and relax it, fix structure of the rest (but not
start/end times)
relax keep rigid
© 2016 IBM Corporation31
Automatic Search – Large Neighborhood Search (LNS)
 LNS is able to converge very quickly to quality solutions
1) Start with an existing solution
2)Take part the solution and relax it, fix structure of the rest (but not
start/end times)
relax keep rigid
© 2016 IBM Corporation32
Automatic Search – Large Neighborhood Search (LNS)
 LNS is able to converge very quickly to quality solutions
1) Start with an existing solution
2)Take part the solution and relax it, fix structure of the rest (but not
start/end times)
3) Find (improved) solution
improve kept rigid
© 2016 IBM Corporation33
Automatic Search – LP-assisted heuristics
 Traditionally, early/tardy problems are challenging for CP-based
scheduling tools as they miss a good global view of the cost
 Approach:
– Automatically use CPLEX's LP solver to provide a solution to a relaxed
version of the problem
– Use the LP solution to guide heuristics. Start an operation as close as
possible to the time proposed by CPLEX
 What is linearized?
– Precedences
– Execution / non-execution costs, logical constraints on optional intervals
– “Alternative” and “Span” constraints
– Cost function terms which are functions of start/end times
cost
x
cost
x
cost
x
cost
x
cost
x
© 2016 IBM Corporation34
Automatic Search: some results
© 2016 IBM Corporation35
Automatic Search: some results
– Problem #1: Flow-shop with earliness/tardiness cost
– Problem #2: Oversubscribed Satellite Scheduling problem
– Problem #3: Personal tasks scheduling
© 2016 IBM Corporation36
Automatic Search: some results
© 2016 IBM Corporation37
Automatic Search: some results
 Industrial Modelling Competition at CP 2015
 http://booleconferences.ucc.ie/indmodellingcomp
 CP Optimizer outperformed all the other competitors on all the
instances of the challenge
© 2016 IBM Corporation38
Automatic Search
 Some CP Optimizer industrial applications:
– Port Management: Yantian International Container Terminals, Navis
– Manufacturing: Ajover S.A. (plastics), TAL Group (textiles), Danieli
(metallurgy)
– Aviation: Dassault Aviation, another large jet manufacturer
– Workforce scheduling: A world leading IFS (Integrated Facility
Services) company
© 2016 IBM Corporation39
Warnings
Warm start
Development tools
User model
Internal model
Model analysis Model presolve
Conflict
Model
Solution
CPO file
Search log
Failure explainer
Automatic Solve
Conflict refinerFail expl.
OPL,C++,Python,Java,.NET
© 2016 IBM Corporation40
CPLEX and CP Optimizer are in the same ecosystem
CPLEX CP Optimizer
Interfaces OPL, C++, Java, .NET, C,
Python
OPL, C++, Java, .NET,
Python
Model Decision variables int, float int, interval
Expressions linear, quadratic arithmetic, log, pow, …
relational, a[x], count,...
Constraints range relational, logical,
specialized, scheduling
Search Search parameters
Warm start
Multi-core //
Tools Search log
I/O format .lp, .mps, ... .cpo
Conflict refiner

Más contenido relacionado

La actualidad más candente

Simulated annealing.ppt
Simulated annealing.pptSimulated annealing.ppt
Simulated annealing.ppt
Kaal Nath
 
Business continuity planning
Business continuity planningBusiness continuity planning
Business continuity planning
Sandeep Kashyap
 
Or graphical method, simplex method
Or graphical method, simplex methodOr graphical method, simplex method
Or graphical method, simplex method
nagathangaraj
 

La actualidad más candente (20)

Simulated annealing.ppt
Simulated annealing.pptSimulated annealing.ppt
Simulated annealing.ppt
 
Simulated annealing
Simulated annealingSimulated annealing
Simulated annealing
 
Metaheuristic Optimization: Algorithm Analysis and Open Problems
Metaheuristic Optimization: Algorithm Analysis and Open ProblemsMetaheuristic Optimization: Algorithm Analysis and Open Problems
Metaheuristic Optimization: Algorithm Analysis and Open Problems
 
The Art of Estimating - Andy Nolan
The Art of Estimating - Andy NolanThe Art of Estimating - Andy Nolan
The Art of Estimating - Andy Nolan
 
business case studies .pdf
business case studies .pdfbusiness case studies .pdf
business case studies .pdf
 
Introduction to Optimization.ppt
Introduction to Optimization.pptIntroduction to Optimization.ppt
Introduction to Optimization.ppt
 
Business continuity planning
Business continuity planningBusiness continuity planning
Business continuity planning
 
Introduction to optimization Problems
Introduction to optimization ProblemsIntroduction to optimization Problems
Introduction to optimization Problems
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
Chap003 Forecasting
Chap003    ForecastingChap003    Forecasting
Chap003 Forecasting
 
Or graphical method, simplex method
Or graphical method, simplex methodOr graphical method, simplex method
Or graphical method, simplex method
 
Quantitative Techniques
Quantitative TechniquesQuantitative Techniques
Quantitative Techniques
 
Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms
 
Swarm intelligence and particle swarm optimization
Swarm intelligence and particle swarm optimizationSwarm intelligence and particle swarm optimization
Swarm intelligence and particle swarm optimization
 
Linear programming graphical method
Linear programming graphical methodLinear programming graphical method
Linear programming graphical method
 
Back to basics - Earned Value Management for beginners webinar
Back to basics - Earned Value Management for beginners webinarBack to basics - Earned Value Management for beginners webinar
Back to basics - Earned Value Management for beginners webinar
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
12. Project Risk Management
12. Project Risk Management12. Project Risk Management
12. Project Risk Management
 
Production and Operation Management Lecture Notes
Production and Operation Management Lecture NotesProduction and Operation Management Lecture Notes
Production and Operation Management Lecture Notes
 

Destacado

Wsd as distributed constraint optimization problem
Wsd as distributed constraint optimization problemWsd as distributed constraint optimization problem
Wsd as distributed constraint optimization problem
lolokikipipi
 
2012 3 qp_hybrid algorithm optimization with artificial intelligence
2012 3 qp_hybrid algorithm optimization with artificial intelligence 2012 3 qp_hybrid algorithm optimization with artificial intelligence
2012 3 qp_hybrid algorithm optimization with artificial intelligence
Jong MIn Yu
 

Destacado (19)

Conditional interval variables: A powerful concept for modeling and solving c...
Conditional interval variables: A powerful concept for modeling and solving c...Conditional interval variables: A powerful concept for modeling and solving c...
Conditional interval variables: A powerful concept for modeling and solving c...
 
CP Optimizer Walkthrough
CP Optimizer WalkthroughCP Optimizer Walkthrough
CP Optimizer Walkthrough
 
Cp04invitedslide
Cp04invitedslideCp04invitedslide
Cp04invitedslide
 
Model Presolve, Warmstart and Conflict Refining in CP Optimizer
Model Presolve, Warmstart and Conflict Refining in CP OptimizerModel Presolve, Warmstart and Conflict Refining in CP Optimizer
Model Presolve, Warmstart and Conflict Refining in CP Optimizer
 
Accelerating the Development of Efficient CP Optimizer Models
Accelerating the Development of Efficient CP Optimizer ModelsAccelerating the Development of Efficient CP Optimizer Models
Accelerating the Development of Efficient CP Optimizer Models
 
Optimization: from mathematical tools to real applications
Optimization: from mathematical tools to real applicationsOptimization: from mathematical tools to real applications
Optimization: from mathematical tools to real applications
 
Reasoning with Conditional Time-intervals
Reasoning with Conditional Time-intervalsReasoning with Conditional Time-intervals
Reasoning with Conditional Time-intervals
 
An Optimal Iterative Algorithm for Extracting MUCs in a Black-box Constraint ...
An Optimal Iterative Algorithm for Extracting MUCs in a Black-box Constraint ...An Optimal Iterative Algorithm for Extracting MUCs in a Black-box Constraint ...
An Optimal Iterative Algorithm for Extracting MUCs in a Black-box Constraint ...
 
Local coordination in online distributed constraint optimization problems - P...
Local coordination in online distributed constraint optimization problems - P...Local coordination in online distributed constraint optimization problems - P...
Local coordination in online distributed constraint optimization problems - P...
 
Wsd as distributed constraint optimization problem
Wsd as distributed constraint optimization problemWsd as distributed constraint optimization problem
Wsd as distributed constraint optimization problem
 
Opl
OplOpl
Opl
 
Product Mix Optimization Case Study - OPL/ CPLEX Code
Product Mix Optimization Case Study - OPL/ CPLEX Code Product Mix Optimization Case Study - OPL/ CPLEX Code
Product Mix Optimization Case Study - OPL/ CPLEX Code
 
Logica | Intelligent Self learning - a helping hand in financial crime
Logica | Intelligent Self learning - a helping hand in financial crimeLogica | Intelligent Self learning - a helping hand in financial crime
Logica | Intelligent Self learning - a helping hand in financial crime
 
Portfolio Optimization Under Uncertainty
Portfolio Optimization Under UncertaintyPortfolio Optimization Under Uncertainty
Portfolio Optimization Under Uncertainty
 
Achieving Asset Optimization: A Strategic Approach To Aligning Assets With Mi...
Achieving Asset Optimization: A Strategic Approach To Aligning Assets With Mi...Achieving Asset Optimization: A Strategic Approach To Aligning Assets With Mi...
Achieving Asset Optimization: A Strategic Approach To Aligning Assets With Mi...
 
Lessonslearnedeuro
LessonslearnedeuroLessonslearnedeuro
Lessonslearnedeuro
 
Marketing Optimization in Financial Services
Marketing Optimization in Financial ServicesMarketing Optimization in Financial Services
Marketing Optimization in Financial Services
 
Ux trend report 2014 finance
Ux trend report 2014 financeUx trend report 2014 finance
Ux trend report 2014 finance
 
2012 3 qp_hybrid algorithm optimization with artificial intelligence
2012 3 qp_hybrid algorithm optimization with artificial intelligence 2012 3 qp_hybrid algorithm optimization with artificial intelligence
2012 3 qp_hybrid algorithm optimization with artificial intelligence
 

Similar a An introduction to CP Optimizer

Industrial project and machine scheduling with Constraint Programming
Industrial project and machine scheduling with Constraint ProgrammingIndustrial project and machine scheduling with Constraint Programming
Industrial project and machine scheduling with Constraint Programming
Philippe Laborie
 
Advanced Modeling of Industrial Optimization Problems
Advanced Modeling of Industrial Optimization ProblemsAdvanced Modeling of Industrial Optimization Problems
Advanced Modeling of Industrial Optimization Problems
Alkis Vazacopoulos
 

Similar a An introduction to CP Optimizer (20)

Solving Industrial Scheduling Problems with Constraint Programming
Solving Industrial Scheduling Problems with Constraint ProgrammingSolving Industrial Scheduling Problems with Constraint Programming
Solving Industrial Scheduling Problems with Constraint Programming
 
Prespective analytics with DOcplex and pandas
Prespective analytics with DOcplex and pandasPrespective analytics with DOcplex and pandas
Prespective analytics with DOcplex and pandas
 
TenYearsCPOptimizer
TenYearsCPOptimizerTenYearsCPOptimizer
TenYearsCPOptimizer
 
Fdp session rtu session 1
Fdp session rtu session 1Fdp session rtu session 1
Fdp session rtu session 1
 
Recent advances on large scheduling problems in CP Optimizer
Recent advances on large scheduling problems in CP OptimizerRecent advances on large scheduling problems in CP Optimizer
Recent advances on large scheduling problems in CP Optimizer
 
Software_effort_estimation for Software engineering.pdf
Software_effort_estimation for Software engineering.pdfSoftware_effort_estimation for Software engineering.pdf
Software_effort_estimation for Software engineering.pdf
 
Towards Holistic Continuous Software Performance Assessment
Towards Holistic Continuous Software Performance AssessmentTowards Holistic Continuous Software Performance Assessment
Towards Holistic Continuous Software Performance Assessment
 
CP Optimizer: a generic optimization engine at the crossroad of AI and OR fo...
CP Optimizer: a generic optimization engine at the crossroad of AI and OR  fo...CP Optimizer: a generic optimization engine at the crossroad of AI and OR  fo...
CP Optimizer: a generic optimization engine at the crossroad of AI and OR fo...
 
An Update on the Comparison of MIP, CP and Hybrid Approaches for Mixed Resour...
An Update on the Comparison of MIP, CP and Hybrid Approaches for Mixed Resour...An Update on the Comparison of MIP, CP and Hybrid Approaches for Mixed Resour...
An Update on the Comparison of MIP, CP and Hybrid Approaches for Mixed Resour...
 
Industrial project and machine scheduling with Constraint Programming
Industrial project and machine scheduling with Constraint ProgrammingIndustrial project and machine scheduling with Constraint Programming
Industrial project and machine scheduling with Constraint Programming
 
Metrics
MetricsMetrics
Metrics
 
Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...Lean Model-Driven Development through  Model-Interpretation: the CPAL design ...
Lean Model-Driven Development through Model-Interpretation: the CPAL design ...
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Supply Chain Management - Optimization technology
Supply Chain Management - Optimization technologySupply Chain Management - Optimization technology
Supply Chain Management - Optimization technology
 
Best Practices with OLAP Modeling with Cognos Transformer (Cognos 8)
Best Practices with OLAP Modeling with Cognos Transformer (Cognos 8)Best Practices with OLAP Modeling with Cognos Transformer (Cognos 8)
Best Practices with OLAP Modeling with Cognos Transformer (Cognos 8)
 
Resource planning for QC labs, R&D, RA, or multi- project environments
Resource planning for QC labs, R&D, RA, or multi- project environmentsResource planning for QC labs, R&D, RA, or multi- project environments
Resource planning for QC labs, R&D, RA, or multi- project environments
 
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptxUNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
 
Advanced Modeling of Industrial Optimization Problems
Advanced Modeling of Industrial Optimization ProblemsAdvanced Modeling of Industrial Optimization Problems
Advanced Modeling of Industrial Optimization Problems
 
Production model lifecycle management 2016 09
Production model lifecycle management 2016 09Production model lifecycle management 2016 09
Production model lifecycle management 2016 09
 
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
 

Último

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

An introduction to CP Optimizer

  • 1. May 25, 2016 © 2016 IBM Corporation An introduction to CP Optimizer Philippe Laborie IBM Analytics, Decision Optimization
  • 2. © 2016 IBM Corporation2 Outline 1) Overview of CP Optimizer 2) Modeling concepts 3) Automatic search 4) Development tools
  • 3. © 2016 IBM Corporation3 Overview of CP Optimizer  A component of IBM ILOG CPLEX Optimization Studio  A Constraint Programming engine for combinatorial problems (including scheduling problems)  Implements a Model & Run paradigm (like CPLEX) – Model: Concise yet expressive modeling language – Run: Powerful automatic search procedure Search algorithm is complete  Available through the following interfaces: – OPL – C++ (native interface) – Python, Java, .NET (wrapping of the C++ engine)  Set of tools to support the development of efficient models
  • 4. © 2016 IBM Corporation4 Overview of CP Optimizer  First version in 2007/2008  Search “CP Optimizer” on Google Scholar to get an idea of how CP Optimizer is being used across academy and industry 2007 2008 2009 2010 2011 2012 2013 2014 2015 0 10 20 30 40 50 60 70 80 90 100 Google Scholar citations (“CP Optimizer”) per year
  • 5. © 2016 IBM Corporation5 Overview of CP Optimizer User model OPL,C++,Python,Java,.NET Model Solution Automatic Solve  Model & Run paradigm
  • 6. © 2016 IBM Corporation6 Overview of CP Optimizer
  • 7. © 2016 IBM Corporation7 Overview of CP Optimizer Interval variables
  • 8. © 2016 IBM Corporation8 Overview of CP Optimizer Functions
  • 9. © 2016 IBM Corporation9 Modeling concepts  Two main types of decision variables: – Integer variables – Interval variables
  • 10. © 2016 IBM Corporation10 Modeling concepts (integer variables) Variables Expressions Constraints Variables are discrete integer Domains can be specified as a range [1..50] or as a set of values {1, 3, 5, 7, 9} dvar int x in 1..50 Expressions can be integer or floating-point, for example 0.37*y is allowed Basic arithmetic (+,-,*,/) and more complex operators (min, max, log, pow etc.) are supported Relational expressions can be treated as 0-1 expressions. e.g. x = (y < z) Special expressions: x == a[y] x == count(Y, 3) y == cond ? y : z Rich set of constraints: Standard relational constraints (==, !=, <, >, <=, >=) Logical combinators (&&, ||, !, =>) Specialized (global) constraints allDifferent(X) allowedAssignments(X, tuples) forbiddenAssignments(X, tuples) pack(load, container, size) lexicographic(X,Y) inverse(X,Y)
  • 11. © 2016 IBM Corporation11 Modeling concepts (interval variables for scheduling)  Scheduling (our definition of): – Scheduling consist of assigning starting and completion times to a set of activities while satisfying different types of constraints (resource availability, precedence relationships, … ) and optimizing some criteria (minimizing tardiness, …) – Time is considered as a continuous dimension: domain of possible start/completion times for an activity is potentially very large – Beside start and completion times of activities, other types of decision variables are often involved in real industrial scheduling problems (resource allocation, optional activities …) start end Timeactivity
  • 12. © 2016 IBM Corporation12 Modeling concepts (interval variables for scheduling)  Extension of classical CSP with a new type of decision variable: optional interval variable : Domain(x) Í {}  { [s,e) | s,e, s≤e }  Introduction of mathematical notions such as sequences and functions to capture temporal aspects of scheduling problems Absent interval Interval of integers
  • 13. © 2016 IBM Corporation13 Modeling concepts (interval variables for scheduling)  In scheduling models, interval variables usually represent an interval of time whose end-points (start/end) are decision variables of the problem  Examples: – A production order, an operation in a production order – A sub-project in a project, a task in a sub-project – A batch of operations – The setup of a tool on a machine – The moving of an item by a transportation device – The utilization interval of a machine – The filling or emptying of a tank  Idea of the model (and search) is to avoid the enumeration of start/end values
  • 14. © 2016 IBM Corporation14 Modeling concepts (interval variables for scheduling)  An interval variable can be optional meaning that it is a decision to have it present or absent in a solution.  Examples: – Unperformed tasks and optional sub-projects – Alternative resources, modes or recipes for processing an order, each mode specifying a particular combination of operational resources – Operations that can be processed in different temporal modes (e.g. series or parallel), left unperformed or externalized – Activities that can be performed in an alternative set of batches or shifts
  • 15. © 2016 IBM Corporation15 Example: Resource Constrained Project Scheduling Problem  RCPSP: a very classical academical scheduling problem – Tasks ai with fixed processing time Pi – Precedence constraints – Discrete resources with limited instantaneous capacity Rk – Tasks require some quantity of discrete resources – Objective is to minimize the schedule makespan a1 a3 a2 a6 a5 a4 a7 a8 R1 R2
  • 16. © 2016 IBM Corporation16 Example: Resource Constrained Project Scheduling Problem  RCPSP: Standard time-indexed MIP formulation ai Pi xit  {0,1}
  • 17. © 2016 IBM Corporation17 Example: Resource Constrained Project Scheduling Problem  Basic CP Optimizer model for RCPSP:
  • 18. © 2016 IBM Corporation18 Example: Resource Constrained Project Scheduling Problem  Comparison of this time-indexed MIP formulation against the CP Optimizer model on a set of: – 300 classical small RCPSP instances (30-120 tasks) + – 40 slightly more realistic larger ones (900 tasks) – time-limit: 2mn, 4 threads  Note: industrial scheduling problems are often much larger, typically several 1.000 tasks (we handled up to 1.000.000 tasks in an RCPSP-like scheduling application in V12.6)
  • 19. © 2016 IBM Corporation19 Example: Resource Constrained Project Scheduling Problem  Comparison of CP Optimizer and MIP performance on RCPSP
  • 20. © 2016 IBM Corporation20 Example: Job-shop Scheduling Problem  Example: Job-shop Scheduling Problem  Minimization of makespan op11 op12 op13 M1 M2 M3 op21 op22 op23 op31 op32 op33 op41 op42 op43
  • 21. © 2016 IBM Corporation21 Example: Job-shop Scheduling Problem  CP Optimizer model for Job-shop:
  • 22. © 2016 IBM Corporation22 Example: Job-shop Scheduling Problem  Properties: – Complexity is independent of the time scale – CP Optimizer is able to reason globally over a sequence variable – Avoid quadratic models over each pair (i,j) of intervals in the sequence  Compare: – Quadratic disjunctive MIP formulation with big-Ms: b[i][j]{0,1} // b[i][j]=1 iff a[i] before a[j] end[i] <= start[j] + M*(1-b[i][j]) end[j] <= start[i] + M*b[i][j] – CP Optimizer model: a[i] Time noOverlap(all(i in …) a[i]) a[j] …
  • 23. © 2016 IBM Corporation23 Example: Job-shop Scheduling Problem  Comparison of the CP Optimizer model vs a disjunctive MIP formulation on a set of 140 classical Job-shop instances (50-2000 tasks), time-limit: 2mn, 4 threads  See [1] for some comparisons against more sophisticated MIP models for Job-shop scheduling (but with similar conclusions) [1] W.Y. Ku and J. C. Beck. Mixed Integer Programming Models for Job Shop Scheduling: A Computational Analysis. Computers & Operations Research, 2016
  • 24. © 2016 IBM Corporation24 Example: Job-shop Scheduling Problem  Comparison of CP Optimizer and MIP performance on Job-Shop
  • 25. © 2016 IBM Corporation25 Example: Flexible Job-shop Scheduling Problem  CP Optimizer model
  • 26. © 2016 IBM Corporation26 CP Optimizer modeling concepts  CP Optimizer has mathematical concepts that naturally map to features invariably found in industrial scheduling problems Optional interval variables Intensity functions Sequence variables Cumul functions Optional activities Over-constrained problems Resource alloc. / alternatives Work-breakdown structures Calendars Resource efficiency Unary resources Setup times/costs Travel times/costs Cumulative resources Inventories Reservoirs General arithmetical expressions Earliness/tardiness costs Net Present Value State functions Parallel batches, Activity incompatibilities
  • 27. © 2016 IBM Corporation27 Automatic Search  Search algorithm is Complete  Core CP techniques used as a building block: – Tree search (Depth First) – Constraint propagation  But also: – Deterministic multicore parallelism – Model presolve – Algorithms portfolios – Machine learning – Restarting techniques – Large Neighborhood Search – No-good learning – Impact-based branching – Opportunistic probing – Dominance rules – LP-assisted heuristics – Randomization – Evolutionary algorithms
  • 28. © 2016 IBM Corporation28 Automatic Search – Constraint propagation  Dedicated Propagation Algorithms for Scheduling – Edge-Finding – Not-First/Not-Last – Detectable Precedences – Timetable – Timetable Edge-Finding – Max Energy Filtering – etc. Edge-Finding: C cannot start before 18.
  • 29. © 2016 IBM Corporation29 Automatic Search – Large Neighborhood Search (LNS)  LNS is able to converge very quickly to quality solutions 1) Start with an existing solution
  • 30. © 2016 IBM Corporation30 Automatic Search – Large Neighborhood Search (LNS)  LNS is able to converge very quickly to quality solutions 1) Start with an existing solution 2)Take part the solution and relax it, fix structure of the rest (but not start/end times) relax keep rigid
  • 31. © 2016 IBM Corporation31 Automatic Search – Large Neighborhood Search (LNS)  LNS is able to converge very quickly to quality solutions 1) Start with an existing solution 2)Take part the solution and relax it, fix structure of the rest (but not start/end times) relax keep rigid
  • 32. © 2016 IBM Corporation32 Automatic Search – Large Neighborhood Search (LNS)  LNS is able to converge very quickly to quality solutions 1) Start with an existing solution 2)Take part the solution and relax it, fix structure of the rest (but not start/end times) 3) Find (improved) solution improve kept rigid
  • 33. © 2016 IBM Corporation33 Automatic Search – LP-assisted heuristics  Traditionally, early/tardy problems are challenging for CP-based scheduling tools as they miss a good global view of the cost  Approach: – Automatically use CPLEX's LP solver to provide a solution to a relaxed version of the problem – Use the LP solution to guide heuristics. Start an operation as close as possible to the time proposed by CPLEX  What is linearized? – Precedences – Execution / non-execution costs, logical constraints on optional intervals – “Alternative” and “Span” constraints – Cost function terms which are functions of start/end times cost x cost x cost x cost x cost x
  • 34. © 2016 IBM Corporation34 Automatic Search: some results
  • 35. © 2016 IBM Corporation35 Automatic Search: some results – Problem #1: Flow-shop with earliness/tardiness cost – Problem #2: Oversubscribed Satellite Scheduling problem – Problem #3: Personal tasks scheduling
  • 36. © 2016 IBM Corporation36 Automatic Search: some results
  • 37. © 2016 IBM Corporation37 Automatic Search: some results  Industrial Modelling Competition at CP 2015  http://booleconferences.ucc.ie/indmodellingcomp  CP Optimizer outperformed all the other competitors on all the instances of the challenge
  • 38. © 2016 IBM Corporation38 Automatic Search  Some CP Optimizer industrial applications: – Port Management: Yantian International Container Terminals, Navis – Manufacturing: Ajover S.A. (plastics), TAL Group (textiles), Danieli (metallurgy) – Aviation: Dassault Aviation, another large jet manufacturer – Workforce scheduling: A world leading IFS (Integrated Facility Services) company
  • 39. © 2016 IBM Corporation39 Warnings Warm start Development tools User model Internal model Model analysis Model presolve Conflict Model Solution CPO file Search log Failure explainer Automatic Solve Conflict refinerFail expl. OPL,C++,Python,Java,.NET
  • 40. © 2016 IBM Corporation40 CPLEX and CP Optimizer are in the same ecosystem CPLEX CP Optimizer Interfaces OPL, C++, Java, .NET, C, Python OPL, C++, Java, .NET, Python Model Decision variables int, float int, interval Expressions linear, quadratic arithmetic, log, pow, … relational, a[x], count,... Constraints range relational, logical, specialized, scheduling Search Search parameters Warm start Multi-core // Tools Search log I/O format .lp, .mps, ... .cpo Conflict refiner