Www.aimms.com Solving MINLP problems with AIMMS Pittsburgh June 4, 2014 Marcel Hunting AIMMS...

Preview:

Citation preview

www.aimms.com

Solving MINLP problems with AIMMS

PittsburghJune 4, 2014

Marcel Hunting AIMMS Software Developer

www.aimms.com

Overview

• Introducing AIMMS

• Generated Math Program (GMP)

• Outer Approximation

• AIMMS Presolver

• Implement Branch-and-Bound

www.aimms.com

AIMMS Modeling Structure• AIMMS, integrated &

interactive modeling system– Modeling language, integrated

GUI, direct access to solvers,advanced deployment options,and extensive development tools

www.aimms.com

AIMMS Modeling Structure• AIMMS, integrated &

interactive modeling system– Modeling language, integrated

GUI, direct access to solvers,advanced deployment options,and extensive development tools

www.aimms.com

Model generation

Variables:JobSchedule(j,s)StartTime(s,m)TimeSpan

Constraints:OneJobPerSchedule(s)OneSchedulePerJob(j)MachineStartTime(s,m)ScheduleStartTime(s,m)

Columns:

c0 … c48

c49 … c118

c119

Rows:

r0 … r6

r7 … r13

r14 … r76

r77 … r136

Solve

www.aimms.com

Generated MP

Matrix

• generated columns

• generated rows

• generated matrix coefficients

• mappings from/to variables and constraints

Solution Repository

1

• solution status

• level values

• [basis information]

2

• solution status

• level values

• [basis information]

. . .

Pool of Solver Sessions

1

• solver

• option settings

2

• solver

• option settings

. . .

Symbolic MP

• symbolic variables

• symbolic constraints

Generated Math Program (GMP)

www.aimms.com

Basic GMP

Normally: solve MathProgram;

GMP: myGMP := GMP::Instance::Generate(MathProgram); GMP::Instance::Solve(myGMP);

Modify: GMP::Column::SetUpperBound(myGMP,StartTime(s1,m1),5);

www.aimms.com

Selection of GMP functions• GMP::Instance:: Generate, Solve, Copy, FixColumns,

CreateFeasibilityProblem, CreatePresolved

• GMP::Column:: Add, Delete, Freeze, SetLowerBound

• GMP::Row:: Add, Delete, SetRightHandSide

• GMP::Coefficient:: Set, Get, SetQuadratic, GetQuadratic

• GMP::Solution:: Copy, SendToModel, GetColumnValue

• GMP::Linearization:: Add, Delete

• GMP::SolverSession:: Execute, AsynchronousExecute

www.aimms.com

Outer Approximation module

• Module: GMPOuterApproximation

• Call:

myGMP := GMP::Instance::Generate( myMathProgram ) ; GMPOuterApprox::DoOuterApproximation( myGMP );

• Uses AIMMS presolver by default

• Can be combined with Multi-start module

• Quesada & Grossmann (1992) version for convex MINLP• Uses lazy constraints callback• Uses nested solve

www.aimms.com

Results AOA - COA

Problem AOA COA

BatchS151208M 17 6

BatchS201210M 41 6

CLay0205H 17 5

CLay0305H 31 8

FLay04H 33 2

FLay05H > 3hr 172

fo7_2 54 11

fo9 1161 5183

netmod_dol2 388 63

netmod_kar1 142 5

no7_ar3_1 142 265

Problem AOA COA

o7 4494 629

o7_ar4_1 2923 643

RSyn0840M04H 7 8

RSyn0840M04M 33 15

SLay08H 63 5

SLay09M 48 5

SLay10H > 3hr 505

Syn40M04H 2 2

trimloss4 356 17

Water0303 13 5

Water0303R 22 12

www.aimms.com

Results COA: 1 versus 4 Threads

Problem 1 thr 4 thr

CLay0305H 8 3

FLay05H 172 62

fo7_2 11 5

fo9 5183 937

netmod_dol2 63 22

no7_ar3_1 265 33

o7 629 323

Problem 1 thr 4 thr

o7_ar4_1 643 432

RSyn0840M04H 8 8

RSyn0840M04M 15 7

SLay09H 17 24

SLay10H 505 191

trimloss4 17 13

Water0303R 12 13

www.aimms.com

AIMMS Presolver

• Delete redundant constraints & fixed variables

• Bound Tightening - Feasibility based – Variable x: range [0,inf) -► range [10,55]– Linear & nonlinear constraints

• Improve coefficients (possibly using probing)

• Linearize quadratic constraints

www.aimms.com

Linearize quadratic constraints

Constraint ( binary, and continuous or integer)

Linearization:

∑𝑘

𝑎𝑘𝑧𝑘=𝑥∑𝑖

𝑑𝑖 𝑦 𝑖with𝐿≤∑𝑖

𝑑𝑖 𝑦 𝑖≤𝑈

www.aimms.com

Branch-and-Bound

MINLP problem with binary variables x(i) and y(i,j).

Implement branching; choose most fractional column.

gmpBB: Generated Math Program for a node in B&B tree

www.aimms.com

Branching

for (i) do xLev(i) := GMP::Column::GetColumnValue( gmpBB, 1, x(i) ); xHalfGap(i) := abs( xLev(i) - 0.5 );endfor;xMostFractionalColumn := ArgMin( i, xHalfGap(i) );

for (i,j) do yLev(i,j) := GMP::Column::GetColumnValue( gmpBB, 1, y(i,j) ); yHalfGap(i,j) := abs( yLev(i,j) - 0.5 );endfor;yMostFractionalColumn := ArgMin( (i,j), yHalfGap(i,j) );

MostFractionalColumn := …

www.aimms.com

Branching - Improved

Vars := { ‘x’, ‘y’ }; ColNrs := GMP::Instance::GetColumnNumbers( gmpBB, Vars );

For example: ColNrs = {3,4,…,10,20,21,…,43} index: c

for (c) do Lev(c) := GMP::Column::GetColumnValue( gmpBB, 1, c ); HalfGap(c) := abs( Lev(c) - 0.5 );endfor;

MostFractionalColumn := ArgMin( c, HalfGap(c) );

www.aimms.com

Branching - Improved

Vars := AllIntegerVariables;ColNrs := GMP::Instance::GetColumnNumbers( gmpBB, Vars );

For example: ColNrs = {3,4,…,10,20,21,…,43} index: c

for (c) do Lev(c) := GMP::Column::GetColumnValue( gmpBB, 1, c ); HalfGap(c) := abs( Lev(c) - 0.5 );endfor;

MostFractionalColumn := ArgMin( c, HalfGap(c) );

www.aimms.com

Recommended