EPQ: EPQ

Description Usage Arguments Value Examples

View source: R/EPQ.R

Description

This function obtains the optimal number of orders and the associated cost in the EPQ model.

Usage

1
EPQ(n = NA, a = NA, d = NA, h = NA, m = NA, r = NA, s = NA)

Arguments

n

Number of agents in the inventory model.

a

The fixed cost per order.

d

Vector. Deterministic demands per time unit to each agent.

h

Vector. Holding costs to each agent.

m

Vector. Number of orders to each agent (optional).

r

Vector. Replacement rate to each agent. In general, r>d.

s

Vector. Cost of a shortage to each agent.

Value

This function calculates two vector. The first one shows the optimal order for each agent. The second vector indicates the associated cost to these orders.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
EPQ(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10),m=NA,r=rep(600,3),s=c(100,150,200))

#$"Optimal order"
#[1] 641.0928 265.0557 388.8444
#
#$"Optimal shortages"
#[1] 9.359019 9.054699 6.172134
#
#$"Order costs"
#[1]  935.9019 1358.2049 1234.4268

InventorymodelPackage documentation built on May 29, 2017, 9:39 p.m.