37
IonuŃ D. Aron, IBM T. J. Watson Research Center John Hooker, Carnegie Mellon University Tallys H. Yunes, University of Miami March 2007 SIMPL: An Integrated Solver SIMPL: An Integrated Solver for Optimization Problems for Optimization Problems

SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

IonuŃ D. Aron, IBM T. J. Watson Research Center

John Hooker, Carnegie Mellon UniversityTallys H. Yunes, University of Miami

March 2007

SIMPL: An Integrated Solver SIMPL: An Integrated Solver

for Optimization Problemsfor Optimization Problems

Page 2: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

OutlineOutline

� Intro and Motivation

� SIMPL: Our General Purpose System

� Examples

� Production Planning

� Product Configuration

� Machine Scheduling

� Future Work

Page 3: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Why Integrate?Why Integrate?

� User convenience: several methods and their combinations available in one package.

� Simpler models: constraint-programming style modeling adapted to general optimization.� Model communicates problem structure to solver.

� It uses metaconstraints = generalization of global

constraints in constraint programming

� Better performance: combine the complementary strengths of different methods.� Solver chooses best mix of relaxation and propagation

methods, based on metaconstraints.

Page 4: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

SIMPLSIMPL ObjectivesObjectives

� High-level modeling language

� Concise and easily understandable models

� Natural specification of integrated models

� Allow the modeler to reveal problem structureto the solver

� Micro-level integration

� Integrated methods are more effective when the underlying technologies interact at micro level throughout the search process.

Page 5: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Models vs. problemsModels vs. problems

� Models should be distinguished from problem instances.

� MIPLIB is a collection of models, not problem instances.� Unfortunately, the problem original description is often

unknown.

� So it’s hard to write a better model.

� A model should reveal problem structure.

� Much as a scientific model.

� MIPLIB instances are better seen as formulations than models.� They are not explanatory.

Page 6: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Algorithmic Idea behind Algorithmic Idea behind SIMPLSIMPL

� CP and IP are special cases of a general method, not separate methods to be combined

� Common solution strategy:

Search – Infer – Relax

� Search = enumeration of problem restrictions

Page 7: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

For example: Classical Solution MethodsFor example: Classical Solution Methods

�� Branch and Cut (IP)Branch and Cut (IP)�� InferenceInference: preprocessing at root node, cutting planes

�� RelaxationRelaxation: dropping integrality constraints

�� SearchSearch: branching on integrality constraints

�� Typical CP solverTypical CP solver�� InferenceInference: domain reduction

�� RelaxationRelaxation: collecting reduced domains into constraint store

�� SearchSearch: domain splitting

�� Benders decompositionBenders decomposition�� InferenceInference: Benders cuts

�� RelaxationRelaxation: master problem

�� SearchSearch: creating sub-problems by fixing “hard” variables

� (Meta) Heuristics

Page 8: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Constraints,Constraints, ConstraintsConstraints……

�� InferInfer: constraints drive the inferencedrive the inference� Each constraint has a filtering/inference modulefiltering/inference module

� This module provides new constraints to tighten the relaxation

�� RelaxRelax: constraints determine the relaxationsdetermine the relaxations� Each constraint has a relaxation modulerelaxation module

� This module reformulates the constraint and sends it to the appropriate relaxation (LP, CP, MIP etc)

�� SearchSearch: constraints direct the searchdirect the search� Each constraint has a branching modulebranching module

� This module creates new problem restrictions

ConstraintConstraint--oriented modeling and solutionoriented modeling and solution

Page 9: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Example 1:Example 1: Production PlanningProduction Planning

� Manufacture several products to maximize net income

� Each product has several production modes (small scale, medium scale, etc.)

� Only certain ranges of production quantities are possible (gaps in the domain)

� Net income function f(x) is semi-continuous piecewise linear (non-convex and non-concave)

Page 10: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Production Planning: Production Planning: f(xf(x))

x

f(x)

Page 11: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Production Planning: Production Planning: MIP ModelMIP Model

� xi = quantity of product i

� yik = 1 if product i is manufactured in mode k

� λik, µik = weights for mode k (convex comb.)

i

iULx

Cx

dc

kikik

kikikikiki

ii

ikikikikik

,1)(

),(

)(max

∀=+

∀+=

+

µλ

µλ

µλ

{ } kiy

iy

kiy

kiy

ik

kik

ikik

ikik

, ,1 ,0

,1

, ,0

, ,0

∀∈

∀=∀≤≤∀≤≤

µλ

Page 12: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Production Planning: Production Planning: IntegratedIntegrated

� xi = quantity of product i

� yi = net income from product i

ii

iiiiii

ii

ii

Dx

idcULyx

Cx

y

∈∀

≤∑

),,,,,,piecewise(

max

Page 13: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Production Planning: Production Planning: IntegratedIntegrated

OBJECTIVEmaximize sum i of u[i]

CONSTRAINTScapacity means {

sum i of x[i] <= Crelaxation = { lp, cp } }

piecewisectr means {piecewise(x[i],u[i],L[i],U[i],c[i],d[i]) forall irelaxation = { lp, cp } }

SEARCHtype = { bb:bestdive }branching = { piecewisectr:most }

SIMPL ModelSIMPL Model

Page 14: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Relaxation Relaxation of piecewise constraintof piecewise constraint

X

f(X)

Page 15: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Branching Branching on piecewise constrainton piecewise constraint

X

f(X) x value OK, y value OK: no problem

Page 16: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Branching Branching on piecewise constrainton piecewise constraint

X

f(X)x value not OK:

Page 17: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Branching Branching on piecewise constrainton piecewise constraint

X

f(X)x value not OK: split domain

child 2

child 1

Page 18: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Branching Branching on piecewise constrainton piecewise constraint

X

f(X) x OK, y not OK:

Page 19: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Branching Branching on piecewise constrainton piecewise constraint

X

f(X) x OK, y not OK: 3-way branch on x

child 2

child 1

child 3

Page 20: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational ResultsComputational Results

� SIMPL

� LP solver = CPLEX 9.0.

� CP solver = Eclipse 5.8.

� MILP

� CPLEX 9.0

� Hardware

� Pentium 4, 3.7 GHz, 4GB RAM.

� Gentoo Linux kernel 2.6.12.5

Page 21: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational ResultsComputational Results

� The aim is not to show that integrated methods can be faster.

� This is shown in a growing literature.

� The aim is to show that SIMPL can achieve same or better speedups than hand-crafted integrated methods in the literature.

� With no coding and a simple model (simpler than MILP).

Page 22: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational Results: Computational Results: Search NodesSearch Nodes

All products have the same cost structureSymmetry breaking: xi ≤ xi+1

0

1

2

3

4

5

6

7

5 15 25 35 45 55 65 75 85 95

Number of Products

Lo

g(#

No

des

)

CPLEX

SIMPL

Page 23: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational Results: Computational Results: Time (s)Time (s)

-2

-1

0

1

2

3

4

5 15 25 35 45 55 65 75 85 95

Number of Products

Lo

g(T

ime

(s))

CPLEX

SIMPL

Page 24: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational resultsComputational results

� These speedups are better than those reported in the literature.

� Refalo 1999

� Ottosson, Thorsteinsson and Hooker 1999, 2002.

Page 25: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Example 2:Example 2: Product ConfigurationProduct Configuration

� A product (e.g. computer) is made up of several components (e.g. memory, cpu, etc.)

� Components come in different types

� Type j of component i consumes/produces Aijk

units of resource k

� There are lower and upper bounds on resource consumption/production

� ck = unit cost of resource k

� Minimize total cost

Page 26: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Product Configuration: Product Configuration: MIP ModelMIP Model

� vk = total consumption/production of resource k

� xij = whether or not type j is chosen for component i

� qij = units of type j of component i

{ } jixkUvL

ix

jixMq

kqAv

vc

ijkkk

jij

ijiij

jiijijkk

kkk

, ,1 ,0 and ,

,1

, ,

,

min

,

∀∈∀≤≤

∀=

∀≤

∀=

Page 27: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Product Configuration: Product Configuration: IntegratedIntegrated

� vk = total consumption/production of resource k

� qi = quantity of component i

� ti = type of component i

Modeled internally with an element constraint

kk

iijtik

kkk

Dv

kAqv

vc

i

∀=∑

,

min

Page 28: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Product Configuration: Product Configuration: IntegratedIntegrated

OBJECTIVEminimize sum j of c[j]*v[j]

CONSTRAINTSusage means {v[j] = sum i of q[i]*a[i][j][t[i]] forall jrelaxation = { lp, cp }inference = { knapsack } }

quantities means {q[1] >= 1 => q[2] = 0relaxation = { lp, cp } }

types means {t[1] = 1 => t[2] in {1,2}t[3] = 1 => (t[4] in {1,3} and t[5] in {1,3,4,6} and t[6] = 3)relaxation = { lp, cp } }

SEARCHtype = { bb:bestdive }branching = { quantities, t:most, q:least:triple, types:most }inference = { q:redcost }

SIMPL ModelSIMPL Model

Page 29: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational ResultsComputational Results

Page 30: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational ResultsComputational Results

� First application of integrated method was much faster than CPLEX at that time.

� CPLEX 7.0 stopped after 100,000 nodes on 7 of the 10 instances.

� It solved the remaining 3 with 77,000 nodes.

� Thorsteinsson and Ottosson (2001) used the integrated method to solve these instances in about the same time as SIMPL.

Page 31: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Example 3: Example 3: Machine SchedulingMachine Scheduling

� Given n tasks and m machines (disjunctive)

� It costs cij to process task i on machine j

� Processing time of task i on machine j is pij� Task i has release date ri and due date di� Goal: schedule all tasks and minimize total cost

� Use Hybrid IP/CP Benders Decompositionapproach

Page 32: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Benders DecompositionBenders Decomposition

� Master Problem

� Assign tasks to machines at minimum cost

� Regardless of release dates and due dates

� xij = 1 if task i assigned to machine j

� Subproblems

� Jobs in Ij assigned to machine j.

� Try to find feasible schedule (with given tasks)

� If infeasible for mach j, generate the Benders cut:

1−≤∑∈

jIi

ij Ixj

Page 33: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Machine Scheduling in Machine Scheduling in SIMPLSIMPL

OBJECTIVEmin sum i,j of c[i][j] * x[i][j];

CONSTRAINTSassign means {sum i of x[i][j] = 1 forall j;relaxation = { ip:master } }

xy means {x[i][j] = 1 <=> y[j] = i forall i, j;relaxation = { cp } }

tbounds means {r[j] <= t[j] forall j; t[j] <= d[j] - p[y[j]][j] forall j;relaxation = { ip:master, cp } }

machinecap means {cumulative({ t[j], p[i][j], 1 } forall j |

x[i][j] = 1, 1) forall i;relaxation = { cp:subproblem, ip:master }inference = { feasibility } }

SEARCHtype = { benders }

Page 34: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Machine SchedulingMachine Scheduling

� Results compared with:

� CPLEX 9.0 (ILOG Scheduler is generally slower).

� Integrated CP/IP implementation of Jain and Grossmann 2001.

Page 35: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Computational Results: Computational Results: Time (s)Time (s)

Never more than 31 iterations and 60 cuts in Benders approach

0.41170.95short

14.1313,736.06long20, 5

0.045.58short

2.2591.59long15, 5

0.021.12short

4.184.21long12, 3

0.020.27short

0.520.10long7, 3

0.010.05short

0.020.04long3, 2

SIMPLJ&GBest Commpijn, m

0.150.41170.95short

3.5114.1313,736.06long20, 5

0.040.045.58short

0.682.2591.59long15, 5

0.010.021.12short

0.464.184.21long12, 3

0.000.020.27short

0.080.520.10long7, 3

0.000.010.05short

0.010.020.04long3, 2

SIMPLJ&GBest Commpijn, m

170.95short

13,736.06long20, 5

5.58short

91.59long15, 5

1.12short

4.21long12, 3

0.27short

0.10long7, 3

0.05short

0.04long3, 2

SIMPLJ&GBest Commpijn, m

short

long20, 5

short

long15, 5

short

long12, 3

short

long7, 3

short

long3, 2

SIMPLJ&GBest Commpijn, m

Page 36: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Machine Scheduling in SIMPLMachine Scheduling in SIMPL

� Extensions:

� Cumulative (resource-constrained) scheduling in subproblem.

� Other objective functions use more interesting logic-based Benders cuts and relaxations.� Makespan (JNH 2004)

� Number of late jobs (JNH 2005)

� Total tardiness (JNH 2005, 2007)

� Equally good speedups in most cases.

Page 37: SIMPL: An Integrated Solver for Optimization Problemsegon.cheme.cmu.edu/ewo/docs/simplpita07.pdf · 2016. 2. 8. · modeling adapted to general optimization. Model communicates problem

Future WorkFuture Work

� Increase SIMPL’s functionality: add new constraints, solvers, search mechanisms, etc.

� Easy to add new constraints.

� Find valid propagation methods and relaxations for more constraints.

� Release a beta version.

� Allow users to contribute their own constraints.

� Create a modeling “Wikipedia”?