Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
Creating environment friendly provide chains is likely one of the best challenges of the 2020s—and never simply due to the disruptions led to by the COVID-19 pandemic. Provide chains have been strained earlier than the pandemic as a result of world bottlenecks and shortages in labor and gear. To maintain up with demand, market gamers should quickly modernize enterprise processes via digitization and clever planning.
My profession as a developer and information science advisor is targeted on heavy business: rail, mining, oil and gasoline, delivery, and postal logistics. All of those sectors have been drastically impacted by provide chain points over these previous couple of years. On this piece, I discover how mathematical optimization modeling and Python can resolve a core problem within the coal mining business: satisfying custom-made demand and maximizing revenue via product mixing.
Within the typical provide chain situation, a provider delivers a particular completed product to a buyer. In our instance, to perform this, a provider should:
Completed proper, product mixing allows the provider to maximise worth by leveraging trade-offs between buyer wants and the availability chain. Mathematical optimization modeling is the best answer for addressing product mixing together with logistical challenges resembling scheduling, planning, packing, and routing.
A graph theoretical method, like community circulation optimization, works effectively for challenges with a transparent restricted scope (e.g., asking Google Maps find out how to get from A to B). However to deal with extra intricate challenges that impression overlapping points of the availability chain (e.g., product mixing), mixed-integer programming is a robust framework. Quick, well-researched, and established, mixed-integer programming permits customers to handle the overwhelming majority of scheduling, planning, and routing points.
To mannequin and clear up provide chain issues, I like to recommend utilizing Python and its open-source libraries as a result of their robust optimization communities.
For example of product mixing, let’s contemplate a coal provide chain that contains a number of mines and produces a wide range of coal elements. Usually, these elements should be routed to seaports. To maintain our instance easy, we’ll hook up with only one seaport by way of a rail community that additionally hyperlinks the mines.
We’ll use the next phrases:
Element |
A part is a uncooked manufacturing merchandise (e.g., a kind of coal), sourced at a particular location. |
Product |
A product is a completed good, demanded and outlined by a buyer, usually containing a mix of elements and falling inside a said high quality vary. |
Mixing |
Mixing is the combining of elements to type a product, both on the goal location (usually, the client’s vessel) or in some unspecified time in the future within the provide chain. |
Spec Assay |
A specification, or spec, assay is the measurement of a part property (e.g., moisture content material). Usually, engineers carry out about 20 to 100 assays, every of which exams a special property of the coal. |
Coal elements retrieved from mines are transported by rail to a port, with the client vessel as the ultimate vacation spot. Relying on the designated port’s berthing schedule or different circumstances, non permanent storage of the elements at a stockpile could also be obligatory. On the port, the practice will both deposit the load onto a stockpile or unload it immediately onto the client vessel (what we name a direct hit).
Parts are saved at mines and seaports. Mines are usually established in distant areas the place cupboard space is affordable and plentiful. Ports, alternatively, exist in industrial areas that normally have restricted area, making port stockpiles costly to make use of.
Our hypothetical buyer has demanded product blends that consist of various elements. These blends should conform to the related mineral property requirements, as outlined by the client (e.g., CSR worth). As an example how this mannequin could be constructed, let’s say that we’ve three mines that produce seven elements, as follows:
Mine A |
Produces elements A1, A2, A3. |
Mine B |
Produces elements B1, B2. |
Mine C |
Produces elements C1, C4. |
The letter in a part’s title signifies the part’s supply mine (e.g., part A3 was sourced at Mine A). Let’s agree that elements that share a quantity are comparable and as such, we might deal with them equivalently: For instance, A1, B1, and C1 are primarily the identical sort of coal.
All elements are transported by rail to the port, the place we will both carry out a direct hit or deposit every part at an acceptable stockpile. House limitations might prohibit us from storing elements individually. As such, when mixing a product, we might not have entry to every part individually and will must extract a number of elements from a single stockpile concurrently.
Now, let’s focus on the mixing guidelines that clients usually demand for his or her merchandise.
Prospects routinely ask for a mix of elements per customer-specific guidelines on each how a mix could also be carried out and which spec assays are obligatory. Such guidelines fall into two classes, part mixing guidelines and spec mixing guidelines.
Description |
Instance |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Element Mixing Guidelines |
The proportion of every part that composes a product is outlined as a ratio or proportion of the entire. |
A product stockpile (aka blended stockpile) with the next breakdown:
|
|||||||||
Spec Mixing Guidelines |
Worth boundaries for a product are established for every outlined product property. Product properties are measured by spec assay. Values embrace:
|
The product in our earlier instance could be accepted with out penalty if:
|
Discover that, usually, the deviation penalty quantity will increase as a linear operate because the boundary violation grows:
The optimization of mixing contains trade-offs between accepting penalties for spec mixing and the supply of elements.
When making a product mixing mannequin, we should select between totally different extraction sorts. For mixing, common extraction is the commonest extraction sort. In common extraction, we mannequin primarily based on an assumption that each one elements within the stockpile are totally combined collectively. Layered extraction, the place we mannequin utilizing a last-in, first-out rule, is a substitute for utilizing common extraction:
Common Extraction |
|
Layered Extraction |
|
The thought of layered extraction could also be interesting, because it intently simulates the truth of the storing logistics at most stockpiles. Nonetheless, from a mathematical modeling perspective, common extraction is most popular for computational causes. The choice to make use of layered extraction ought to be fastidiously evaluated by enterprise professionals and engineers, in order to keep away from introducing pointless issues right into a modeling method.
When utilizing common extraction, the proportions of extracted elements to at least one one other are equivalent to these of the unextracted elements. For instance, common extraction says that an extraction from stockpile X containing 75% of part A3 and 25% of part C4 comprises the identical elements and the identical proportions as stockpile X in its entirety.
When layered extraction is used, the proportions of extracted elements to at least one one other are not often, if ever, equivalent to these of the unextracted elements. Layered extraction says that, for instance, an extraction from stockpile X wouldn’t essentially comprise the identical elements as stockpile X in its entirety, nor the identical proportions as stockpile X. It’s because we might be extracting no matter part(s) are on the prime of the stockpile (last-in, first-out).
The inconsistent nature of a layered extraction makes it troublesome to mannequin loading variables. Due to this fact, common extraction, which avoids complicated interdependencies between the loading variables, is the popular choice when layered extraction will not be a enterprise requirement (see additionally “Coding to Remedy Product Mixing”).
Let’s contemplate the case of common extraction. Say we wish to monitor and mannequin elements deposited at a stockpile or buyer vessel. Listed here are three potential extraction and modeling situations:
Situation 1: Single Extraction Modeling We will extract any/all elements, no matter sort. On this instance, we might deal with part A1 (sourced at Mine A) and B1 (sourced at Mine B) as if they’re the identical part as a result of they’re comparable sufficient. |
|
Situation 2: Product Mix Extraction Modeling We will extract a possible product mix. On this instance, the extracted product mix conforms to the client’s product mixing rule necessities:
|
|
Situation 3: Versatile Combine Extraction Modeling We will solely extract an invalid part combine that doesn’t conform to the client’s part mixing guidelines and thus doesn’t type a product by itself. On this instance, since our mix of elements A3 and C4 doesn’t type a sound product, we will:
|
From a modeling perspective, I like to recommend creating mixed-integer programming formulations to handle product mixing. We will mannequin product mixing through the use of solely real-valued variables and linear constraints, making it comparatively straightforward to calculate and monitor blends.
Issues can get difficult when product mixing modeling overlaps with scheduling choices that require binary variables for modeling functions, resembling choices round vessel berthing or practice schedules.
Python is right for coding and fixing mixed-integer programming formulations. Use the PuLP library to formulate provide chain issues, resembling defining variables, constraints, and goal features. Conveniently, PuLP’s syntax intently resembles a clear mathematical formulation.
You possibly can then combine an open-source solver like Cbc or, in case your finances permits, a industrial solver like Gurobi or CPLEX. The industrial choices present an amazing efficiency increase in comparison with Cbc.
The next pseudocode examples exhibit how we outline loading variables and constraints. The loading variables are:
load[v=vessel, p=port, c=component, prd=product, t=time]
These variables have 5 indices: vessel, port, part, product, and time. In observe, you’ll outline many extra kinds of loading variables.
Including a product index to the loading variables is helpful for monitoring the precise product for which a part is designated. Since loading variables are actual values (versus integers), they don’t pose a giant computational problem. Element mixing guidelines can now be modeled as follows:
load[v, p, A2, prd, t] >= 0.5 * sum(load[v, p, c, prd, t] for all c that serve product prd of vessel v)
load[v, p, C1, prd, t] <= 0.2 * sum(load[v, p, c, prd, t] for all c that serve product prd of vessel v)
load[v, p, C1, prd, t] + load[v, p, B2, prd, t] <= 0.5 * sum(load[v, p, c, prd, t] for all c that serve product prd of vessel v)
Spec mixing guidelines will be carried out with an analogous linear method. Nonetheless, these constraints could be a bit extra difficult, since spec assays are normally normalized by the loaded quantity. Whereas less complicated to execute, direct modeling would introduce non-linearities and, thus, could be impractical. As an alternative, it might be higher to calculate weighted pseudo-assay values after which reapply the linear equations. Caveat: The constraints might overlap with binary scheduling variables—however that dialogue is past the scope of this text.
I wholeheartedly suggest incorporating mixing guidelines right into a provide chain mannequin. My previous shoppers have had constant successes with optimized customer-specific mixing, which elevated the computational complexity of their scheduling fashions solely by a hair.
Product mixing is strongly related to rail and port operations, closely impacting day-to-day choices, resembling the place to move which elements or the place to deposit and/or extract elements.
The best digital state is a complete scheduling software that gives forward-looking suggestions for rail and port, with a mixing optimization mannequin built-in as a key half. When applicable (e.g., to reply to altering climate situations), advert hoc problem-solving by licensed rail and port operators can appropriate chosen suggestions.
For every distinctive provide chain, a customized scheduling software is smart. Utilizing an Agile course of, we may determine the impression of product mixing earlier than our full digital software is launched. Shut collaboration with operators and coordinators—always—would go a good distance towards addressing any change administration dangers.
To construction and code the fashions obligatory for constructing a scheduling software, interact the skills of information scientists, information engineers, and optimization consultants. In in the present day’s difficult and aggressive surroundings, companies that implement product mixing keep forward of the competitors.
The editorial workforce of the Toptal Engineering Weblog extends its gratitude to John Lee for reviewing the code samples and different technical content material introduced on this article.
[ad_2]