demand_sim: Simulate the demand for new products

View source: R/demand_sim.R

demand_simR Documentation

Simulate the demand for new products

Description

Simulate the demand for new products over their life cycle by specifying their shape type.

Usage

demand_sim(
  products_number,
  periods_number,
  shape_number,
  shape_type = "random",
  level_number,
  level_range = 1000:10000,
  noise_cv = 0.05
)

Arguments

products_number

Number of products

periods_number

Number of periods of the introduction and growth phases

shape_number

Number of generic shapes

shape_type

Type of shape to generate. It can take the values: "triangle", "trapezoid", "bass", "random" and "intro & growth". The type "random" picks one of the types "triangle", "trapezoid", "bass" randomly for each product. The type "intro & growth" is used for the shapes of the introduction and growth phases.

level_number

Number of generic levels

level_range

Range of values from which the level is sampled

noise_cv

The coefficient of variation of the noise added to the simulated sales

Value

A date frame that contains the following columns: product_id, shape and assigned_shape, level and assigned_level, demand_wn (demand without noise, not rounded), noise and demand. demand is the rounded value of the Max between (demand_wn+noise) and 0

Examples

demand_sim(products_number=100,periods_number=20,shape_number=5, level_number=20)

demand_sim(products_number=100,periods_number=20,shape_number=5, shape_type="bass", level_number=20,
level_range=1000:10000,noise_cv=0.05)

npdsim documentation built on April 12, 2025, 1:37 a.m.