liveBook · Manning

Inventory level

As explained in Applied Reinforcement Learning

An inventory level is the quantity of a product currently held and available for sale or use.

An inventory level is the current quantity of a product held in stock. In production planning, scooter and bike inventory levels help represent the state of a factory, reflecting the effects of earlier production and customer demand. Too much stock incurs holding costs; too little can leave orders unfilled and create backorder costs. section 2.5

Listing 2.6 Transition Dynamic based on stochastic demand
def transition(state, action, demand, params: FactoryProblemDefinition):
    day, inv_scooter, inv_bike, current_setup = state #A
    demand_scooter, demand_bike = demand              #A
 
    produced_scooter = params.prod_capacity_scooter if action == 0 else 0 #B
    produced_bike = params.prod_capacity_bike if action == 1 else 0 #B
 
    inv_scooter += produced_scooter #B
    inv_bike += produced_bike #B
 
    satisfied_scooter = min(inv_scooter, demand_scooter) #C
    satisfied_bike = min(inv_bike, demand_bike) #C
 
    inv_scooter -= satisfied_scooter #D
    inv_bike -= satisfied_bike #D
 
    backorder_scooter = demand_scooter - satisfied_scooter #E
    backorder_bike = demand_bike - satisfied_bike #E
 
    next_setup = action if action in (0, 1) else current_setup #F
    next_day = day + 1 #G
    next_state = (next_day, inv_scooter, inv_bike, next_setup) #G
 
    return next_state, produced_scooter, produced_bike, backorder_scooter, backorder_bike

See how production adds to scooter or bike inventory, demand is met from stock, and unmet demand becomes backorders. section 2.5

How Applied Reinforcement Learning covers it

How deep it goes
Explains how production and stochastic demand affect stock and connect it to holding and backorder costs.
Examples
Uses scooter and bike stock in a factory with daily production choices and customer demand.
What you can do after
Understand how daily production and customer demand change product stock and can lead to holding or backorder costs.
How it connects
Connects inventory levels to Markov decision processes, production actions, stochastic demand, holding costs, and backorder costs.

This explainer was generated by Manning's knowledge graph from the text of Applied Reinforcement Learning. The section links point to the parts of the book it draws on.