Mathematics Asked on December 23, 2021
I am building a linear programming model. For the sake of simplicity, Imagine that I’m trying to fill a bunch of items into a bunch of boxes. I have a lot of box types I can choose from but the model must pick up to 10 box types. There are unlimited amount of boxes in each type. for each box type it picks, the model must use that type for at least 5% of the total volume. Here’s what I have:
Minimize Cost to put items in the boxes subject to the following constraints:
The model isn’t very complicated, but I’m stuck at how to model constraint #2. So of the 100s of box types available, the model must pick up to 10 to match the minimize equation
Let $v_i$ be the volume of item $i$, and let $c_{i,b}$ be the cost of placing item $i$ in a box of type $b$. Let binary decision variable $x_{i,b}$ indicate whether item $i$ is placed in a box of type $b$, and let binary decision variable $y_b$ indicate whether box type $b$ is used. The problem is to minimize $sum_{i,b} c_{i,b} x_{i,b}$ subject to: begin{align} sum_b x_{i,b} &= 1 &&text{for all $i$}\ x_{i,b} &le y_b &&text{for all $i$ and $b$}\ sum_b y_b &le 10 \ left(0.05 sum_i v_iright) y_b &le sum_i v_i x_{i,b} &&text{for all $b$} end{align}
Answered by RobPratt on December 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP