liveBook · Manning

Inventory management

As explained in Applied Reinforcement Learning

Inventory management is the planning and control of replenishment and stock levels to balance availability and inventory-related costs.

Inventory management balances product availability against the costs of holding stock and running out. In a gas station, ordering too early ties up capital; ordering too late risks missed sales and lost customer trust. Uncertain demand and delivery delays make replenishment a sequence of interdependent decisions. section 6.6

Fuel ordering

A station chooses whether and how much fuel to order each day. It weighs holding costs against stockout losses while accounting for deliveries that may take several days to arrive. section 6.6

Listing 6.4 Environment configuration and state representation
@dataclass
class GasStationConfig:
    """Configuration class for gas station inventory environment parameters."""
    max_inventory: int = 10         #A
    initial_inventory: int = 4      #B
    planning_horizon: int = 30      #C
    
    demand_mean: float = 2.0        #D
    demand_std_dev_factor: float = 0.5 #E
    demand_min: float = 0.0         #F
    demand_max: float = 10.0        #F
    
    delivery_delay_mean: int = 2    #G
    min_delivery_delay: int = 1     #H
    
    profit_per_tank: float = 100.0  #I
    stockout_penalty: float = 80.0  #J
    holding_cost_per_tank: float = 5.0 #K
    ordering_cost: float = 20.0     #L

See the example environment’s inventory limits, demand and delivery settings, and cost parameters. section 6.6

How Applied Reinforcement Learning covers it

How deep it goes
Explains the trade-off among holding costs, stockout losses, and delayed deliveries, and places the problem in tabular reinforcement learning.
Examples
Uses a gas station deciding when and how much fuel to order amid changing demand and uncertain delivery times.
What it assumes
Assumes familiarity with temporal-difference learning, Q-learning, SARSA, and eligibility traces rather than teaching them from zero.
What you can do after
Understand how sequential ordering decisions trade off inventory costs against sales lost to stockouts.
How it connects
Connects inventory management to reinforcement learning, temporal-difference learning, Q-learning, SARSA, eligibility traces, and supply-chain lead time.

Related concepts

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.