Last data update: 2014.03.03

R: EOQ
EOQR Documentation

EOQ

Description

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

Usage

EOQ(n = NA, a = NA, d = NA, h = NA, m = 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).

Value

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

Examples

EOQ(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10))

#$"Optimal order"
#[1] 250.0000 180.9068 219.0890
#
#$"Order costs"
#[1] 2400.000 1989.975 2190.890

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/EOQ.Rd_%03d_medium.png", width=480, height=480)
> ### Name: EOQ
> ### Title: EOQ
> ### Aliases: EOQ
> 
> ### ** Examples
> 
> EOQ(n=3,a=600,d=c(500,300,400),h=c(9.6,11,10))
$`Optimal order`
[1] 250.0000 180.9068 219.0890

$`Order costs`
[1] 2400.000 1989.975 2190.890

> 
> #$"Optimal order"
> #[1] 250.0000 180.9068 219.0890
> #
> #$"Order costs"
> #[1] 2400.000 1989.975 2190.890
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>