Applied Optimization with Julia
University of Hamburg - Fall 2024
Where is the
challenge?
Question: What could be the objective?
Minimize the combined setup and inventory holding cost while satisfying the demand and adhering to the production capacity.
Question: What is the trade-off?
Larger batches require less setup cost per bottle, but increase the storage cost.
Question: What are sets again?
Sets are collections of objects.
Question: What could be the sets here?
Question: What are possible parameters?
We have the following sets:
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?
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:
We need the following parameters:
\[\text{Minimize} \quad \sum_{i=1}^{\mathcal{I}} \sum_{t=1}^{\mathcal{T}} (c_i \times W_{i,t} + f_i \times Y_{i,t})\]
Question: What 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:
Question: What could the constraint look like?
\[W_{i,t-1} + X_{i,t} - W_{i,t} = d_{i,t} \quad \forall i\in\mathcal{I},t\in\mathcal{T}|t>1\]
Remember, these are the variables and parameters:
Question: What does \(|t>1\) mean?
The goal of these constraints is to:
Set up beer types where the batch size is \(\geq\) 0.
We need the following variables and parameters:
Question: What could the second constraint be?
\[X_{i,t} \leq Y_{i,t} \times \sum_{\tau=1}^{\mathcal{T}} d_{i\tau} \quad \forall i\in\mathcal{I},\forall t\in\mathcal{T}\]
Question: Do you know this type of constraint?
This type of constraint is called a “Big-M” constraint!
The goal of these constraints is to:
Limit the capacity of the bottling plant per period.
We need the following variables and parameters:
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.
\[\sum_{i=1}^{\mathcal{I}} (b_i \times X_{i,t} + g_i \times Y_{i,t}) \leq a_t \quad \forall t\in\mathcal{T}\]
And that’s basically it!
\[\text{Minimize} \quad \sum_{i \in \mathcal{I}} \sum_{t \in \mathcal{T}} (c_i \times W_{i,t} + f_i \times Y_{i,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.
\[W_{i,t-1} + X_{i,t} - W_{i,t} = d_{i,t} \quad \forall i\in\mathcal{I},t\in\mathcal{T}|t>1\]
\[X_{i,t} \leq Y_{i,t} \times \sum_{\tau \in \mathcal{T}} d_{i,\tau} \quad \forall i\in\mathcal{I},\forall t\in\mathcal{T}\]
\[\sum_{i \in \mathcal{I}} (b_i \times X_{i,t} + g_i \times Y_{i,t}) \leq a_t \quad \forall t\in\mathcal{T}\]
Our constraints ensure:
Demand is met, inventory transferred, setup taken care of, and capacity respected.
\[Y_{i,t}\in\{0,1\} \quad \forall i\in\mathcal{I},t\in\mathcal{T}\]
\[W_{i,t}, X_{i,t}\geq 0 \quad \forall i\in\mathcal{I},t\in\mathcal{T}\]
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.
There exist several types of optimization problems:
Questions: On model characteristics
Questions: On model assumptions
Can this be
applied?
Solving the problem with commercial solvers is not feasible.
Any idea what
could be done?
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?
For more interesting literature to learn more about Julia, take a look at the literature list of this course.
Lecture V - Production Planning in Breweries | Dr. Tobias Vlćek | Home