solving business problems with sas analytics and … · title: solving business problems with sas...

96
Copyright c 2010, SAS Institute Inc. All rights reserved. Solving Business Problems with SAS Analytics and OPTMODEL Pre-Conference Workshop INFORMS Annual Meeting Phoenix, AZ SAS Institute Inc. October 13, 2012

Upload: nguyencong

Post on 31-Mar-2018

219 views

Category:

Documents


2 download

TRANSCRIPT

Copyright c©2010, SAS Institute Inc. All rights reserved.

Solving Business Problemswith SAS Analyticsand OPTMODEL

Pre-Conference WorkshopINFORMS Annual MeetingPhoenix, AZ

SAS Institute Inc.

October 13, 2012

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Background on SAS

Founded in 1976World’s largest privatelyheld software companyOver 400 offices worldwideOver 60,000 customersites in 134 countriesSAS customers, affiliates:90 of top 100 companies in2012 Fortune Global 500Hundreds of local usergroups

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS Data Sets, Language, Terminology

SAS data set: tabular data file» Rows are “observations”» Columns are “variables”» Created with SAS data step and/or SQL» Read from / write to all major data formats

SAS programming language base: data handling andexploration, elementary statistics, wide range of functions

Software modules are procedures, abbreviated “PROC”

Copyright c©2010, SAS Institute Inc. All rights reserved.

Sample SAS Data Set

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS Data Sets and External Data Formats

SAS has several ways (programmatic, point and click)to convert any data in tabular form into a SAS data set

» Data step functionality» PROC IMPORT» Enterprise Guide

Through SAS ACCESS engines, can create SAS viewsto any commonly used database

» Data appears as SAS data sets to SAS, but remains in thenative database format

» SAS can write results back to the native database format

Copyright c©2010, SAS Institute Inc. All rights reserved.

Overview of SAS Functions

Mathematical, Arithmetic, TruncationArrayCharacterDate and TimeFinancialProbability DistributionsTrigonometric, HyperbolicRandom Number GenerationSample Statistics, Quantiles

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS Products and Solutions

SAS products: breadth and depth» Data Integration: access, cleansing, metadata creation» Business Intelligence: query, reporting, visualization» Analytics: statistics, forecasting, data mining, text mining,

quality control, optimization, scheduling, simulation

SAS solutions» Cross-Industry: Customer Intelligence, Performance

Management, Supply Chain Intelligence, RiskManagement, Sustainability Management, SecurityIntelligence, Information Management

» Industry-Specific: Retail, Oil and Gas, Energy & Utilities,Financial Services, Health Care, Life Sciences, Insurance,Communications, Media, Hospitality & Gaming, Travel &Transportation, Government, Education

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS Products and Solutions

SAS products: breadth and depth» Data Integration: access, cleansing, metadata creation» Business Intelligence: query, reporting, visualization» Analytics: statistics, forecasting, data mining, text mining,

quality control, optimization, scheduling, simulation

SAS solutions» Cross-Industry: Customer Intelligence, Performance

Management, Supply Chain Intelligence, RiskManagement, Sustainability Management, SecurityIntelligence, Information Management

» Industry-Specific: Retail, Oil and Gas, Energy & Utilities,Financial Services, Health Care, Life Sciences, Insurance,Communications, Media, Hospitality & Gaming, Travel &Transportation, Government, Education

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS-Related Presentations at INFORMS

SA37 Randomized Linear Programming Approach to Revenue ManagementVijay Desai, Altan Gulcu

SA37 Revenue Management as a Strategic ToolAysegul Peker, Maarten Oosten

SB06 The Simulation Start-up Problem: Performance Comparison of RecentSolution Proceduresco-authors Emily Lada, Anup Mokashi

SB13 Restrict-and-Relax Search for 0-1 Integer ProgramsMenal Guzelsoy

SC09 Statistical Stopping Criteria for a Multiobjective Genetic AlgorithmNatalia Viktorovna

SD23 Panel Discussion: Managing a Career in ORincluding Manoj Chari

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS-Related Presentations at INFORMS(cont.)

MA22 The New Decomposition Solver in SAS/ORMatthew Galati

MB72 Network Optimization and Beyond in SAS/OR SoftwareLeo Lopes

MC68 Risk Management for Pension FundsPrashant Pai

MD17 UConn’s Masters Program in Business Analytics and ProjectManagementSudip Bhattacharjee (UConn)

MD17 Experiences with Developing an Advanced Business Analytics CourseJerry Oglesby

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS-Related Presentations at INFORMS(cont.)

TA15 JMP Software from SAS—Visual AnalyticsMia Stephens

TA68 A Hybrid Simulation Methodology to Simulate Financial RisksJack Yang

TA68 A Dynamic Simulation Approach to Financial Risk AnalysisSunny Zhang

TC15 Building and Solving Optimization Models with SASEd Hughes, Aysegul Peker

TC15 SAS Global Academic Program—Introduction to SAS Rapid PredictiveModelerTom Bohannon

TC22 Developments in SAS MILP SolverAmar Narisetty

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS-Related Presentations at INFORMS(cont.)

WB04 Improving Delinquent Loan Processing Efficiency via EfficientAssignments in a Large US BankAysegul Peker, Ivan Oliveira

WB68 Planning for Optimal Liquidity ExecutionWei Chen

WC11 An Active-set Approach using a Primal-dual Augmented Lagrangian forLarge-scale Nonconvex Optimization in SASWenwen Zhou

WC11 An Interior-point Approach using a Primal-dual Augmented Lagrangianfor Large-scale Nonconvex Optimization in SASJoshua Griffin

WC42 Two-Stage Optimal Capacity Design and Expansion in SurvivableTransportation NetworksShahrzad Azizzadeh

WD13 An Integer Programming Approach for Solving the p-Dispersion ProblemFatemeh Sayyady (NCSU)

Copyright c©2010, SAS Institute Inc. All rights reserved.

The Scope of SAS/OR

1. Mathematical optimization

2. Discrete event simulation

3. Constraint programming

4. Genetic algorithms

5. Project and resource scheduling

Copyright c©2010, SAS Institute Inc. All rights reserved.

Broad Range of Optimization Solvers

Linear Programming:» Primal Simplex» Dual Simplex» Interior Point» Network Simplex

Mixed Integer Linear Programming:» Branch and Bound with heuristics, cuts, conflict search

Quadratic Programming:» Interior Point

Nonlinear Programming:» Active Set» Interior Point» Multistart

Copyright c©2010, SAS Institute Inc. All rights reserved.

DECOMP: New in SAS/OR 12.1

Decomposition algorithm accessible in PROC OPTMODELUser conveys block structure via .block constraint suffixsolve with LP|MILP / decomp=(method=user);

Master and subproblems generated and solvedautomatically and in parallelFor block-angular problems, dramatic performanceimprovements over direct solver

Copyright c©2010, SAS Institute Inc. All rights reserved.

Network Algorithms: New in SAS/OR 12.1

Connected componentsBiconnected components and articulation pointsMaximal cliquesCyclesTransitive closureLinear assignment problemShortest path problemMinimum-cost network flow problemMinimum spanning tree problemMinimum cut problemTraveling salesman problem

Copyright c©2010, SAS Institute Inc. All rights reserved.

Other Enhancements in SAS/OR 12.1

Concurrent LP and NLP solversParallel MILP option tunerParallel NLP multistartSAS code block (SUBMIT/ENDSUBMIT) in OPTMODELConflict search for MILP

Copyright c©2010, SAS Institute Inc. All rights reserved.

SAS Optimization-Based Solutions

SAS Marketing OptimizationSAS Service Parts OptimizationSAS Contact Center Planning and OptimizationSAS Revenue Optimization SuiteSAS Size OptimizationSAS Credit Scoring for BankingSAS Risk Management for BankingSAS Risk Management for InsuranceSAS Social Network Analysis

Copyright c©2010, SAS Institute Inc. All rights reserved.

OPTMODEL: Major Features

Algebraic modeling language with optimization-orientedsyntax:

» Variables, constraints, bounds, objective» Algebraic expression of functions» Parameters, variables, arrays, index sets

Tight integration with SAS programming environmentFlexible input/output: read from and create any number ofdata setsInteractivityDirect access to LP, MILP, QP, NLP solvers

Copyright c©2010, SAS Institute Inc. All rights reserved.

OPTMODEL Programming Statements

Control and Looping:» DO, IF, etc.» DO iterative, DO UNTIL, DO WHILE, etc.

General» CALL» SUBMIT/ENDSUBMIT

Input/Output:» READ DATA, CREATE DATA: working with SAS data sets» SAVE MPS, SAVE QPS» FILE, PRINT, PUT

Model Management:» SOLVE» PROBLEM, USE PROBLEM (named models)» DROP/RESTORE (constraints)» FIX/UNFIX (variables)» EXPAND (selective or overall)

Copyright c©2010, SAS Institute Inc. All rights reserved.

OPTMODEL Expressions Overview

Aggregation operators (evaluate a set expressionover an index set):

» SUM, PROD, MAX, MIN» INTER aggregation, UNION aggregation» Boolean: AND, OR

Set operators:» IN, WITHIN» INTER, UNION, SYMDIFF, DIFF» CROSS, SLICE

Conditional:» IF-THEN-ELSE» Scalar or set expression

Copyright c©2010, SAS Institute Inc. All rights reserved.

Basics of the SAS Macro Language

Macros: parameterized blocks of SAS codeMacro variables:

» Assigning a value: %let varname=<value>;» Using: &varname

Declaring a macro:%macro macroname (param1, param2);<SAS code>

%mend macroname;

Invoking a macro:%macroname (<value1>, <value2>);Special code within macros:

» %if &varname=<value> %then %do; ...%end;» %do n=1 %to &number;...%end;

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Shortest Path Problem

Given directed network (N,A) with source s and sink t

Each arc (i, j) ∈ A has cost cij

Find shortest path from s to t

Minimum cost network flow problem, sending one unit offlow from s to tSeveral approaches:

» LP» MILP» QP» NLP» Multiple objectives» Dynamic programming» Network algorithm

Copyright c©2010, SAS Institute Inc. All rights reserved.

Example Network

2 4

1 6

3 5

1

10

1

2

1

5

12

10

1

2

Copyright c©2010, SAS Institute Inc. All rights reserved.

Optimal Solution

1

2 4

6

2 4

1 6

3 5

1

10

1

2

1

5

12

10

1

2

Copyright c©2010, SAS Institute Inc. All rights reserved.

Shortest Path Data and Setup

OPTMODEL codeShortestPath.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji = bi i ∈ N

xij ≥ 0 (i, j) ∈ A

where bs = 1, bt = −1, and bi = 0 for i ∈ N \ {s, t}

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s− 1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

var Flow {ARCS} >= 0;min TotalCost = sum {<i,j> in ARCS} cost[i,j] * Flow[i,j];con Balance {i in NODES}:

sum {<(i),j> in ARCS} Flow[i,j]- sum {<j,(i)> in ARCS} Flow[j,i]= (if i = source then 1 else if i = sink then -1 else 0);

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s− 1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

var Flow {ARCS} >= 0;min TotalCost = sum {<i,j> in ARCS} cost[i,j] * Flow[i,j];con Balance {i in NODES}:

sum {<(i),j> in ARCS} Flow[i,j]- sum {<j,(i)> in ARCS} Flow[j,i]= (if i = source then 1 else if i = sink then -1 else 0);

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s− 1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

var Flow {ARCS} >= 0;min TotalCost = sum {<i,j> in ARCS} cost[i,j] * Flow[i,j];con Balance {i in NODES}:

sum {<(i),j> in ARCS} Flow[i,j]- sum {<j,(i)> in ARCS} Flow[j,i]= (if i = source then 1 else if i = sink then -1 else 0);

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s− 1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

var Flow {ARCS} >= 0;min TotalCost = sum {<i,j> in ARCS} cost[i,j] * Flow[i,j];con Balance {i in NODES}:

sum {<(i),j> in ARCS} Flow[i,j]- sum {<j,(i)> in ARCS} Flow[j,i]= (if i = source then 1 else if i = sink then -1 else 0);

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s− 1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

var Flow {ARCS} >= 0;min TotalCost = sum {<i,j> in ARCS} cost[i,j] * Flow[i,j];con Balance {i in NODES}:

sum {<(i),j> in ARCS} Flow[i,j]- sum {<j,(i)> in ARCS} Flow[j,i]= (if i = source then 1 else if i = sink then -1 else 0);

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s− 1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

var Flow {ARCS} >= 0;min TotalCost = sum {<i,j> in ARCS} cost[i,j] * Flow[i,j];con Balance {i in NODES}:

sum {<(i),j> in ARCS} Flow[i,j]- sum {<j,(i)> in ARCS} Flow[j,i]= (if i = source then 1 else if i = sink then -1 else 0);

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming

OPTMODEL codeShortestPathLP.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Mixed Integer Linear Programming

Given directed network (N,A) with source s and sink t

Each arc (i, j) ∈ A has cost cij and traversal time tijFind shortest s-t path with side constraint on total timeConstraint matrix not totally unimodularNeed to impose integrality on flow variables

Copyright c©2010, SAS Institute Inc. All rights reserved.

Mixed Integer Linear Programming

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s−1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

∑(i,j)∈A

tijxij ≤ T

xij ∈ {0, 1} (i, j) ∈ A

Copyright c©2010, SAS Institute Inc. All rights reserved.

Example Network

2 4

1 6

3 5

(1, 10)

(10, 3)

(c = 1, t = 1)

(2, 3)

(1, 2)

(5, 7)

(12, 3)

(10, 1)

(1, 7)

(2, 2)

Copyright c©2010, SAS Institute Inc. All rights reserved.

Optimal Solution for T = 14

1

3

2 4

6

2 4

1 6

3 5

(1, 10)

(10, 3)

(c = 1, t = 1)

(2, 3)

(1, 2)

(5, 7)

(12, 3)

(10, 1)

(1, 7)

(2, 2)

Copyright c©2010, SAS Institute Inc. All rights reserved.

Mixed Integer Linear Programming

OPTMODEL codeShortestPathMILP.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Inverse Shortest Path Problem

Given directed network (N,A) with source s and sink t

Each arc (i, j) ∈ A has cost cij

Given path P from s to t

Find minimum perturbation of costs so that P is shortestpath with respect to new costsApplications:

» Telecommunications» Traffic flow» Seismic tomography

Copyright c©2010, SAS Institute Inc. All rights reserved.

Example Network

2 4

1 6

3 5

1

10

1

2

1

5

12

10

1

2

Copyright c©2010, SAS Institute Inc. All rights reserved.

Given Path P

1

3

2

5

6

2 4

1 6

3 5

1

10

1

2

1

5

12

10

1

2

Copyright c©2010, SAS Institute Inc. All rights reserved.

Optimal Perturbed Costs

1

3

2

5

6

2 4

1 6

3 5

5.5

5.5

1.5

1.5

0

5

12

10

1.5

1.5

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming Duality

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s−1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

maximize πs − πt

subject to πi − πj ≤ cij (i, j) ∈ A

πi free i ∈ N

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming Duality

minimize∑

(i,j)∈A

cijxij

subject to∑

(i,j)∈A

xij −∑

(j,i)∈A

xji =

1 if i = s−1 if i = t0 if i ∈ N \ {s, t}

i ∈ N

xij ≥ 0 (i, j) ∈ A

maximize πs − πt

subject to πi − πj ≤ cij (i, j) ∈ A

πi free i ∈ N

Copyright c©2010, SAS Institute Inc. All rights reserved.

Quadratic Programming

minimize∑

(i,j)∈A

(c′ij − cij)2

subject to πi − πj = c′ij (i, j) ∈ P

πi − πj ≤ c′ij (i, j) ∈ A \ P

πi free i ∈ N

c′ij ≥ 0 (i, j) ∈ A

Copyright c©2010, SAS Institute Inc. All rights reserved.

Quadratic Programming

OPTMODEL codeInverseShortestPathQP.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Multicommodity Flow Problem

Given directed network (N,A) and commodities K

Each node i ∈ N has supply bki for commodity k ∈ K

Each arc (i, j) ∈ A has:» cost ck

ij per unit of flow of commodity k ∈ K» capacity uk

ij for commodity k ∈ K» capacity uij that limits sum of flows of commodities

Satisfy all supplies and demands at minimum cost, whilerespecting arc capacitiesTwo approaches:

» Direct LP» Dantzig-Wolfe Decomposition

Copyright c©2010, SAS Institute Inc. All rights reserved.

Example Network with Two Commodities

110 2 −10

3 4

520 6 −20

(c = 1, u = 5)

(5, 30)

(1, 10)

(5, 30)

(1, 30)(1, 30)

(5, 30)

Copyright c©2010, SAS Institute Inc. All rights reserved.

Optimal Solution

110 2 −10

3 4

520 6 −20

(c = 1, u = 5)

(5, 30)

(1, 10)

(5, 30)

(1, 30)(1, 30)

(5, 30)

5

5

5 5

5

55

15

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming Formulation

minimize∑k∈K

∑(i,j)∈A

ckijx

kij

subject to∑k∈K

xkij ≤ uij (i, j) ∈ A∑

(i,j)∈A

xkij −

∑(j,i)∈A

xkji = bk

i i ∈ N, k ∈ K

0 ≤ xkij ≤ uk

ij (i, j) ∈ A, k ∈ K

Copyright c©2010, SAS Institute Inc. All rights reserved.

Multicommodity Flow Problem: Direct LP

OPTMODEL codeMulticommodityFlow.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Constraint Matrix for Example Network

1 11 1

1 11 1

1 11 1

1 11 1−1 −1

−1 −1 1−1 1 1

1 1−1 −1

1 1−1 −1

−1 −1 1−1 1 1

1 1−1 −1

Copyright c©2010, SAS Institute Inc. All rights reserved.

Block-Angular Structure

A1 A2 · · · A|K|B1

B2. . .

B|K|

Copyright c©2010, SAS Institute Inc. All rights reserved.

Linear Programming Formulation

minimize∑k∈K

∑(i,j)∈A

ckijx

kij

subject to∑k∈K

xkij ≤ uij (i, j) ∈ A (1)∑

(i,j)∈A

xkij −

∑(j,i)∈A

xkji = bk

i i ∈ N, k ∈ K (2)

0 ≤ xkij ≤ uk

ij (i, j) ∈ A, k ∈ K (3)

Dantzig-Wolfe DecompositionMaster: (1)Subproblem: (2)-(3)

Copyright c©2010, SAS Institute Inc. All rights reserved.

DECOMP: New in SAS/OR 12.1

Decomposition algorithm accessible in PROC OPTMODELUser conveys block structure via .block constraint suffixsolve with LP|MILP / decomp=(method=user);

Master and subproblems generated and solvedautomatically and in parallelFor block-angular problems, dramatic performanceimprovements over direct solver

Copyright c©2010, SAS Institute Inc. All rights reserved.

DECOMP: METHOD= Option

USER: User defines the subproblems using constraint suffix.block

NETWORK: Finds an embedded network [Bixby88] and usesthe weakly connected components as subproblem blocksAUTO: Searches for disjoint blocks (no master constraints)after presolve

Copyright c©2010, SAS Institute Inc. All rights reserved.

Multicommodity Flow Problem:Decomposition Algorithm

OPTMODEL codeMulticommodityFlowDecomp.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Network Algorithms: New in SAS/OR 12.1

Connected componentsBiconnected components and articulation pointsMaximal cliquesCyclesTransitive closureLinear assignment problemShortest path problemMinimum-cost network flow problemMinimum spanning tree problemMinimum cut problemTraveling salesman problem

Copyright c©2010, SAS Institute Inc. All rights reserved.

Network Algorithm for Shortest Path

PROC OPTNET can be called directly:» Reads arc data set via DATA_LINKS= option» By default, SHORTPATH statement invokes all-pairs

shortest paths solver» Can specify SOURCE_ID= and SINK_ID= to solve s-t

shortest path problem

PROC OPTNET can also be called from within PROCOPTMODEL via SUBMIT/ENDSUBMITIn a future release, network algorithms accessible usingSOLVE WITH NETWORK statement in PROC OPTMODEL

Copyright c©2010, SAS Institute Inc. All rights reserved.

Network Algorithm

OPTMODEL codeShortestPathOPTNET.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

SUBMIT Block

Access the full SAS system without exiting OPTMODELBuild novel dynamic algorithms using statistics, matrixmanipulation, visualization, interaction, etc.Syntax:

proc optmodel;...submit [arguments] [/ options];

[arbitrary SAS code]endsubmit;...

quit;

Copyright c©2010, SAS Institute Inc. All rights reserved.

Milk Collection: Periodic VRPH.P. Williams, Model Building in MathematicalProgramming (1999)SAS/OR R© 12.1 User’s Guide: Mathematical ProgrammingExamples (2012)Scheduling and routing milk collection trucks

» Truck collects milk from dairy farms» Each farm’s collection frequency is daily or every other day

1

2

3

4

5

6

7

8

9

10

11

1213

14

15

16

17

18

19

2021

-6 -4 -2 0 2 4 6

-5

0

5

10

12frequency

day = 1

1

2

3

4

5

6

7

8

9

10

11

1213

14

15

16

17

18

19

2021

-6 -4 -2 0 2 4 6

-5

0

5

10

12frequency

day = 2

Copyright c©2010, SAS Institute Inc. All rights reserved.

Benders Decomposition

Combinatorial Benders Decomposition with a TSPsubproblem oracleMaster problem decides which nodes (farms) to visit eachday and enforces:

» capacity, frequency, and symmetry breaking» optimality cuts (generated by subproblem)

Subproblem is a TSP for each day» generates optimality cuts for the master» uses specialized TSP solver» subset of nodes changes at each iteration

Copyright c©2010, SAS Institute Inc. All rights reserved.

Milk Collection Problem: BendersDecomposition using SUBMIT to call PROCOPTNET

OPTMODEL codeMilkCollectionBendersSubmit.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Cardinality Constrained Regression: WhichRegressors Produce the Best Fit?

Multivariate linear regression

Y = Xβ + β0e + ε,

whereY ∈ Rm, X ∈ Rm×n are datae ∈ Rm is vector of onesβ ∈ Rn, β0 ∈ R, ε ∈ Rm are decision variables

Letz ∈ {0, 1}n: indicator variables for βk: user input number of regressors to allow

Minimize the SSE over all models with k or fewer regressors.

Copyright c©2010, SAS Institute Inc. All rights reserved.

Cardinality Constrained Regression: WhichRegressors Produce the Best Fit?

Multivariate linear regression

Y = Xβ + β0e + ε,

whereY ∈ Rm, X ∈ Rm×n are datae ∈ Rm is vector of onesβ ∈ Rn, β0 ∈ R, ε ∈ Rm are decision variables

Letz ∈ {0, 1}n: indicator variables for βk: user input number of regressors to allow

Minimize the SSE over all models with k or fewer regressors.

Copyright c©2010, SAS Institute Inc. All rights reserved.

Cardinality Constrained Regression: WhichRegressors Produce the Best Fit?

Multivariate linear regression

Y = Xβ + β0e + ε,

whereY ∈ Rm, X ∈ Rm×n are datae ∈ Rm is vector of onesβ ∈ Rn, β0 ∈ R, ε ∈ Rm are decision variables

Letz ∈ {0, 1}n: indicator variables for βk: user input number of regressors to allow

Minimize the SSE over all models with k or fewer regressors.

Copyright c©2010, SAS Institute Inc. All rights reserved.

Benders Decomposition

Master is selection problem (over z)Can include any rule expressible as a MILP (e.g., subsetcardinality, clique constraints)Optimality cut for each regressor subset and all its subsetsSubproblem is just linear regression (β, ε), so can usePROC REG

Copyright c©2010, SAS Institute Inc. All rights reserved.

Cardinality Constrained Regression:Benders Decomposition using SUBMIT tocall PROC REG

OPTMODEL codeRegressionBendersSubmit.sas

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Business Problem

Given transactional data (withdrawals, deposits,replenishments) for past 3 monthsForecasting problem: estimate hourly demand for eachATM for the next monthOptimization problem: determine which hours to replenisheach ATM over the next month to avoid cashouts“replenish” means fill to capacity“cashout” means ATM inventory < next 4 hours of demand

Copyright c©2010, SAS Institute Inc. All rights reserved.

Workflow

Data Cleansing Base SAS

Copyright c©2010, SAS Institute Inc. All rights reserved.

Workflow

Forecasting SAS Forecast Server

Data Cleansing Base SAS

Copyright c©2010, SAS Institute Inc. All rights reserved.

Workflow

Optimization SAS/OR (OPTMODEL)

Forecasting SAS Forecast Server

Data Cleansing Base SAS

Copyright c©2010, SAS Institute Inc. All rights reserved.

WorkflowUser Interface Flash/Flex, SAS BI

Optimization SAS/OR (OPTMODEL)

Forecasting SAS Forecast Server

Data Cleansing Base SAS

Copyright c©2010, SAS Institute Inc. All rights reserved.

Forecasting: SAS Forecast Studio

Copyright c©2010, SAS Institute Inc. All rights reserved.

Optimization Results and Business Impact

Objective Baseline OptimizedCashout Events 391 15Number of Replenishments 11,424 9,828

2-hr runtimes well within overnight requirementsSignificantly increased customer satisfaction (main goal)$1.4 million projected annual savingsSimilar results using historical demands

Copyright c©2010, SAS Institute Inc. All rights reserved.

ATM Replenishment Optimization Demo

Interface written in Adobe Flash/FlexCalls PROC OPTMODEL code as stored processCommunication via SAS data sets and SAS macrolanguage

Launch ATM Optimization Demo

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Business Problem

Given daily insurance claims and availability of adjustersObjective:

» Increase efficiency of claim processing» Provide user capability to visualize current state of workload

Optimization problem: Distribute claims evenly amongadjusters while considering eligibility and capacityconstraints

Copyright c©2010, SAS Institute Inc. All rights reserved.

Insurance Claim Assignment Optimization

Planning horizon: 5 monthsClaims

» Average number of claims per day: 80» Type: auto, home

Adjusters» Number of adjusters: 20» Job grade: 1,2,3

Skills: Construction, auto body, paralegal, software, . . .Geographical regions in Florida: North, Central, South

Copyright c©2010, SAS Institute Inc. All rights reserved.

Insurance Claim Assignment Optimization

Interface written in Adobe Flash/FlexCalls PROC OPTMODEL code as stored processCommunication via SAS data sets and SAS macrolanguage

Launch Insurance Claim Assignment Optimization Demo

Copyright c©2010, SAS Institute Inc. All rights reserved.

Outline

1 SAS/OR Introduction

2 Shortest Path Problem

3 Multicommodity Flow Problem

4 Network Algorithms

5 SUBMIT Block

6 Customer Case Study: ATM Replenishment

7 Customer Case Study: Insurance Claim Assignment

8 Sample Consulting Engagements

Copyright c©2010, SAS Institute Inc. All rights reserved.

Sample Consulting Engagements

Advanced Analytics and Optimization Services» Part of Advanced Analytics Division in R&D» Ph.D.-level developers/consultants

Areas of Focus» Generic Optimization Details

» Simulation Details

» Revenue Management Details

» Inventory Optimization Details

Copyright c©2010, SAS Institute Inc. All rights reserved.

Sample Consulting Engagements:Generic Optimization

Investment portfolio optimization Details

Optimal ATM replenishment Details

Optimal loan assignment Details

Chemical mixture optimization Details

Stochastic deal optimization Details

Optimal binning for credit risk Details

Student assignment optimization Details

Water management Details

Casino floor mix optimization Details

Census simulation optimization Details

Copyright c©2010, SAS Institute Inc. All rights reserved.

Sample Consulting Engagements:Simulation

Simulation for discovery oncology Details

Mortgage loan simulation Details

Prison population simulation Details

Copyright c©2010, SAS Institute Inc. All rights reserved.

Sample Consulting Engagements:Revenue Management (RM) and Pricing

RM framework for car rental Details

RM framework for cruise line Details

Show ticket RM Details

Pricing and inventory optimization Details

Copyright c©2010, SAS Institute Inc. All rights reserved.

Sample Consulting Engagements:Inventory Optimization (IO)

Retail inventory replenishment Details

IO for spare parts Details

IO for automotive Details

IO for construction equipment Details

Copyright c©2010, SAS Institute Inc. All rights reserved.