Developing Data Products Course Project

Bill Seliger
May 17, 2015

Maximizing Revenue using Linear Programming Optimization

Airline Revenue Optimization

This App is based on a lesson presented in MITx 15.071x The Analytics Edge MOOC. The App uses the R lpSolveAPI package within a Shinyapp to optimize airline revenue based on two inputs from the user:

  • Demand for regular-priced seats
  • Demand for discount-priced seats

The App then constructs and solves a linear programming (LP) model using R code, and the lpSolveAPI package, and returns the decision variables - how many seats of each price level to sell, and the objective value - the maximum revenue given the user-selected demand levels.

This App is hosted on an AWS Ubuntu server at the below link: Airline Revenue Optimization

Formulating the LP -

The LP is formulated with two decision variables

  • Number of regular-priced seats to sell
  • Number of discount-priced seats to sell

The LP also has five constraints or inequalities

  • Seats sold cannot exceed capacity of the plane (166 seats)
  • Regular price seats sold cannot exceed regular demand
  • Discount seats sold cannot exceed discount demand
  • Seats sold at both levels must be nonnegative

Viewing the LP formulation

print(lprec)
Model name: Airline Revenue Optimization
                  reg  disc         
Maximize          617   238         
capacity            1     1  <=  166
reg_demand          1     0  <=  100
discount_demand     0     1  <=  150
reg_positive        1     0  >=    0
disc_positive       0     1  >=    0
Kind              Std   Std         
Type             Real  Real         
Upper             Inf   Inf         
Lower               0     0         

Learn more about LP optimization

Optimization is widely used in business and can drive significant value by minimizing costs or maximizing revenues. It can be applied to supply chain problems as varied as strategic network design, inventory warehouse allocation, or granular manufacturing order allocation based on lowest total landed costs and capacity constraints.

The problem presented here is based on MITx lesson Airline Revenue Management

Information on the lpSolveAPI package can be found here

Package lpSolveAPI - or - lpSolveAPI Vignette