A factory must choose what to make each day while balancing limited machine capacity, uncertain demand, setup changes, and inventory costs. A Markov decision process represents the decision over a fixed planning horizon. section 2.5
Model the daily decision with:
- A state containing the day, inventory of each product, and current machine setup. section 2.5
- Actions to produce scooters, produce bikes, or idle. section 2.5
- Stochastic demand, inventory transitions, and rewards that account for sales, production, setup, holding, and backorder costs. section 2.5
Two-product factory
A scooter-and-bike plant can use greedy or setup-aware policies, then simulate each policy over the planning horizon and track cumulative profit. section 2.5
Listing 2.4 Factory problem definition
Class FactoryProblemDefinition:
lambda_scooter = 4.0 #A
lambda_bike = 3.0 #A
horizon = 30 #A
prod_capacity_scooter = 8 #B
prod_capacity_bike = 6 #B
price_scooter = 40.0 #C
price_bike = 50.0 #C
cost_scooter = 20.0 #C
cost_bike = 25.0 #C
setup_cost = 200.0 #D
holding_cost = 2.0 #D
backorder_cost = 10.0 #D
Factory parameters specify demand rates, production capacities, prices, production costs, setup costs, and inventory penalties. section 2.5
