knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
In order to use this package, install it and load the library with: library("EOQd")
This package implements functions suitable to solve problems of deterministic inventory with and without quantity discounts. It includes the next functions:
This function implements the basic deterministic EOQ (Economic Order Quantity) model.
A list containing:
library(EOQdis) l <- 520 # Demand k <- 10 # Preparation cost I <- 0.2 # Storage cost per article C <- 5 # Cost of goods per item res1 <- EOQ(l = l, k = k, I = I, C = C) res1
This function provides an EOQ with discounts where the units purchased have the same reduction in price.
A list containing:
dis <- c(0, 0.05, 0.1) # Disccounts: 5% and 10% l <- 520 # Demand (per unit of time). k <- 10 # Preparation cost (per order). I <- 0.2 # Storage cost (per article). q <- c(0, 110, 150) # 5% when the quantity is greater than 110 and less than 150. For more than 150 units the discoun is 10% c <- 5 # Original price of the product res2 <- EOQd(dis = dis, l = l, k = k, I = I, q = q, c = 5) res2
A company needs 500 chairs every month to sell in their online store that costs 15€ each. The supplier negotiates with the company that if they buy more than 50 chairs they offer them a 25% disccount and if they buy more than 100 they offer them a 50% disccount. Making an order costs 10€ and the storage cost is estimated to be 2€ per chair.
We have that:
dis <- c(0, 0.25, 0.5) q <- c(0, 50, 100) l <- 500 k <- 10 I <- 2 c <- 15 opt <- EOQd(dis = dis, l = l, k = k, I = I, q = q, c = c) opt
On each order the company should buy 1000 chairs. Cycle length of 6 days (0.2 months) and 5 orders every month.
This function provides an EOQ with discounts where the discount occurs for units purchased when a certain amount is reached. When the amount of order increases, the cost price decreases in the additional units ordered, not in all units.
A list containing: + Q: Optimal order quantity. + Z: Total cost. + T: Cycle length. + N: Number of orders.
l <- 50000 k <- 10 I <- 0.25 c <- c(0.6, 0.55) q <- c(0, 1000) res3 <- EOQpd(l = 50000, k = 10, I = 0.25, c = c, q = q) res3
An university needs to buy 5000 markers every year, with a cost per order of 15€ and there is an estimated storage cost of 0.2€. The provider has the following policy: if the customer buys less than 500 markers, the cost per item is 0.75€, if the customer buys more than 500 units, the cost per item is 0.5€. We need to determine the optimal policy
l <- 5000 k <- 15 I <- 0.2 c <- c(0.75, 0.5) q <- c(0, 500) res3 <- EOQpd(l = l, k = k, I = I, c = c, q = q) res3
The optimal policy is buy 1000 markers five times. Buying 1000 markers (approximately) two months and a half (5 orders in 12 months).
S3 method to plot a EOQ object by using the generic plot function.
A plot with classical EOQ representation.
plot(res1) plot(res2) plot(res3)
Maintainer: José Carlos Soage González (jsoage@uvigo.es)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.