Last data update: 2014.03.03

R: EPQ
EPQR Documentation

EPQ

Description

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

Usage

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(InventorymodelPackage)
Loading required package: e1071
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/InventorymodelPackage/EPQ.Rd_%03d_medium.png", width=480, height=480)
> ### Name: EPQ
> ### Title: EPQ
> ### Aliases: EPQ
> 
> ### ** Examples
> 
> 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

> 
> #$"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
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>