SlideShare a Scribd company logo
1 of 18
Operations & Supply Chain
Analytics
Transportation and
Inventory
Analytics
Using R Software
Transportation Problem
• Typical Problem: Multiple Origin (1…m) to Multiple Warehouses/Customer (1…n).
• Known: The cost (Cmn) of transporting one unit from the origin to the destination, the
maximum capacity (am) of the origins and the required demand to the destinations (bn).
• Company Alpha needs to know how much it transport (Xmn) to cover the demand for the
destinations at a minimal cost
2
Example 1: Transportation Problem
3
The lpSolve R package allows solving
LP transportation problems with just a few lines of code.
Example 1
with R
Commands
(1 of 2)
# Import lpSolve package
library(lpSolve)
# Set transportation costs matrix
costs <- matrix(c(10, 2, 20, 11,
12, 7, 9, 20,
4, 14 , 16, 18), nrow = 3, byrow = TRUE)
# Set customers and suppliers' names
colnames(costs) <- c("Customer 1", "Customer 2", "Customer 3",
"Customer 4")
rownames(costs) <- c("Supplier 1", "Supplier 2", "Supplier 3")
# Set unequality/equality signs for suppliers
row.signs <- rep("<=", 3)
# Set right hand side coefficients for suppliers
row.rhs <- c(15, 25, 10)
4
Example 1
with R
Commands
(2 of 2)
# Set unequality/equality signs for customers
col.signs <- rep(">=", 4)
# Set right hand side coefficients for customers
col.rhs <- c(5, 15, 15, 15)
# Final value (z)
lp.transport(costs, "min", row.signs, row.rhs,
col.signs, col.rhs)
# Variables final values
lp.transport(costs, "min", row.signs, row.rhs,
col.signs, col.rhs)$solution
5
Total transportation cost: $435
Output
6
Economic Order Quantity (EOQ) Model
• To find the optimal order policy in the classical Economic Order Quantity (EOQ) model and the EOQ model with planned
shortages.
• Also called the Lot-Sizing model, it considers demand uniform and deterministic. Lead time, the time between the
placement of an order and its receipt is equal to zero.
• The optimal order policy in the classical EOQ model minimizes the total cost associated with the ordering and holding
costs while meeting all demand (without shortage).
• When shortages are allowed (b > 0) we have the EOQ model with backorders or planned shortages.
• Usage: EOQ(d, k, h, b = 0)
• Where:
d is Demand per unit of time.
k is Ordering or fixed cost per order.
h is Holding cost per unit of product.
b is Shortage penalty cost per unit (default:0)
• Output Values: Q EOQ
T Time between orders (cycle length)
S Maximum backorders in units. Displayed when b > 0
TVC Total variable cost. 7
Examples 2 and 3 with R Commands
##Company Alpha Given demand d=8000 items per year; set up cost k=12000; and holding cost
h=0.3 per unit
##Classical EOQ model
EOQ(8000,12000,0.3)
##we find that the optimal solution is to order 25298 units every 3.2 months with a total
variable cost of $7589.5
##EOQ model with planned shortages
##Consider now that backorders are allowed with a backorder cost b=1.1 per #unit and
year.
EOQ(8000,12000,0.3,1.1)
##The optimal solution is to order 28540 units every 3.6 months. The total variable cost is
$6727.3 and the maximum shortage is 6116 units.
8
Economic Production Quantity
• The model considers that a new order is produced incrementally when the inventory reaches zero.
• It considers a finite production rate; that is, the inventory is replenished gradually as the order is produced.
Note that this assumption requires the production rate to be greater than the demand rate (p>d); otherwise,
there would be no inventory at any time.
• During the time that production run, t = Q=p, inventory is accumulated at rate p-d, which implies that when
the production of batch Q is finished, the inventory will reach its maximum level I.
• Usage: EPQ(d, p, k, h, b = 0)
• Where:
d is Deterministic demand per time unit
p is the Production rate
k is Ordering or fixed cost per order
h is Holding cost per unit of product
b is Shortage penalty cost per unit (default:0)
• Output:
Q Order Quantity, t Time required to produce the batch quantity, T Time between orders (cycle
length or time), I Maximum inventory level, TC Total cost 9
Example 4 with R Commands
• Company Alpha has a fixed demand for its Super Speed Vitamins of 200 units
per period at a fixed cost per unit of 100 USD, a holding cost of 5 USD per unit.
Alpha’s production rate for Super Seed Vitamins is 1000.
EPQ(d=200,p=1000,k=100,h=5)
q t T I TC
100.0 0.1 0.5 80.0 400.0
## We find the batch production run at t=0.1; the optimal order interval is T = 0.5, the
optimal order quantity is Q = 100, the maximum inventory level is I=80, and the total cost is
TC = $400.
10
News Vendor Model
• When the demand is a random variable with normal distribution, the optimal stocking quantity
that minimizes the expected cost: Q
Newsboy(m, sd, p, c, s = 0)
• Where:
m is the Mean demand during the period
sd is the Standard deviation of demand during the period
p is the selling price, where p > c
c is the unit cost
s is the salvage value (default:0), where s < cR
• Output:
Q Optimal order-up-to quantity, SS Safety stock, ExpC Expected cost, ExpP Expected profit, CV
Coefficient of variation of the demand, FR Fill rate, the fraction of demand served from stock, z
Safety factor
11
Note
## When the demand is a random variable with normal distribution, the optimal stocking
quantity that minimizes the expected cost is Q = m + z*sd, where z is known as the safety
factor and Q-m = z*sd is known as the safety stock. ’Note that the newsboy problem is not
formulated in terms of per unit holding cost h = c-s and penalty cost b = p-c.
12
Example 5 and 6 with R Commands
# Example 5#
# Suppose demand is normally distributed with a mean of 100 and a standard deviation of 30. If p = 4
and c = 1, then CR = 0.75 and Q=120.23.
# Note that the order is for 20.23 units (safety stock), more than the mean. Note also that
ExpC(120.23) = 38.13 and ExpP(120.23)=261.87,with FR=0.96.
Newsboy(100,30,4,1)
# Example 6 #
# Suppose demand is normal with a mean of 100 and a standard deviation of 20. The unit cost is 5,
and the holding and penalty costs are 1 and 3, respectively.
#From the definition of the holding and penalty cost, we find that p=4, then CR = 0.75 and Q = 113.49.
#Notice that the order is for 13.49 units (safety stock) more than the mean, ExpC(113.49) = 25.42 and
ExpP(113.49) = 274.58, with a fill rate of 97 per cent.
Newsboy(100,20,4,1)
13
Reorder Point (ROP)
• ROP computes the reorder point level of inventory. When inventory falls to this amount, a
new order must be made.
• Usage:
ROP(SL, md, sd, L)
• Arguments
SL Service level, a value between 0 and 1 (the expected probability of being able to
satisfy all possible inventory requirements within a particular period of time)
md Mean demand
sd Standard deviation of the demand
L A positive lead-time
• Value: Reorder point level
• Example 7
ROP(0.9,2500,500,6) 14
Safety Stock (SS)
• SS computes the safety stock level over lead-time
• Usage: SS(SL, sd, L)
• Arguments:
SL Service level, a value between 0 and 1
sd Standard deviation of the demand
L A positive lead-time
• Value: Safety stock level over lead-time
• Example 8
SS(0.95,0.7,2)
15
Wagner-Whitin (WW) Algorithm
• WW Considers time-varying demand. The algorithm builds production
plans that minimize the total setup and holding costs in a finite
horizon of time, assuming zero starting inventory and no backlogging
• Usage: WW(x, a, h, method = c("backward", "forward"))
• Arguments
x A numeric vector containing the demand per unit time
a Standard numeric number for the set-up cost per unit and
period
h A numeric number for the holding cost per unit and period
method Character string specifying Which algorithm to use:
"backwards(default) or "forward“. 16
Example 9 with R Commands
# An aeroplane manufacturer specializes in producing small aeroplanes. It has just received an order
from a major corporation for 10 customized executive jet aeroplanes for the use of the
corporation's upper management. The order calls for three of the aeroplanes to be delivered (and
paid for) during the upcoming winter months (period 1), two more to be delivered during the spring
(period 2), three more during the summer (period 3), and the final two during the fall (period 4).
Setting up the production facilities to meet the corporation's specifications for these aeroplanes
requires a setup cost of $2 million.
# The manufacturer has the capacity to produce all 10 aeroplanes within a couple of months when
the winter season will be underway. However, this would necessitate holding seven of the
aeroplanes in inventory, at a cost of $200,000 per aeroplane per period, until their scheduled
delivery times (...) Management wants to determine the least costly production schedule for filling
this order.
x <- c(3,2,3,2)
a <- 2
h <- 0.2
WW(x,a,h,method="backward") 17
THANK
YOU
18

More Related Content

Similar to Operations & Supply Chain Analytics Using R Software

4. good -inventory-management-ppt
4. good  -inventory-management-ppt4. good  -inventory-management-ppt
4. good -inventory-management-pptshahidch44
 
Inventory management
Inventory managementInventory management
Inventory managementKaizer Dave
 
Inventory Management
Inventory ManagementInventory Management
Inventory ManagementVishal Joshi
 
Inventory Management Inventory management
Inventory Management Inventory managementInventory Management Inventory management
Inventory Management Inventory managementsakshi0503sakshi
 
Reorder point
Reorder pointReorder point
Reorder pointDon Paul
 
Inventory managementppt@ doms
Inventory managementppt@ doms Inventory managementppt@ doms
Inventory managementppt@ doms Babasab Patil
 
Inventory management
Inventory managementInventory management
Inventory managementNilesh Ahuja
 
Theory of production Production Function
Theory of production Production Function Theory of production Production Function
Theory of production Production Function DEWAN AZMAL HOSSAIN
 
Admissions in india for b.tech
Admissions in india for b.techAdmissions in india for b.tech
Admissions in india for b.techCss Founder
 
Stochastic Order Level Inventory Model with Inventory Returns and Special Sales
Stochastic Order Level Inventory Model with Inventory Returns and Special SalesStochastic Order Level Inventory Model with Inventory Returns and Special Sales
Stochastic Order Level Inventory Model with Inventory Returns and Special Salestheijes
 
Probabilistic demand copy
Probabilistic demand copyProbabilistic demand copy
Probabilistic demand copyAnand Ellur
 
#include customer.h#include heap.h#include iostream.docx
#include customer.h#include heap.h#include iostream.docx#include customer.h#include heap.h#include iostream.docx
#include customer.h#include heap.h#include iostream.docxAASTHA76
 

Similar to Operations & Supply Chain Analytics Using R Software (20)

Inventory.pptx
Inventory.pptxInventory.pptx
Inventory.pptx
 
4. good -inventory-management-ppt
4. good  -inventory-management-ppt4. good  -inventory-management-ppt
4. good -inventory-management-ppt
 
Inventory management
Inventory managementInventory management
Inventory management
 
Inventory management
Inventory managementInventory management
Inventory management
 
Inventory Management
Inventory ManagementInventory Management
Inventory Management
 
Inventory Management Inventory management
Inventory Management Inventory managementInventory Management Inventory management
Inventory Management Inventory management
 
Reorder point
Reorder pointReorder point
Reorder point
 
Inventory managementppt@ doms
Inventory managementppt@ doms Inventory managementppt@ doms
Inventory managementppt@ doms
 
Inventory management
Inventory managementInventory management
Inventory management
 
Theory of production Production Function
Theory of production Production Function Theory of production Production Function
Theory of production Production Function
 
Ch08
Ch08Ch08
Ch08
 
Admissions in india for b.tech
Admissions in india for b.techAdmissions in india for b.tech
Admissions in india for b.tech
 
Inventory management
Inventory managementInventory management
Inventory management
 
Inventory management
Inventory managementInventory management
Inventory management
 
Inventory management
Inventory managementInventory management
Inventory management
 
sunil chopra 1
sunil chopra 1sunil chopra 1
sunil chopra 1
 
Stochastic Order Level Inventory Model with Inventory Returns and Special Sales
Stochastic Order Level Inventory Model with Inventory Returns and Special SalesStochastic Order Level Inventory Model with Inventory Returns and Special Sales
Stochastic Order Level Inventory Model with Inventory Returns and Special Sales
 
Probabilistic demand copy
Probabilistic demand copyProbabilistic demand copy
Probabilistic demand copy
 
Level demand1
Level demand1Level demand1
Level demand1
 
#include customer.h#include heap.h#include iostream.docx
#include customer.h#include heap.h#include iostream.docx#include customer.h#include heap.h#include iostream.docx
#include customer.h#include heap.h#include iostream.docx
 

Recently uploaded

Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 

Recently uploaded (20)

Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 

Operations & Supply Chain Analytics Using R Software

  • 1. Operations & Supply Chain Analytics Transportation and Inventory Analytics Using R Software
  • 2. Transportation Problem • Typical Problem: Multiple Origin (1…m) to Multiple Warehouses/Customer (1…n). • Known: The cost (Cmn) of transporting one unit from the origin to the destination, the maximum capacity (am) of the origins and the required demand to the destinations (bn). • Company Alpha needs to know how much it transport (Xmn) to cover the demand for the destinations at a minimal cost 2
  • 3. Example 1: Transportation Problem 3 The lpSolve R package allows solving LP transportation problems with just a few lines of code.
  • 4. Example 1 with R Commands (1 of 2) # Import lpSolve package library(lpSolve) # Set transportation costs matrix costs <- matrix(c(10, 2, 20, 11, 12, 7, 9, 20, 4, 14 , 16, 18), nrow = 3, byrow = TRUE) # Set customers and suppliers' names colnames(costs) <- c("Customer 1", "Customer 2", "Customer 3", "Customer 4") rownames(costs) <- c("Supplier 1", "Supplier 2", "Supplier 3") # Set unequality/equality signs for suppliers row.signs <- rep("<=", 3) # Set right hand side coefficients for suppliers row.rhs <- c(15, 25, 10) 4
  • 5. Example 1 with R Commands (2 of 2) # Set unequality/equality signs for customers col.signs <- rep(">=", 4) # Set right hand side coefficients for customers col.rhs <- c(5, 15, 15, 15) # Final value (z) lp.transport(costs, "min", row.signs, row.rhs, col.signs, col.rhs) # Variables final values lp.transport(costs, "min", row.signs, row.rhs, col.signs, col.rhs)$solution 5
  • 7. Economic Order Quantity (EOQ) Model • To find the optimal order policy in the classical Economic Order Quantity (EOQ) model and the EOQ model with planned shortages. • Also called the Lot-Sizing model, it considers demand uniform and deterministic. Lead time, the time between the placement of an order and its receipt is equal to zero. • The optimal order policy in the classical EOQ model minimizes the total cost associated with the ordering and holding costs while meeting all demand (without shortage). • When shortages are allowed (b > 0) we have the EOQ model with backorders or planned shortages. • Usage: EOQ(d, k, h, b = 0) • Where: d is Demand per unit of time. k is Ordering or fixed cost per order. h is Holding cost per unit of product. b is Shortage penalty cost per unit (default:0) • Output Values: Q EOQ T Time between orders (cycle length) S Maximum backorders in units. Displayed when b > 0 TVC Total variable cost. 7
  • 8. Examples 2 and 3 with R Commands ##Company Alpha Given demand d=8000 items per year; set up cost k=12000; and holding cost h=0.3 per unit ##Classical EOQ model EOQ(8000,12000,0.3) ##we find that the optimal solution is to order 25298 units every 3.2 months with a total variable cost of $7589.5 ##EOQ model with planned shortages ##Consider now that backorders are allowed with a backorder cost b=1.1 per #unit and year. EOQ(8000,12000,0.3,1.1) ##The optimal solution is to order 28540 units every 3.6 months. The total variable cost is $6727.3 and the maximum shortage is 6116 units. 8
  • 9. Economic Production Quantity • The model considers that a new order is produced incrementally when the inventory reaches zero. • It considers a finite production rate; that is, the inventory is replenished gradually as the order is produced. Note that this assumption requires the production rate to be greater than the demand rate (p>d); otherwise, there would be no inventory at any time. • During the time that production run, t = Q=p, inventory is accumulated at rate p-d, which implies that when the production of batch Q is finished, the inventory will reach its maximum level I. • Usage: EPQ(d, p, k, h, b = 0) • Where: d is Deterministic demand per time unit p is the Production rate k is Ordering or fixed cost per order h is Holding cost per unit of product b is Shortage penalty cost per unit (default:0) • Output: Q Order Quantity, t Time required to produce the batch quantity, T Time between orders (cycle length or time), I Maximum inventory level, TC Total cost 9
  • 10. Example 4 with R Commands • Company Alpha has a fixed demand for its Super Speed Vitamins of 200 units per period at a fixed cost per unit of 100 USD, a holding cost of 5 USD per unit. Alpha’s production rate for Super Seed Vitamins is 1000. EPQ(d=200,p=1000,k=100,h=5) q t T I TC 100.0 0.1 0.5 80.0 400.0 ## We find the batch production run at t=0.1; the optimal order interval is T = 0.5, the optimal order quantity is Q = 100, the maximum inventory level is I=80, and the total cost is TC = $400. 10
  • 11. News Vendor Model • When the demand is a random variable with normal distribution, the optimal stocking quantity that minimizes the expected cost: Q Newsboy(m, sd, p, c, s = 0) • Where: m is the Mean demand during the period sd is the Standard deviation of demand during the period p is the selling price, where p > c c is the unit cost s is the salvage value (default:0), where s < cR • Output: Q Optimal order-up-to quantity, SS Safety stock, ExpC Expected cost, ExpP Expected profit, CV Coefficient of variation of the demand, FR Fill rate, the fraction of demand served from stock, z Safety factor 11
  • 12. Note ## When the demand is a random variable with normal distribution, the optimal stocking quantity that minimizes the expected cost is Q = m + z*sd, where z is known as the safety factor and Q-m = z*sd is known as the safety stock. ’Note that the newsboy problem is not formulated in terms of per unit holding cost h = c-s and penalty cost b = p-c. 12
  • 13. Example 5 and 6 with R Commands # Example 5# # Suppose demand is normally distributed with a mean of 100 and a standard deviation of 30. If p = 4 and c = 1, then CR = 0.75 and Q=120.23. # Note that the order is for 20.23 units (safety stock), more than the mean. Note also that ExpC(120.23) = 38.13 and ExpP(120.23)=261.87,with FR=0.96. Newsboy(100,30,4,1) # Example 6 # # Suppose demand is normal with a mean of 100 and a standard deviation of 20. The unit cost is 5, and the holding and penalty costs are 1 and 3, respectively. #From the definition of the holding and penalty cost, we find that p=4, then CR = 0.75 and Q = 113.49. #Notice that the order is for 13.49 units (safety stock) more than the mean, ExpC(113.49) = 25.42 and ExpP(113.49) = 274.58, with a fill rate of 97 per cent. Newsboy(100,20,4,1) 13
  • 14. Reorder Point (ROP) • ROP computes the reorder point level of inventory. When inventory falls to this amount, a new order must be made. • Usage: ROP(SL, md, sd, L) • Arguments SL Service level, a value between 0 and 1 (the expected probability of being able to satisfy all possible inventory requirements within a particular period of time) md Mean demand sd Standard deviation of the demand L A positive lead-time • Value: Reorder point level • Example 7 ROP(0.9,2500,500,6) 14
  • 15. Safety Stock (SS) • SS computes the safety stock level over lead-time • Usage: SS(SL, sd, L) • Arguments: SL Service level, a value between 0 and 1 sd Standard deviation of the demand L A positive lead-time • Value: Safety stock level over lead-time • Example 8 SS(0.95,0.7,2) 15
  • 16. Wagner-Whitin (WW) Algorithm • WW Considers time-varying demand. The algorithm builds production plans that minimize the total setup and holding costs in a finite horizon of time, assuming zero starting inventory and no backlogging • Usage: WW(x, a, h, method = c("backward", "forward")) • Arguments x A numeric vector containing the demand per unit time a Standard numeric number for the set-up cost per unit and period h A numeric number for the holding cost per unit and period method Character string specifying Which algorithm to use: "backwards(default) or "forward“. 16
  • 17. Example 9 with R Commands # An aeroplane manufacturer specializes in producing small aeroplanes. It has just received an order from a major corporation for 10 customized executive jet aeroplanes for the use of the corporation's upper management. The order calls for three of the aeroplanes to be delivered (and paid for) during the upcoming winter months (period 1), two more to be delivered during the spring (period 2), three more during the summer (period 3), and the final two during the fall (period 4). Setting up the production facilities to meet the corporation's specifications for these aeroplanes requires a setup cost of $2 million. # The manufacturer has the capacity to produce all 10 aeroplanes within a couple of months when the winter season will be underway. However, this would necessitate holding seven of the aeroplanes in inventory, at a cost of $200,000 per aeroplane per period, until their scheduled delivery times (...) Management wants to determine the least costly production schedule for filling this order. x <- c(3,2,3,2) a <- 2 h <- 0.2 WW(x,a,h,method="backward") 17