How Birchbox Transformed Its Operations With Mathematical ...
Transcript of How Birchbox Transformed Its Operations With Mathematical ...
How Birchbox Transformed Its Operations With Mathematical Optimization
Thank you for joining us. We will be starting shortly.
Todayโs Speakers
Copyright ยฉ Princeton Consultants 2020 (V3.3)2
Rob Randall, PhD
Senior Optimization Specialist
Princeton Consultants
Irv Lustig, PhD
Optimization Principal
Princeton Consultants
David Bendes
VP, Global Business Technology
Birchbox
How Birchbox Transformed Its Operations With Mathematical Optimization
Irv Lustig, PhD, Optimization Principal at Princeton Consultants
Rob Randall, PhD, Senior Optimization Specialist at Princeton Consultants
Information Technology & Management Consulting
Advanced Analytics StrategyProcess ImprovementApplication Development
Princeton New Jersey New York City
โชStability: Founded in 1981; over 1800 successful completed projects for many industry leaders and fast-growing innovators.
โชRepresentative Clients: 2020 US Census, US Tennis Association, NBCUniversal, Wells Fargo, NetJets, The Wall Street Journal, Schneider.
โชAnalytics-focused Professional Staff: 65 full-time consultants, 2/3rds with graduate STEM degrees; plus network of top independent consultants and university professors. 50+ experienced data scientists/developers.
โชExperience: Senior Staff (top 28 consultants) average 15+ years experience; Firm Leadership (6 Directors) average 20+ years experience.
Optimization into Production
About Princeton Consultants (www.princeton.com)
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 4
Irv Lustig, PhD, Optimization Principal
Patricia Randall, PhD, Director
Robert Randall, PhD, Senior Optimization Specialist
Formulation Matters: Reciprocating Integer Programmingfor Birchbox Product Assortment
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 5
Birchbox
โบ Birchbox is an online monthly subscription service that sends its customers a box of beauty product samples each month
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 6
Launched in
2010
Operates in 3 countries, with
over 2.5 million active
customers
Samples tailored to each
subscriberโs needs and
preferences
500+ best-in-class prestige
brand partners with products
including skincare items,
perfumes, and other cosmetics
The Competitive Edge
โบ A subscription box serviceโs operational success is powered by its โblack boxโ โ grouping subscribers into clusters and creating configurations of available products for each subscriber cluster
Optimal box creation
Product and
vendor attributes
Subscriber history and
activity
Subscriber profiles
โช Birchbox uses a mixed integer programming (MIP) model with Gurobi to optimize this process by using their proprietary objectives and constraints
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 7
Problems with the Initial Model
โบ The product grouping and box creation MIP worked for several years but as the customer base grew and offerings expanded, the run time increased to multiple days
โ Operations was up against production deadlines every month and forced to monitor the run closely over the course of days
โ Alternative business models could not be tested
โ New improvements to the box experience could not be adequately handled by the existing model
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 8
Engagement History
โบ Birchbox contacted Princeton due to performance issues with their existing MIP model that used Gurobi
โบ Princeton Offer:โ Advanced Analytics Model Review & Validation Service
โบ Benefitsโ Validate and improve optimization and predictive models with an expert third party review
โบ Uncover new ideas for improvement
โบ Benchmark your models and group against best practices
โบ Give business leaders more confidence in your solutions
โบ Help your specialists improve their development skills
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 9
Simplified Problem Description
โบ 100 Different Productsโ Each product has different attributes
โบ Weight, Volume, Value, etc.
โ There is a maximum inventory of each product
โ There is a desired minimum number of subscribers to send each product toโบ Often zero
โบ 2000 to 5000 โSubscribersโโ Depends on number of clusters from machine learning
โ For each subscriber/product combination, define โeligibilityโ:โบ A subscriber can receive the product
โบ A subscriber must receive the product
โบ A subscriber must not receive the product
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 10
Goal 1: Create Box Configurations
โบ A Configuration is a group of products
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 11
โซ Configurations satisfy constraints on the attributesโ Range on number of products included
โซ E.g., at least 5, no more than 7
โ Maximum weight, volume
โ Ranges on other attributes
โ Etc.
Goal 2: Assign Box Configurations to Subscribers
โบ Each configuration must be sent to a minimum number of subscribers and to at most a maximum number of subscribers
โบ Every subscriber must be assigned a configuration
โ Identify quickly if this is not possible due to eligibility or lack of inventory
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 12
Configuration Goals
โบ Use a small number of configurations
โ Typically below 100.
โ For grooming products, could be as low as 30
โบ Respect product maximum inventory used
โบ Some subscribers must receive certain products.
โบ Some subscribers must not receive certain products.
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 13
Notation
โบ ๐ซ is the set of products โข๐ฎ is the set of subscribers โขโฌ is the set of box configurations
โบ ๐ is the set of attributes that exist for all products
โ ๐๐๐ is the value of attribute ๐ for product ๐
โบ เท๐ฎ๐ โ ๐ฎ are subscribers that must receive product ๐
โ เท๐ซ๐ โ ๐ซ are the products that subscriber ๐ must receive.
โบ ๐ฎ๐ โ ๐ฎ are subscribers that must not receive product ๐
โ ๐ซ๐ โ ๐ซ are the products that subscriber ๐ must not receive.
Property Scope Minimum Maximum
Number of subscribers per box Global across boxes ๐โ ๐๐ข
Number of Different Box Configurations Global ๐โ ๐๐ข
Number of products per box Global ๐พโ ๐พ๐ข
Total Product Quantity Across subscribers
Per product ๐ โ ๐ซ ๐๐โ(soft) ๐๐
๐ข
Total Attribute Value For all boxes, per attribute ๐ โ ๐ ๐ผ๐โ ๐ผ๐
๐ข
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 14
Initial MIP Formulation: Variables
๐๐: (binary) Is box ๐ used?๐๐: Number of times box ๐ is used
(number of subscribers assigned)
๐๐๐: (binary) Is subscriber ๐ assigned to box ๐?
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
๐๐๐: (binary) Is product ๐ in box ๐?
๐๐๐: Number of times product ๐ is in box
๐
๐๐: Error for not satisfying minimum
product quantity
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 15
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
Initial MIP Formulation: Box/Product Logical Constraints
๐๐๐ โค ๐๐๐ข๐ฅ๐๐
๐ง๐ โค ๐๐๐ข
Number of products in box controlled by whether product is in boxError limited by maximum
๐๐ โค ๐๐ข๐ฆ๐๐๐ โฅ ๐โ๐ฆ๐
Number of products in box controlled by whether box is used and controlled by minimum and maximum subscribers per box (for each box)
๐ฅ๐๐ โค ๐ฆ๐๐๐๐ โค ๐๐
๐ข๐ฆ๐
๐๐๐ โฅ ๐๐ โ๐(1 โ ๐ฅ๐๐)
๐๐๐ โค ๐๐
Product in box if box is used
Number of products in box is equal to number of subscribers if the product is in the box
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 16
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
Initial MIP Formulation: Box/Product Quantity Constraints
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 17
๐โโฌ
๐๐๐ + ๐ง๐ โฅ ๐๐โ
๐โโฌ
๐๐๐ โค ๐๐๐ข
For each product, across boxes, total product used is limited by minimums and maximums
Enforces maximum number of box configurations
๐โโฌ
๐ฆ๐ โฅ ๐โMust build a minimum number of box configurations
๐โ๐ซ
๐๐๐ โฅ ๐พโ๐๐
๐โ๐ซ
๐๐๐ โค ๐พ๐ข๐๐
For each box, total product used must correspond to minimums and maximums per box
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
Initial MIP Formulation: Subscriber Constraints
For each product and box, force certain subscribers to be assigned
๐ โเท๐ฎ๐
๐ค๐ ๐ โค | เท๐ฎ๐ |๐ฅ๐๐
๐ โ๐ฎ๐
๐ค๐ ๐ โค | ๐ฎ๐ |(1 โ ๐ฅ๐๐)For each product and box, force certain subscribers to not be assigned
Count the number of subscribers assigned for each box
๐ โ๐ฎ
๐ค๐ ๐ = ๐๐
๐โโฌ
๐ค๐ ๐ โค 1 Limit each subscriber to be assigned to one box
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 18
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
Initial MIP Formulation: Box Composition Constraints
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 19
๐ผ๐โ โค
๐โ๐ซ
๐๐๐ ๐ฅ๐๐ โค ๐ผ๐๐ข Attribute Constraints
Min/Max Different Products per Box
๐โ๐ซ
๐ฅ๐๐ โค ๐พ๐ข๐ฆ๐
๐โ๐ซ
๐ฅ๐๐ โฅ ๐พโ๐ฆ๐
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
Initial MIP Formulation: Objective Function
๐โโฌ
๐โ๐ซ
1
3600โ ๐ฅ๐๐
โ
๐โ๐ซ
2
(๐๐๐ข + 1)
โ ๐ง๐
โGenerosityโ โ More products are better
Error in reaching desired minimum product quantities
+1
2
๐โโฌ
๐๐Total number of boxes built
Number of Subscribers Assigned to a box
+1
2
๐ โ๐ฎ,๐โโฌ
๐ค๐ ๐
MAXIMIZE
๐ โ๐ฎ
๐ค๐ ๐ = ๐๐ ,Note: Because
1
2
๐โโฌ
๐๐ +1
2
๐ โ๐ฎ,๐โโฌ
๐ค๐ ๐ =
๐ โ๐ฎ,๐โโฌ
๐ค๐ ๐
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 20
Initial Formulation: Issues
โบ Gurobi 8.0
โบ Solve Times ranged from minutes for easy problems to multiple days for most problems
โ Using 30 cores of 8 processor/4 cores per processor, AMD Opteron 6328, 3.2Ghz, 2MB cache
โบ Small changes in the input data caused huge variance in performance
โ E.g. just changing ๐พ๐ข (maximum number of products per box) significantly increased solve times.
โบ Blended Objectivesโ Get every subscriber a box
โ Try to meet product minimums
โบ Symmetryโ No differentiation between ๐ฅ๐๐1 and ๐ฅ๐๐2 for two different box numbers ๐1and ๐2
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 21
Solution: Pattern Generation for Each Subscriber
๐ผ๐โ โค
๐โ๐ซ
๐๐๐ ๐ฅ๐๐ โค ๐ผ๐๐ข Attribute Constraints
Min/Max Different Products per Box
๐โ๐ซ
๐ฅ๐๐ โค ๐พ๐ข๐ฆ๐
๐โ๐ซ
๐ฅ๐๐ โฅ ๐พโ๐ฆ๐
For each product and box, force certain subscribers to be assigned
๐ โเท๐ฎ๐
๐ค๐ ๐ โค | เท๐ฎ๐ |๐ฅ๐๐
๐ โ๐ฎ๐
๐ค๐ ๐ โค | ๐ฎ๐ |(1 โ ๐ฅ๐๐)For each product and box, force certain subscribers to not be assigned
๐๐
๐ซ (80)
๐ฅ๐ = 1 โ๐ โ ๐ซ๐ ๐ฅ๐ = 0 โ๐ โ ๐ซ๐
๐ผ๐โ โค
๐โ๐ซ
๐๐๐ ๐ฅ๐ โค ๐ผ๐๐ข
๐โ๐ซ
๐ฅ๐ โค ๐พ๐ข
๐โ๐ซ
๐ฅ๐ โฅ ๐พโ
๐
Feasible New box ๐: ๐ฅ๐๐ ๐ซ๐ = {๐ โ ๐ซ: ๐ฅ๐
๐= 1}
๐โ แช๐ซ๐
แช๐ฅ๐ โ
๐โ แช๐ซ๐
แช๐ฅ๐ โค | แช๐ซ๐| โ 1
Prevent Pattern Regeneration
Maximize
๐โ๐ซ
แช๐๐ แช๐ฅ๐
( แช๐๐ are โdualsโ)
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 22
Original MIP Problem: Variables
๐๐๐: Is product ๐ in box ๐?
๐๐๐: Number of times product ๐ is in box
๐, only if product in the box
๐๐: Is box ๐ used?๐๐: Number of times box ๐ is used
(number of subscribers assigned)
๐๐๐: Is subscriber ๐ assigned to box ๐?
โฆ
โฆ
โฆ โฆ๐๐๐, ๐๐๐๐ซ(80)
โฌ = {1,โฆ , ๐๐ข} (100)
๐๐๐๐
โฆ
โฆ
โฆ โฆ๐๐๐๐ฎ(5000)
๐๐
๐๐: Error for not satisfying minimum
product quantity
X X X X
X X X
X X X X X X
X X X
X
X X X X X X X
X X
X X
X X X X X
X X X X
X X X
X X
X X X X X X X
X X X X
X X
X X
X X
X X X X
X X X X
X X
X X X
X X X X X
X X
X X X X X
X X X
X X
X X X X
X X X X
X X X X X X
X X
X X X X X
X X X X
X X X X X X X
X X X X
X X X X
X X X
X X X X X X X
X X X X X X X
X X X X X X X
X X X
X X X X X X X X
X X X X X X
X X X X X
X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X
X X X X X X
X X X X X X
X X X X X
X X X X X X X
X X X X X X X X
X X X X X X X
X X X X X X
X X X X X
X X X X X X X
X X X X X X X X X X X
X X X X X X
X X X X X
X X X X X
X X X X
X X X X
X X X X X
X X X X X X X
X X X X X X X X X X X X
X X X X X X X X X X
X X X X X X
X X X X X X X X X X
X X X X X X
X X X X X X X
X X X X X
X X X X X X
X X X X
X X X X X
X X X X X X X X
X X X X X X
X X X X X X X X
X X X X X X X
X X X X X X X X
X X X X X X X
X X X X X X
X X X X X X X X
X X X X X X X
X X X X
X X X X X
X X X X
X X X X X X
X X X X X
X X X X X X X
X X X X
X X X X X X X
X X
(Only if subscriber ๐ is eligible for box ๐)
Master
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 23
Master MIP Problem: Box/Product Logical Constraints
๐๐๐ โค ๐๐๐ข๐ฅ๐๐
๐ง๐ โค ๐๐๐ข
Number of products in box controlled by whether product is in boxError limited by maximum
๐ง๐ โค ๐๐๐ข
Error limited by maximum
๐ฅ๐๐ โค ๐ฆ๐๐๐๐ โค ๐๐
๐ข๐ฆ๐
๐๐๐ โฅ ๐๐ โ๐(1 โ ๐ฅ๐๐)
๐๐๐ โค ๐๐
Product in box if box is used
Number of products in box is equal to number of subscribers if the product is in the box
๐๐๐ โค ๐๐๐ข๐ฆ๐
๐๐๐ = ๐๐
Product in box if box is used
Number of products in box is equal to number of subscribers assigned to the box
๐๐ โค ๐๐ข๐ฆ๐๐๐ โฅ ๐โ๐ฆ๐
Number of products in box controlled by whether box is used and controlled by minimum and maximum subscribers per box (for each box)
๐๐ โค ๐๐ข๐ฆ๐๐๐ โฅ ๐โ๐ฆ๐
Number of products in box controlled by whether box is used and controlled by minimum and maximum subscribers per box (for each box)
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 24
Master MIP Problem: Box/Product Quantity Constraints
๐โโฌ
๐๐๐ + ๐ง๐ โฅ ๐๐โ
๐โโฌ
๐๐๐ โค ๐๐๐ข
For each product, across boxes, total product used is limited by minimums and maximums
๐โโฌ
๐๐๐ + ๐ง๐ โฅ ๐๐โ
๐โโฌ
๐๐๐ โค ๐๐๐ข
For each product, across boxes, total product used is limited by minimums and maximums
๐โโฌ
๐ฆ๐ โฅ ๐โMust build a minimum number of box configurations
๐โโฌ
๐ฆ๐ โฅ ๐โ Must build a minimum number of box configurations
๐โ๐ซ
๐๐๐ โฅ ๐พโ๐๐
๐โ๐ซ
๐๐๐ โค ๐พ๐ข๐๐
For each box, total product used must correspond to minimums and maximums per box
๐โ๐ซ
๐๐๐ โฅ ๐พโ๐๐
๐โ๐ซ
๐๐๐ โค ๐พ๐ข๐๐
For each box, total product used must correspond to minimums and maximums per box
โฌ = {1,โฆ , ๐๐ข} Enforces maximum number of box configurations
๐โโฌ
๐ฆ๐ โค ๐๐Must build at most a certain number of box configurations(HARD option)
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 25
Master MIP Problem: Subscriber Constraints
For each product and box, force certain subscribers to be assigned
๐ โเท๐ฎ๐
๐ค๐ ๐ โค | เท๐ฎ๐ |๐ฅ๐๐
๐ โ๐ฎ๐
๐ค๐ ๐ โค | ๐ฎ๐ |(1 โ ๐ฅ๐๐)For each product and box, force certain subscribers to not be assigned
Count the number of subscribers assigned for each box
๐ โ๐ฎ
๐ค๐ ๐ = ๐๐Count the number of subscribers assigned for each box
๐ โ๐ฎ
๐ค๐ ๐ = ๐๐
๐โโฌ
๐ค๐ ๐ โค 1 Limit each subscriber to be assigned to one box
๐โโฌ
๐ค๐ ๐ โค 1Limit each subscriber to be assigned to one box
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 26
Master MIP Problem: Hierarchical Objective Function
๐โโฌ
๐โ๐ซ
1
3600โ ๐ฅ๐๐
โ
๐โ๐ซ
2
(๐๐๐ข + 1)
โ ๐ง๐
โGenerosityโ โ More products are better
Error in reaching desired minimum product quantities
+1
2
๐โโฌ
๐๐Total number of boxes built
MAXIMIZE
Number of Subscribers Assigned to a box
+1
2
๐ โ๐ฎ,๐โโฌ
๐ค๐ ๐
Number of Subscribers Assigned to a box
๐ โ๐ฎ,๐โโฌ
๐ค๐ ๐
MAXIMIZE
๐โโฌ
๐ฆ๐Number of boxes used (Target is ๐๐)(SOFT Option)
MINIMIZE
๐โ๐ซ
1
(๐๐๐ข + 1)
โ ๐ง๐Error in reaching desired minimum product quantities
MINIMIZE
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 27
New Formulation
โบ Full Master Problem has all possible patternsโ Is probably very large!
โบ Address via โcolumn generationโ techniquesโ Generate patterns as needed
โ Form a Restricted Master Problem (RMP)
โบ Not true column generationโ Adding new variables and new constraints
โบ Not โBranch-and-priceโโ Could be considered โPrice-and-branchโ
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 28
Column and Constraint Generation
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 29
๐๐๐ โค ๐๐๐ข๐ฆ๐
๐๐๐ = ๐๐
Product in box if box is used
Number of products in box is equal to number of subscribers assigned to the box
๐๐ โค ๐๐ข๐ฆ๐๐๐ โฅ ๐โ๐ฆ๐
Number of products in box controlled by whether box is used and controlled by minimum and maximum subscribers per box (for each box)
๐โ๐ซ
๐๐๐ โฅ ๐พโ๐๐
๐โ๐ซ
๐๐๐ โค ๐พ๐ข๐๐
For each box, total product used must correspond to minimums and maximums per box
Count the number of subscribers assigned for each box
๐ โ๐ฎ
๐ค๐ ๐ = ๐๐
โบ Each new pattern ๐ adds constraints
๐๐: (binary) Is box ๐ used?๐๐: Number of times box ๐ is used (number of subscribers assigned)
๐๐๐: (binary) Is subscriber ๐ assigned to box ๐? (for each eligible subscriber)
๐๐๐: Number of times product ๐ is in box ๐ for each product
โบ Each new pattern ๐ adds variables
Reciprocating Integer Programming (RIP)
โบ Two MIPsโ Communicate by โreciprocatingโ information
โบ Pattern Generation: Solve a MIP!!!โ Bootstrap
โบ Generate a lot of patterns, enough for each subscriber, preferring products with lots of inventory
โ Generate New Patterns
โบ RMP: First solve an LP, then solve a MIP!โ Get all subscribers a box with the first objective (maximize number of assigned subscribers)
โ Then move to MIP
โบ RMP generates โDualsโ for objective of subproblemโ Even when the RMP is a MIP!
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 30
Patte
rns
โDualsโ
Restricted Master Problem (RMP)
MIP Pattern Generation Subproblem
RIP Step 1: Bootstrap
โบ Solve the Pattern Generation MIPโ Just generate feasible solutions
โบ Generate enough patterns for each subscriber
โบ Make sure each product has enough patterns
โบ Dynamically adjust objective functionโ Initially, แช๐๐ = ๐๐
๐ข . Choose products with the most inventory
โ Dynamically adjust to incent products to be used at same rateโบ ProdCnt[๐] is number of patterns containing product ๐
แช๐๐ =๐๐๐ขmax
เท๐โ๐ซProdCnt[ ฦธ๐]
1 + ProdCnt[๐]
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 31
RIP Step 2: Relax
โบ Based on the Sifting Method: Dynamically add patterns to build up the RMPโ Bixby, Gregory, Lustig, Marsten, Shanno (1992)
โบ Solve LP relaxation of RMPโ Use Gurobiโs deterministic concurrent optimization
โบ Can use basis from previous solve to start
โบ Remove nonbasic variables and associated patterns with negative reduced costs
โบ Add duals from specific constraints to compute เท๐๐
โบ Use เท๐๐ to add back previously deleted patterns
โบ Adjust objective function for subproblem (๐ฃ๐ is unused inventory)
แช๐๐ =
1
2min
๐โ๐ซ:เท๐๐>0เท๐๐
๐ฃ๐
1 +max๐โ๐ซ
๐ฃ๐โ 1 if เท๐๐ = 0
โเท๐๐ if เท๐๐ > 0
โบ Stop when RMP master problem objective is equal to the number of subscribers
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 32
RIP Step 3: Populate
โบ Create the MIP version of RMPโ Do not include all variables from the LP relaxation!
โบ Choose all patterns included in the LP relaxation solution basis or patterns that are assigned (even fractionally) to a subscriber
โบ For each pattern, ensure sufficient subscribers per patternโ Do not include all eligible subscribers for each pattern
โบ For each product with positive values of ๐๐โ, ensure that there are enough
patterns (and associated subscribers) that include that product
โบ For each subscriber, ensure sufficient patterns per subscribersโ Do not include all eligible patterns for each subscriber
โบ Overriding goal โ try to not make the MIP have too many variables (less than 300,000 worked well)
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 33
RIP Step 4: Subscribe
โบ Solve the MIP form of the RMP
โบ Stop if
โ Upper bound is proven to be smaller than the number of subscribers
โ Solution found equal to the number of subscribers (Proof of optimality not required!)
โ Gurobi hits a small node limit
โบ If adequate solution not found, add back all deleted patterns
โ Solve MIP form of the RMP again
โบ If adequate solution still not found, generate new patterns using surrogate dual values
แช๐๐ =1
๐ฃ๐+1
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 34
โซ Boxes Step: First Add Constraint:โ Enforce every subscriber gets a box
๐โ แชโฌ,๐ โ๐ฎ
๐ค๐ ๐ โฅ |๐ฎ|
RIP Steps 5 and 6: Boxes and Product
HARD OPTION
โบ Skip to Product Step
SOFT OPTION
โบ Minimize Number of Boxes
โบ Stop when objective at or below ๐๐ข
โบ Add Constraint
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 35
๐โ แชโฌ
๐ฆ๐
๐โ แชโฌ
๐ฆ๐ โค ๐๐ข
โซ Product Step:โ Minimize (violation of product minimums)
โ Stop if
โซ Optimal
โซ User terminates (provide values of intermediate solutions to allow abort)
โซ After 100 nodes of branching
๐โ๐ซ
1
(๐๐โ + 1)
๐ง๐
Parallel MIP
โบ Two Options
โ Use all processors on one MIP of restricted master problem
โ Use Gurobi Concurrent Optimization
โบ Set a random seed for each parallel run
โบ Can help the Gurobi heuristics find feasible solutions faster
โบ Computational Results using Birchbox hardware:
โ 24 cores of 8 processor/4 cores per processor, AMD Opteron 6328, 3.2Ghz, 2MB cache
โ Concurrent Optimization for MIP: 6 parallel solves, 4 threads each
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 36
Computational Results (Gurobi 9.0)
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 37
Wall Clock Times in HH:MM:SSConcurrent MIP
Default MIP
Hard or Soft Fastest Concurrent or Default Fastest
Lessons Learned: FORMULATION MATTERS!!!
โบ Solvers have gotten faster but the business problems have gotten bigger and harder and expectations can be unrealistic
โบ Even with the tremendous performance improvements we have seen in solvers in the last several years, a poor formulation can still doom a model and the determination of whether MIP is appropriate
โบ It is easy to formulate a model; it can be very difficult to formulate it so that it can
โ Handle the scale and complexities of business operations
โ Provide that solution in the required timeframe
โ Provide robust performance for varying data sets
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 38
Lessons Learned: Proof of optimality may not be critical
โบ It is important to understand the objectives in the context of the business problem to determine whether a โgoodโ solution is good enough
โบ When there are multiple objectives, understand which ones align with feasibility and which ones measure the quality of the solution
โบ In our problem, two of the three objectives were indicating whether the problem could meet basic solution requirements, and this was critical to know as soon as possible
โบ The third objective measured the quality of one solution vs. another and was only important once feasibility was determined
7/28/2020 COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3) 39
Lessons Learned: Miscellaneous
โบ Curate a representative data set for continual testing
โ Tweaks to the model can help performance for some data sets and hurt it for others so you need to compare against the baseline for multiple data sets before declaring success
โบ Donโt be afraid to challenge the status quo when it comes to the business problem
โ Sometimes the Business subject matter experts can get used to equating the model to the business constraints. An outside resource can help push the team to consider new angles and think outside the (Birch)box.
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 40
Lessons Learned: Leverage the Power of Gurobi MIP
โบ In many column generation schemes, people build heuristics to generate new columns/patterns
โบ MIP can do often this just as well
โบ Use various features of Gurobi
โ Concurrent MIP Optimization
โ Stopping criteria
โบ Objective target
โบ Best bound
โ Concurrent LP Optimization at the root
โบ Barrier is often the winner at the root!
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 41
โLife-Alteringโ Improvements
โThe increase in speed and flexibility from the new model impacts every piece of our business across multiple teams. Now we can strategically invest that time in everything from building more personal customer experiences to optimizing our production process. With this new model, Birchbox has truly entered a new operating
universe.โ
David BendesVice President of Global Business Technology at Birchbox
COPYRIGHT ยฉ PRINCETON CONSULTANTS 2020 (V3.3)7/28/2020 42
Your Next Steps
โข Try Gurobi 9.0 Now!
โข Get a 30-day commercial trial license of Gurobi at www.gurobi.com/free-trial
โข Academic and research licenses are free!
โข For questions about Gurobi pricing, please contact [email protected] or [email protected]
โข A recording of this webinar, including the slides, will be available in roughly one week.
Copyright ยฉ Princeton Consultants 2020 (V3.3)44