Lecture V - Production Planning in Breweries

Applied Optimization with Julia

Author

Dr. Tobias Vlćek

Introduction

Case Study

  • Large brewery
  • Brews and sells beverages
  • Production planning by hand
  • Planner has a lot of experience
  • But will retire soon

Challenges

  • Strong competition
  • Customer demand is changing
  • Craft beer gains popularity
  • Variety of drinks is increasing
  • Batch sizes are getting smaller

Different costs

  • Plant can fill multiple types
  • Time depends on type and batch
  • Changing type leads to set-up costs for preparation and cleaning
  • Unsold beer bottles can be stored in a warehouse
  • This leads to inventory costs

Where is the

challenge?


Problem Structure

Objective

Question: What could be the objective?

Minimize the combined setup and inventory holding cost while satisfying the demand and adhering to the production capacity.

Trade-Off

Question: What is the trade-off?

Larger batches require less setup cost per bottle, but increase the storage cost.


Available Sets

Question: What are sets again?

. . .

Sets are collections of objects.

. . .

Question: What could be the sets here?

. . .

  • I - Set of beer types indexed by i{1,2,...,|I|}
  • T - Set of time periods indexed by t{1,2,...,|T|}

Available Parameters

Question: What are possible parameters?

. . .

  • at - Available time on the bottling plant in period tT
  • bi - Time used for bottling one unit of beer type iI
  • gi - Setup time for beer type iI
  • fi - Setup cost of beer type iI
  • ci - Inventory holding cost for one unit of beer type iI
  • di,t - Demand of beer type iI in period tT

Decision Variables?

We have the following sets:
  • Beer types indexed by i{1,2,...,|I|}
  • Time periods of the planning horizon indexed by t{1,2,...,|T|}

. . .

Our objective is to:

Minimize the combined setup and inventory holding cost while satisfying the demand and adhering to the production capacity.

. . .

Question: What could be our decision variable/s?

Decision Variables

  • Wi,t - Inventory of type iI at the end of tT
  • Yi,t - 1, if type iI is bottled in tT, 0 otherwise
  • Xi,t - Batch size of type iI in tT

Model Formulation

Objective Function?

Our objective is to:

Minimize the combined setup and inventory holding cost while satisfying the demand and adhering to the production capacity.

. . .

Question: What could be our objective function?

. . .

We need the following variables:
  • Wi,t - Inventory of type iI at the end of tT
  • Yi,t - 1, if type iI is bottled in tT, 0 otherwise

Objective Function

We need the following parameters:
  • fi - Setup cost of beer type iI
  • ci - Inventory holding cost for one unit of beer type iI

. . .

Minimizei=1It=1T(ci×Wi,t+fi×Yi,t)


Constraints

Question: What constraints?

  • Transfer unused inventory
  • Fulfill the customer demand
  • Set up beer types
  • Calculate the batch size per set-up
  • Compute remaining inventory
  • Limit the bottling plant

Demand/Inventory Constraints?

The goal of these constraints is to:

Consider the current inventory and batch sizes and compute the remaining inventory.

. . .

We need the following variables and parameters:
  • Wi,t - Inventory of beer type iI at the end of period tT
  • Xi,t - Batch size of beer type iI in tT
  • di,t - Demand of beer type iI in period tT

. . .

Question: What could the constraint look like?

Demand/Inventory Constraints

Wi,t1+Xi,tWi,t=di,tiI,tT|t>1

. . .

Remember, these are the variables and parameters:
  • Wi,t - Inventory of beer type iI at the end of period tT
  • Xi,t - Batch size of beer type iI in tT
  • di,t - Demand of beer type iI in period tT

. . .

Question: What does |t>1 mean?


Setup Constraints?

The goal of these constraints is to:

Set up beer types where the batch size is 0.

. . .

We need the following variables and parameters:
  • Yi,t - 1, if beer type iI is bottled in period tT, 0 otherwise
  • Xi,t - Batch size of beer type iI in tT
  • di,t - Demand of beer type iI in period tT

. . .

Question: What could the second constraint be?

Setup Constraints

Xi,tYi,t×τ=1TdiτiI,tT

. . .

Question: Do you know this type of constraint?

. . .

This type of constraint is called a “Big-M” constraint!

. . .

  • M (here τ=1Tdiτ) is a large number
  • It is coupled with a binary variable (here Yi,t)
  • Like an if-then constraint

Capacity Constraints?

The goal of these constraints is to:

Limit the capacity of the bottling plant per period.

. . .

We need the following variables and parameters:
  • Yi,t - 1, if beer type iI is bottled in period tT, 0 otherwise
  • Xi,t - Batch size of beer type iI in tT
  • at - Available time on the bottling plant in period tT
  • bi - Time used for bottling one unit of beer type iI
  • gi - Setup time for beer type iI

Capacity Constraints

Question: What could the third constraint be?

It has more variables and parameters when compared to the other constraints but it is easier to understand.

. . .

i=1I(bi×Xi,t+gi×Yi,t)attT

. . .

And that’s basically it!


CLSP: Objective Function

MinimizeiItT(ci×Wi,t+fi×Yi,t)

The goal of the objective function is to:

Minimize the combined setup and inventory holding cost while satisfying the demand and adhering to the production capacity.

CLSP: Constraints

Wi,t1+Xi,tWi,t=di,tiI,tT|t>1

Xi,tYi,t×τTdi,τiI,tT

iI(bi×Xi,t+gi×Yi,t)attT

Our constraints ensure:

Demand is met, inventory transferred, setup taken care of, and capacity respected.

CLSP: Variable Domains

Yi,t{0,1}iI,tT

Wi,t,Xi,t0iI,tT

The variable domains make sure that:

The binary setup variable is either 0 or 1 and that the inventory and batch size are non-negative.


Model Characteristics

Recap on some Basics

There exist several types of optimization problems:

  • Linear (LP): Linear constraints and objective function
  • Mixed-integer (MIP): Linear constraints and objective function, but discrete variable domains
  • Quadratic (QP): Quadratic constraints and/or objective
  • Non-linear (NLP): Non-linear constraints and/or objective
  • And more!

Recap on Solution Algorithms

  • Simplex algorithm to solve LPs
  • Branch & Bound to solve MIPs
  • Outer-Approximation for mixed-integer NLPs
  • Math-Heuristics (e.g., Fix-and-Optimize, Tabu-Search, …)
  • Decomposition methods (Lagrange, Benders, …)
  • Heuristics (greedy, construction method, n-opt, …)
  • Graph theoretical methods (network flow, shortest path)

Model Characteristics

Questions: On model characteristics

  • Is the model formulation linear/ non-linear?
  • What kind of variable domains do we have?
  • What kind of solver could we use?
  • Can the Big-M constraint be tightened?

Model Assumptions

Questions: On model assumptions

  • What assumptions have we made?
  • What is the problem with the planning horizon?
  • Any idea how to solve it?

Impact

Can this be

applied?

Scale as a Problem

Solving the problem with commercial solvers is not feasible.

Scale of the Case Study

  • 220 finished products
  • 100 semi-finished products
  • 13 production resources
  • 8 storage resources
  • 3 main production levels
  • 52 weeks planning horizon

Any idea what

could be done?

Heuristics and Optimization

  • Multi-level Capacitated Lot-Sizing Problem
  • Heuristic fix and optimize approach
  • Operating cost reduction by 5% and planning effort by 40%

. . .

And that’s it for todays lecture!

We now have covered the basics of the CLSP and are ready to start solving some tasks in the upcoming tutorial.

Questions?


Literature

Literature I

For more interesting literature to learn more about Julia, take a look at the literature list of this course.

Literature II

Mickein, Markus, Matthes Koch, and Knut Haase. 2022. “A Decision Support System for Brewery Production Planning at Feldschlösschen.” INFORMS Journal on Applied Analytics 52 (2): 158–72.

Footnotes

  1. Mickein, Koch, and Haase ()↩︎