I have an interesting problem involving linear programming. The problem is the following, I have 4 different kinds of rods (rod sized found in the local market):
- 9m rod
- 11m rod
- 12m rod
- 15m rod
Slabs on construction have steel rods and I want to minimize the quantity of rods used horizontally and vertically. I have a total length (Ltotal) and I want to know what is the minimum amount of rods I need to use for a slab,that still fits at least inside it or possibly longer. The remaining rod length that exceeds the slab is going to be cut. So I suppose the objective function will be:
$$ \min x_{1} + x_{2} + x_{3} + x_{4} $$
$$s.t. \ 9x_{1} + 11x_{2} + 12x_{3} + 15x_{4}\ \ (\lt,\le or =)? \ \ \ L_{total}$$ $$ x_{1} \ge 0$$ $$ x_{2} \ge 0$$ $$ x_{3} \ge 0$$ $$ x_{4} \ge 0$$ where
$x_{1}$: total amount of 9m rods used
$x_{2}$: total amount of 11m rods used
$x_{3}$: total amount of 12m rods used
$x_{4}$: total amount of 15m rods used
I assume all this 4 variables should be integers(MILP)
The constraint expresses the amount of rods multiplied by its length should be less than or equal to the total length. I want some advice as I am not very familiar to optimization methods. I put this same example in PuLP but it throwed 0 for all values.
I need help to solve this problem.
Thanks
Edited as the problem definition keeps changing. With the current desrciption in the comments, you have simply used the wrong inequality.
$$ \min x_{1} + x_{2} + x_{3} + x_{4} $$
$$s.t. \ 9x_{1} + 11x_{2} + 12x_{3} + 15x_{4}\ \geq L_{total}$$ $$ x_{1} \ge 0$$ $$ x_{2} \ge 0$$ $$ x_{3} \ge 0$$ $$ x_{4} \ge 0$$