Perceive how linear programming could be probably the most highly effective device for a provide chain steady enchancment engineer
Goal
Perceive the analogies between provide chain optimization issues and the framework of linear programming
Introduction
A provide chain is a goal-oriented community of processes and inventory factors used to ship items and providers to clients.
After greater than six years of expertise designing and optimising Provide Chain processes, I seen a sample in the kind of issues to unravel.
They comply with an analogous construction that goals to maximise (or reduce) an goal operate by influencing key parameters whereas respecting some constraints.
On this article, we’ll attempt to perceive how linear programming matches one of these downside utilizing a number of real-life examples that may be carried out shortly.
SUMMARY
I. Introduction to Linear Programming
Mathematical methods used to get an optimum resolution to an issue
II. Necessities & Formulation of LP Issues
Necessities & Formulation
Circumstances to use the Linear Programming methodology
Implementation utilizing Python
Python libraries for LP implementation
III. Methodology
Step 1: Perceive the issue
Step 2: Construct the mannequin
Step 3: Fixing utilizing Python
Conclusion
III. Implement these options
Present Insights
Deploy on the cloud
Share the device utilizing executable recordsdata (.exe)
Goal
Provide Chain Analytics is used to assist operations to make knowledgeable and data-driven choices to enhance the service stage and cut back prices.
In Operations Analysis, Linear Programming (LP) is among the mathematical methods used to get an optimum resolution to a given operational downside contemplating useful resource shortage with exterior and inside constraints.
I’ve shared in earlier articles some case research of linear programming for course of optimization
On this article, I’ll clarify the methodology I used to unravel these operational points utilizing Linear Programing utilizing an actual operational case examine.
Necessities
To use Linear Programming for course of optimization these necessities need to be met:
- Drawback assertion: outline the target in clear mathematical phrases
- Choice variables: quantitative enter variables impacting the target
- Constraints: quantitative and measurable situations
- Goal operate: the connection between the target and the enter variables must be linear
Formulation
- Choices variables: variables that may be numeric or boolean
- Goal operate: a linear operate of the variables that we need to reduce or maximize
- Formulate the constraints: a set of equations combining the completely different resolution variables
Within the case examine offered beneath, we’ll introduce the methodology utilizing the issue of warehouse fleet administration.
My goal is to offer you a detailed recipe that may be replicated for different issues.
Step 1: Perceive the issue
The operations supervisor of a multi-user warehouse is requesting your help to optimize the administration of its fleet of attain vehicles.
Attain vehicles are materials dealing with tools utilized in warehouses for a number of purposes similar to:
- Truck or container Loading/Unloading
- Pallet switch contained in the warehouse
- Put away: put pallets on racks
- Replenishment: switch from storage areas to floor areas
Demand
After aligning with the completely different workforce leaders, he compiled forecasts of demand for the subsequent 5 weeks.
The demand is fluctuating from one week to a different. Due to funds constraints, you can not hire 10 vehicles for six weeks.
Provide
The sort of tools is often leased to have extra flexibility. You will have the selection between a number of forms of vehicles:
- Kind 1 — Lengthy-term lease vehicles: these vehicles must be leased for six weeks at a worth of 225 euros/week
- Kind 2 — Brief workforce lease vehicles: these vehicles could be leased for one week at a worth of 395 euros/week
- Kind 3 — Shared vehicles: long-term lease vehicles shared with one other warehouse solely accessible WEEK 2, WEEK 4 and WEEK 6 at a worth of 205 euros/week
- Kind 4— Particular worth: these vehicles could be leased for the final three weeks at a reduced worth of 200 euros/week with a most order amount of 2 vehicles
These situations are sensible. Certainly, leasing corporations are adapting their gives to scale back the prices for the logistic corporations.
💡 TIP: You possibly can’t resolve an issue you don’t perceive.
At this stage just be sure you have gathered all the knowledge wanted to border the issue.
After information assortment and processing, spend a while presenting your imaginative and prescient to the important thing stakeholders. It’s a superb follow to get affirmation that your understanding is right.
Step 2: Construct the mannequin
Drawback Assertion
The operations supervisor requested to your help to reply the next query.
What number of attain vehicles ought to I hire, for every sort, to cowl the wants for the subsequent six weeks?
Choice variables
They are going to be integers as a result of you may solely hire full vehicles.
Attain vehicles varieties
varieties = [Type 1, Type 2, Type 3, Type 4]Choice variables (integer)
t[1]: variety of sort 1 vehicles
t[2]: variety of sort 2 vehicles rented for the week 1
t[3]: variety of sort 2 vehicles rented for the week 2
t[4]: variety of sort 2 vehicles rented for the week 3
t[5]: variety of sort 2 vehicles rented for the week 4
t[6]: variety of sort 2 vehicles rented for the week 5
t[7]: variety of sort 2 vehicles rented for the week 6
t[8]: variety of sort 3 vehicles
t[9]: variety of sort 4 vehicles
💡 TIP: It is advisable translate the situations into mathematical equations
Constraints aren’t all the time simple, due to this fact you might want to adapt them to suit with the framework of LP.
As a result of Kind 2 vehicles could be rented at any time we might want to create six variables for the six weeks.
Demand Constraints
The primary constraints are associated to the demand. Every week, you might want to guarantee that you’ve got sufficient vehicles.
Let me use the instance of the primary week to clarify the method
- We want 5 vehicles a minimum of
- Kind 1 vehicles could be rented: embrace t[1] within the equation
- Kind 2 vehicles could be rented: embrace t[2] within the equation
- Kind 3 vehicles can’t be rented: don’t embrace t[8] within the equation
- Kind 4 vehicles can’t be rented: don’t embrace t[9] within the equation
The ultimate equation after translation of the situations is: t[1] + t[2] >= 5
Demand constraints
(Week 1): t[1] + t[2] >= 5
(Week 2): t[1] + t[3] + t[8] >= 7
(Week 3): t[1] + t[4] >= 3
(Week 4): t[1] + t[5] + t[8] + t[9] >= 5
(Week 5): t[1] + t[6] + t[9] >= 10
(Week 6): t[1] + t[7] + t[8] + t[9] >= 7
Extra constraints
We’ve a restricted provide of Kind 4 vehicles
Rental worth per sort
(Kind 4): t[4]<=2
💡 TIP: keep away from conflicting situations
At this stage, you might want to guarantee that the situations aren’t conflicting. If this occurs, you
Goal Operate
That is the overall rental price for the six weeks of operations; mainly the sum of the variety of attain vehicles per sort multiplied by the unit rental worth.
Goal capabilities
(Kind 1): P1 = t[1] * 225 * 6
(Kind 2): P2 = Sum ( t[i] * 395, i = 2 ... 7)
(Kind 3): P3 = t[8] * 205 * 3
(Kind 4): P4 = t[9] * 200 * 3(Goal): z = P1 + P2 + P3 + P4
💡 TIP: Examine the linearity
If you wish to use linear programming instruments, you might want to guarantee that this operate is linear.
Summarize the LP downside
Decrease
z = t[1]*225*6 + Sum(t[i]*395, i=2...7) + t[8]*205*3 + t[9]*200*3Given the constraints
(Week 1): t[1] + t[2] >= 5
(Week 2): t[1] + t[3] + t[8] >= 7
(Week 3): t[1] + t[4] >= 3
(Week 4): t[1] + t[5] + t[8] + t[9] >= 5
(Week 5): t[1] + t[6] + t[9] >= 10
(Week 6): t[1] + t[7] + t[8] + t[9] >= 7
(Kind 4): t[4]<=2
💡 TIP: current the issue
Use this mathematical presentation of the issue to substantiate with operational groups that you just understood properly their request.
Step 3: Fixing utilizing Python
The implementation is fairly simple utilizing the library PuLP: a modelling framework for Linear (LP) and Integer Programming (IP) issues written in Python.
Yow will discover on this article an in depth instance of implementation
💡 TIP: syntax of PuLP
Take a look on the documention of PuLP for added info. In case you are caught, be happy to ask questions within the remark space, we’ll attempt our greatest to assist.
Conclusion
Crucial half is the issue assertion. Be certain that to assemble all the knowledge wanted and double-check with operational groups that your understanding of the issue is correct.
💡 TIP: Drawback Complexity
You possibly can add as many constraints as you need. Nonetheless, it might occur that the issue can’t be solved due to conflicting constraints.