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
