In this repository, mathematical optimization is used for solving an item production scheduling problem.
When manufacturing items on a machine, the machine may consume varying amounts of electricity per hour, depending on the item that is being produced. The idea is to utilize this variation when scheduling the production of items. For example, it may make sense to produce high-consuming items to hours where the electricity price is expected to be low.
Given a realized production schedule of a machine in the past, we assess whether cost savings could've been achieved, if the schedule had been optimized.
The following three-step approach is used for solving the problem:
- Generate electricity forecast for the future
- Solve the problem as an MILP (mixed integer linear programming)
- Compare results with realized schedule
- items.csv: Electricity consumption for each item per 4-hour production block
- prices.csv: Realized hourly electricity prices from 1.1.2014 -
- schedule.csv: Realized production schedule for time period 29.9.2016 - 11.10.2016
- data_exploration.py: Plotting input data and results
- data_utils.py: Data loading and preprocessing
- forecast.py: Electricity price forecast model
- optimization.py: Production scheduling optimization model
- model.py: Running the entire model and plotting results
The following results can be obtained by simply running model.py.
The electricity price forecast:
The results show that cost savings can be achieved even by using optimization, and a simple model for electricity price forecast.