Solving MINLP problems with AIMMS
Download
Report
Transcript Solving MINLP problems with AIMMS
Solving MINLP problems with AIMMS
Pittsburgh
June 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
Columns:
c0 … c48
c49 … c118
c119
Variables:
JobSchedule(j,s)
StartTime(s,m)
TimeSpan
Solve
Constraints:
OneJobPerSchedule(s)
OneSchedulePerJob(j)
MachineStartTime(s,m)
ScheduleStartTime(s,m)
Rows:
r0 … r6
r7 … r13
r14 … r76
r77 … r136
www.aimms.com
Generated Math Program (GMP)
Symbolic MP
• symbolic
variables
Generated MP
Matrix
• generated columns
• generated rows
• generated matrix coefficients
• symbolic
constraints
• 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
2
• solver
• solver
• option settings
• option settings
...
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
Problem
AOA
COA
BatchS151208M
17
6
o7
4494
629
BatchS201210M
41
6
o7_ar4_1
2923
643
CLay0205H
17
5
RSyn0840M04H
7
8
CLay0305H
31
8
RSyn0840M04M
33
15
FLay04H
33
2
SLay08H
63
5
FLay05H
> 3hr
172
SLay09M
48
5
54
11
SLay10H
> 3hr
505
1161
5183
2
2
netmod_dol2
388
63
356
17
netmod_kar1
142
5
Water0303
13
5
no7_ar3_1
142
265
Water0303R
22
12
fo7_2
fo9
Syn40M04H
trimloss4
www.aimms.com
Results COA: 1 versus 4 Threads
Problem
1 thr
4 thr
Problem
1 thr
4 thr
8
3
o7_ar4_1
643
432
172
62
RSyn0840M04H
8
8
11
5
RSyn0840M04M
15
7
5183
937
SLay09H
17
24
63
22
SLay10H
505
191
no7_ar3_1
265
33
trimloss4
17
13
o7
629
323
Water0303R
12
13
CLay0305H
FLay05H
fo7_2
fo9
netmod_dol2
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)
𝑎𝑘 𝑧𝑘 = 𝑥
𝑘
𝑑𝑖 𝑦𝑖
with
𝐿≤
𝑖
𝑑𝑖 𝑦𝑖 ≤ 𝑈
𝑖
Linearization:
𝑎𝑘 𝑧𝑘 ≤ 𝑈𝑥 ,
𝑘
𝑎𝑘 𝑧𝑘 ≤
𝑘
𝑎𝑘 𝑧𝑘 ≥ 𝐿𝑥 ,
𝑘
𝑑𝑖 𝑦𝑖 + 𝐿 𝑥 − 1
𝑖
𝑎𝑘 𝑧𝑘 ≥
𝑘
𝑑𝑖 𝑦𝑖 + 𝑈 𝑥 − 1
𝑖
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
www.aimms.com