INFORMS Open Forum

Expand all | Collapse all

Why care about LP – linear programming?

  • 1.  Why care about LP – linear programming?

    Posted 01-16-2024 15:42

    I recently caught two interviews with Bob Bixby on the web.  I jotted down a short summary – "LP Lessons from Bixby"  to share.  The two presentations contained a ton of helpful material. 

    Why care about LP – linear programming?

    For SCM professions LP is of the principal modeling methods or solvers used in the supply chain management activity Supply or Central Planning.  The Central Planning Engine (CPE) is a computational model that determines which products should be produced when and where to best meet demand and business policies – it intelligently matches assets with demand.  In linear programming the relationships between production decisions, consumption of assets, purchase of raw material, assigning inventory to meet demand, and movement of inventory and WIP are represented in linear equations.  In LP the values for the decision variables can be any value greater than or equal to ZERO.  I might decide to produce 10.5 batches of cookies and 12.8 rolls.  In mixed integer linear programming (MILP) some of the decisions variables must be integer.  We might require the number of cookies produced to be an integer value.  Binary or 0/1 integers are used to capture logical conditions.  For example, on any given day the bakery can produce cookies or rolls, but not both.

    For Data Scientists, LP is a particularly powerful way to model complex relationships and find an intelligent solution.  For example, linear statistical models (regression) can be formulated and solved as an LP easily incorporating complex preferences – for example the number of independent variables allowed in the model is limited to three or place a limit on each "B" parameter. 

    Why Bob Bixby?

    Bob was one of the fathers of modern linear programming (LP) and mixed integer linear programming (MILP) transforming it from occasionally helpful to a mainstay of modern analytics.  Bob is clear many others made huge contributions, but his imprint is on most modern solvers including two of the leading commercial solvers: CPLEX and GUROBI.

    Where are the Bixby lessons found?

    Optimization: Past, Present, Future https://www.youtube.com/watch?v=_R8-nt5NyiE

    A recent interview found at https://youtu.be/47BZgFhEFJ8

    I urge everyone to listen to this material, it is packed full of valuable and interesting information.  

    My View of Highlights

    1.     LP/MILP is a computational science – yes theory is helpful, but the in-depth work on real world problems is a key to moving forward.  Bob's example of degeneracy makes this clear.  This is similar to medicine and especially surgery.

    2.     LP is now a solved problem.  There are well established algorithms and implementations such that very large problems can be solved quickly, and smallish problems can be solved very fast.  This dramatically opens opportunities for organizations to use this computational solver.  

    3.     The growth has been and is in MILP.  Catch this section in both videos.  Growth in the ability to solve MILP and the application of MILP.  However, MILP remains "hard" (can take a long time) to solve.  

    a.     Today many central planning applications have an integer component.  There are situations where "integer component" is not critical to the value of the model and solving faster is more important. This is sometimes difficult for a planner to grasp; humans think in integers.

    4.     LP/MILP is an AI technology.

    Some links the reader might find helpful are:

    Short-Interval Detailed Production Scheduling in 300mm Semiconductor Manufacturing using Mixed Integer and Constraint Programming by Bixby, Burda, and Miller.

    Linear Programming Techniques in Regression Analysis, E. A. Kiountouzis, Journal of the Royal Statistical Society. Series C (Applied Statistics), Vol. 22, No. 1 (1973), pp. 69-73 (5 pages)

    https://www.jstor.org/stable/2346304

    Revealing the Mystery of Linear Programming – workhorse of modern supply chain management and emerging data science technology

    https://www.linkedin.com/in/ken-fordyce-bb07b010/recent-activity/documents/



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------


  • 2.  RE: Why care about LP – linear programming?

    Posted 01-18-2024 09:56

    It is a little odd to reply to your own post. Having joined IBM in 1977 fresh with a small academic knowledge of linear programming (doing tableaus by hand) and regular contact with IBM research, which was run by Gomory.  I took some needling by not mentioning other "fathers".  First, Bob Bixby never claims to be a "father" – that was the term I used – which is true. Second there were many who made theoretical and computational contributions.  The period from 1985 to 1999 saw the emergence of "solvers" as viable computational tool altering the landscape of analytics where CPLEX was a (or the) leading player.  For truth in advertising the Central Planning Engine (CPE) team I was lucky to be part of from 1995 to 2005 used IBM's OSL (optimization subroutine library).  As with many of my generation, when I first got to IBM and had tons of access to computers interactively, I coded up the simplex, space was an issue, so I had to handle sparse arithmetic.  Once I could call a solver from APL2– I was happy to give up this up.

    Both videos from Bob provide critical insights for newly emerging MILP experts and those from data science wandering into "LP land".



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------



  • 3.  RE: Why care about LP – linear programming?

    Posted 01-26-2024 15:37

    Hello Ken,

    As a MSBA student who is just trying to implement linear programming in the school project, I find your post really helpful and informative.
    I can't agree with you more regarding your perspective on LP/MILP, especially in the modern world where companies are focusing on optimization. Thank you for sharing your insights and thoughts, and the links you attached are very resourceful too, the post definitely helped me gain more clarity about the linear programming and its application.

    In terms of the implementation of linear programming, I am wondering is there any suggested/common practice to evaluate the model performance, or how would you validate a linear programming model with high complexity, thank you!

    Tien (Candice) Her

    UC Davis
    San Francisco CA



    ------------------------------
    Tien Her
    UC Davis
    San Francisco CA
    ------------------------------



  • 4.  RE: Why care about LP – linear programming?

    Posted 01-28-2024 11:58

    Hi, Tien.  In LP/MILP for the real world the devil is always in the coefficients. How accurately do we know the numbers? And we are assuming linear dependence on the coefficients, how accurate is that in the business situation?  It's often hard to gather data on that. Just like with linear regression on real data.  The good thing: we absolutely understand the comparative statics, mathematically. The bad thing: the models are based on wrong assumptions if the comparative statics don't fit the situation.



    ------------------------------
    Bruce Hartman
    Professor
    University of St. Francis
    Tucson, AZ United States
    bruce@ahartman.net
    website:http://drbrucehartman.net/brucewebsite/
    ------------------------------



  • 5.  RE: Why care about LP – linear programming?

    Posted 01-28-2024 15:38

    Great questions from Tien and Shayan.  Great response from Bruce.  John Milne and I (and others) use the term industrial strength optimization (ISO) - I haven't give much thought lately how to describe it.  We might think about ISO can fall into three areas: solve time, formulation, and tuning / robustness.  These are the costs Bruce was describing.  There is some basic sanity checking.

    some code/reporting that checks material are balanced, demand is balanced.
    Capacity utilization
    How well is demand being met
    At Arkieva and at IBM we wrote and use softpegging reports

    This is just off the top of my head.

    ISO would be a good topic for an INFORMS session.  Generally one learns this through apprenticeship in the trenches.

    Again my apologies for a poor response.   My email is kfordyce@arkieva.com



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------



  • 6.  RE: Why care about LP – linear programming?

    Posted 01-29-2024 10:23

    One best practice that our team uses to validate implementations of optimization models is to have a non-optimization person write a "solution validator".  We first document the requirements for the model, i.e., how the objective is computed, what are the constraints in terms of the business, etc. That's the "business requirements document".  We also have a mathematical description of the model, the "mathematical model" document.  The person writing the solution validator can look at the business requirements document, but not look at the mathematical model document.  He/she then writes a code that ingests the data, as well as the solution (usually the solution is in a form of the business representation, not the decision variables).  That code then validates that the solution satisfies the business requirements and that the various KPI's (definitely the objective function, but there could be multiple objectives) are computed correctly.  


    If the solution validation code says the solution is invalid, it's either a modeling issue or a bug in the modeling code, or a bug in the solution validation code.  That can then be reconciled between the model developer and the person who wrote the solution validation code. By keeping the responsibilities separate, we have created a "wall" between the model developer and the person writing the solution validator, helping us to ensure quality of the software solutions we develop.

    One thing we are trying to figure out is to come up with a similar methodology that will determine when a model (or implementation of the model) is over-constrained, i.e., the model and/or the implementation of the model is excluding feasible solutions.  One way is to take known solutions and plug them into the model, but that doesn't always find all exclusions. I recently (last week!) had a project where our business owners were able to ask "why didn't it find this solution that is obvious to me?"  The answer was an error in how a constraint was implemented in the code. To debug this, I had to construct a solution by hand that the solution validator said was valid, but the model said was infeasible. Not a trivial task!



    ------------------------------
    -Irv Lustig
    Optimization Principal
    Princeton Consultants
    ------------------------------



  • 7.  RE: Why care about LP – linear programming?

    Posted 01-27-2024 15:22

    Hello Ken,

    Your summary of Bob Bixby's insights into linear programming was a great read. As a prospective graduate student currently exploring optimization and a certified supply chain analyst, I found the practical applications of LP/MILP you mentioned to be directly relevant to what we're learning in class, and it's encouraging to see theory applied in such a tangible way in supply chain management.

    Regarding the implementation of LP, I'm intrigued by the balance between theoretical models and real-world applications. What advice would you particularly give to students and new professionals who are beginning to work with these models relevant to LP/MILP's growth and challenges? Are there particular pitfalls or common misconceptions that we should be aware of when applying LP/MILP to real-world problems?



    ------------------------------
    Shayan Farshid
    UC Davis
    San Francisco CA
    ------------------------------



  • 8.  RE: Why care about LP – linear programming?

    Posted 01-27-2024 15:35
    Edited by Qinyi Qiu 01-27-2024 15:35

    It's fascinating to see how linear programming (LP) and mixed integer linear programming (MILP) are integral to solving complex supply chain and data science problems. The transition of LP from a theoretical concept to a practical one, capable of solving real-world problems, is remarkable. Specifically, in supply chain management, how do you see the balance between the precision of MILP solutions and the computational efficiency, especially in time-sensitive industries?

    I am an MSBA student who is just trying to implement linear programming in a recommendation system, I find your post really helpful and informative. In addition, do you have any ideas on the role of LP and MILP in the recommendation system? And do u think how they can be applied to the recommendation system?

    ------------------------------
    Qinyi Qiu
    UC Davis
    San Francisco CA
    ------------------------------



  • 9.  RE: Why care about LP – linear programming?

    Posted 01-29-2024 21:01
    Edited by Yuxin Yi 01-29-2024 21:01
    Hi Ken,
    Tthank you for sharing valuable insights about linear programming (LP) and its significance in supply chain management and data science. It's clear that LP has evolved into a powerful tool with broad applications. I'm particularly interested in its applications in supply chain management, and I wonder if you could provide examples of specific supply chain optimization problems where LP has been a game-changer? Additionally, how do real-world challenges like uncertainty and dynamic demand impact LP-based solutions in this field?
     
    I'm currently an MSBA student and have been exploring linear programming for various optimization tasks in the practicum project. Thank you for sharing these valuable resources!

    ------------------------------
    "Yuxin ""Raychel""" Yi
    UC Davis
    San Francisco CA
    ------------------------------



  • 10.  RE: Why care about LP – linear programming?

    Posted 01-29-2024 21:19

    These are great questions.  I would need to take some time to put together a proper response.  It would take more than a paragraph.

    LP (MILP) is the dominant tool/solver  to create central or supply plans in current times.  In most cases uncertainty is hedged with different scenarios and looking at unused capacity.  A simple method to handle demand uncertainty is with classes.

    Do not take either of these as theeeee solution, there are different approaches.  

    This would make an excellent presentation and discussion session.  You might want to organize one.

    My email is kfordyce@arkieva.com.  Arkieva has some consultants  in the San Francisco area.  I will be at the INFORMS business analytics meeting in April.

    Thank you

    Ken



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------



  • 11.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 12:42

    Hello Ken,

    I'm a MSBA student who encounters linear programming-related problems when applying them to real business world. Thanks for sharing about linear programming! I'm curious about how to speed up the time it takes to solve a linear programming model when dealing with a lot of data. Is there any modification we need to do with the model itself? Thank you!

    Abby Chen

    UC Davis

    San Francisco



    ------------------------------
    "Jiateng ""Abby""" Chen
    UC Davis
    San Francisco CA
    ------------------------------



  • 12.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 13:09

    You asked:
    > I'm curious about how to speed up the time it takes to solve a linear programming model when dealing with a lot of data.

    The leading commercial solvers (Gurobi, IBM ILOG CPLEX, FICO Xpress-MP) all have fast implementations of multiple algorithms (primal and dual simplex, barrier/interior point) for linear programming. Experienced LP practitioners have seen instances where there is more computation time spent in assembling an instance for the solver than it takes to actually solve the problem.  I once heard about a case where it took 30 minutes to put all the data together into a model and pass it into the solver, and the solver solved the problem in less than a minute!  These kinds of things can be due to a number of issues, including, but not limited to:

    • Using a modeling language like AMPL, OPL or Mosel.  These are not designed to efficiently process "a lot of data".
    • Writing code in Python, Java or any programming language that is inefficient in its processing of "a lot of data".
    • Inefficient code (e.g., poorly written SQL) for retrieving "a lot of data" from a database.
    • Ingesting "a lot of data" that you think is needed to solve the problem, when much less data is really needed.
    • Not taking advantage of data sparsity that is usually present in "a lot of data".

    Finally, a poorly written model might cause the performance of the solver to not be that great.  This is less true with LP, more so with mixed integer programming (MIP).  With LP, it sometimes happens because the data presented to the model is poorly scaled or has other poor numeric characteristics.

    "Speeding up the time" from a solver is as much about how well you organize and process your data, and how well you convert it into a representation that is suitable for the solver to give you acceptable performance.



    ------------------------------
    -Irv Lustig
    Optimization Principal
    Princeton Consultants
    ------------------------------



  • 13.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 14:47

    A spectacular summary by Irv.

    Everyone should tuck this away and reread it once a year



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------



  • 14.  RE: Why care about LP – linear programming?

    Posted 01-31-2024 13:22

    I would take some issue with Irv Lustig's statement that modeling languages and programming language APIs are not designed or able to process a lot of data. Any widely used modeling language or solver API will have efficient data processing as one of its design goals. So if you have reason to choose one of these (or are already using one) then it would make sense to investigate the other points in Irv's list of issues, before concluding that your data processing needs are so great that you need to consider (or switch to) a different software solution.



    ------------------------------
    Bob Fourer
    AMPL Optimization
    ------------------------------



  • 15.  RE: Why care about LP – linear programming?

    Posted 01-31-2024 14:33

    Thank you for the contribution to the discussion.

    Perhaps the following captures the teaching point

    The computational cost to feed "the beast" (the solver) will become a performance issue as the model grows in size unless thought is given to this need.   Using a central planning example, the initial prototype covers just one set of products (say production of frozen pizza) for a planning horizon of 10 periods.    In the next phase it might cover 400 sets of products for 100 periods. This step up in size may impact the computational time needed to feed and report on the solver, more than solution time (for an LP).  If it does, then one needs to look at each point in the feeding process to identify ways to reduce  the "feed time".    Example- switching to integers from character strings.  This is just an example.

    Key takeaway - success requires attention to performance across the sequence of activities.  This is not covered in your introduction to LP class - it falls into what John Milne calls Industrial Strength Optimization.

    Again thank you for the contribution.



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------



  • 16.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 13:44
    A standard LP model solves fast in computer terms; it in class P (solves in polynomial time). However the common simplex method is not in class P. You need to use ellipsoidal methods to get class P.

    MILP problems are in class NP and analysts are always looking for faster ways. These can usually be specific to the problem.  Different cutting plane constraints could produce a faster solution in a particular case. One could look for them.

    It's a stream of research since LP was invented.





  • 17.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 14:49

    Thank you.  Make certain you read Irv's post.   I might take a stab at putting together some material on a CPE View of LP with Prof. John Milne.  I need to be in the San Francisco area in May



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------



  • 18.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 13:40
    Edited by Richard Liu 01-30-2024 13:40
    Hello Ken,
    Thank you for sharing your insights from the interviews with Bob Bixby on LP. It's insteresting to observe how LP plays a vital role in both supply chain management and data science. Bob Bixby's contributions to the field are indeed significant, particularly in making LP a fundamental tool for modern analytics. I would like to highlight the emphasis on the growth of mixed-integer linear programming (MILP), as it reflects the optimization in real-world scenarios. Could you share more examples of real-world applications where LP and MILP have been successfully employed in supply chain management or data science?
     
    I'm an MSBA student and is currently working on to apply linear programming to the practicum project. Your insight is wonderful and thank you again for sharing these resources.

    ------------------------------

    Richard Liu

    UC Davis
    San Francisco CA
    ------------------------------



  • 19.  RE: Why care about LP – linear programming?

    Posted 01-30-2024 13:49
    In supply chain any network or traveling salesman type problem such as vehicle routing can be formulated as a MILP.  Vehicle routing and supply chain network optimization are typical examples. 





  • 20.  RE: Why care about LP – linear programming?

    Posted 01-31-2024 03:29

    Hello Ken,

    It's a pleasure to meet you! I'm currently pursuing my Master's in Business Analytics (MSBA), and have been learning about linear regression from this program. For me, it is amazing how lots of data can help to predict many things and I am personally fascinated by it.

    However, at the same time, applying these concepts in real-life scenarios could prove to be more challenging than in an academic environment. The complexity of real-world data and situations seems to be a significant step up from classroom examples.

    I noticed in your post that linear programming is extensively utilized in supply chain management. Could you please share insights into other industries or sectors where linear programming is also prevalently applied? I'm keen to understand its broader practical applications.

    Thank you for your time and insights!



    ------------------------------
    cindy jeon
    university of california davis
    san fransisco CA
    ------------------------------



  • 21.  RE: Why care about LP – linear programming?

    Posted 01-31-2024 12:14

    Cindy, I believe oil refineries use LP or a variation to determine how to set the cracker (the element that distills the crude oil input into products like gasoline, diesel, or various alcohols).  The chemical composition of the input stream varies from moment to moment, and the market demands for various outputs vary also, and partially depending on how much product storage is available.  The cracker also has technical limitations due to its design.  Thus LPs have to be solved often, even more frequently than every day, to determine how to set the cracker to produce those outputs from those specific inputs.  They may have millions of variables and constraints. The inputs can be analyzed in real time using Xray diffraction, mass spectrometry, and other automatic means.

    Others in INFORMS probably know a lot more about this application.  The algorithms themselves would be confidential to the refinery, and not published or in texts.



    ------------------------------
    Bruce Hartman
    Professor
    University of St. Francis
    Tucson, AZ United States
    bruce@ahartman.net
    website:http://drbrucehartman.net/brucewebsite/
    ------------------------------



  • 22.  RE: Why care about LP – linear programming?

    Posted 01-31-2024 13:06

    Hi Ken,

    Your post on linear programming (LP) resonates with what I've been studying in my MSBA program. We've been exploring various optimization techniques, and LP has come up as a fundamental method for solving complex problems efficiently.
     
    I have a strong passion for leveraging data-driven insights to drive strategic decisions and enhance organizational performance. I'm excited to continue learning and applying advanced analytics techniques to solve complex problems and contribute to data-driven decision-making in various industries.


    ------------------------------
    Kawehi Wang
    UC Davis
    San Francisco CA
    ------------------------------



  • 23.  RE: Why care about LP – linear programming?

    Posted 02-02-2024 09:39

    An interesting challenge for industrial strength optimization are frozen zones, open batches, dispatched lots, and other aliases.  Here the production starts are specified (usually in the early time buckets) as an input.  The may not be "feasible" in the sense that material and capacity is to handle this available.  Different implementations and approaches (driven by the customer) make different assumptions - therefore sanity checking is needed. This can be done outside the model (my preference) or inside the model structure (many prefer this).



    ------------------------------
    Ken Fordyce
    director analytics without borders
    Arkieva
    Wilmington DE
    ------------------------------