Get startedGet started for free

Capacitated plant location - case study P2

1. Capacitated plant location - case study P2

In this lesson we will get back to our case study problem.

2. Capacitated plant location model

Recall from an earlier lesson that the capacitated plant location model will attempt to optimize the Supply Chain network by focusing on meeting regional demand at the lowest cost. In the model we are going to consider placing both a low and high capacity plant in each region. Then we want to determine how much those plants will produce and ship to the other regions.

3. Decision variables

Remember that for our model the decision variables include xij, which is the quantity produced at location "i" and shipped to location "j". We also have yis, which we define as a binary variable where it equals 1, if the plant of capacity "s" at location "i" is open, otherwise 0.

4. Constraints

Let's now talk about constraints. Our model will have two main constraints. That is ignoring the constraints on our decision variables which must be greater than or equal to zero. First, we want to make sure that the total production equals total demand. Specifically, for every region J that has demand we want the total quantity produced and shipped to region J to equal the demand of region J. In this case we will need to loop over all the regions and for each one sum the quantity of all the shipments arriving to that region. That summed quantity for the region should be equal to the demand of that region.

5. Constraints

For our next model constraint, recall that for each region we are modeling opening a high and low capacity production plant. We want to make sure the total production of a region does not exceed its production capacity. Specifically, for every region "J" we want the total quantity produced and shipped to be less than or equal to the combined production capacity of the high and low capacity plants in region J. Our code will need to loop through all the regions. For each region we want to sum the total amount being produced in that region. That summed quantity should be less than or equal to the total production capacity of that region. To find the total capacity we will multiply yis, which will be 1 if the plant is open, by the corresponding plant capacity. We will do this for both the low and high capacity plants and sum them together.

6. Code example

You may recall from our earlier lesson we used this code example to define our decision variables and define the objective function. Now we are adding the additional code needed to define our constraints.

7. Code example continued

The first constraint uses a for loop to go through the different region locations and for each, sum all the production shipped to that region. It then sets it equal to the demand from that region. The second constraint loops over each region and sums all the production in that region. It then sets it to be less than or equal to the total region production capacity, which is the sum of the different plant capacities multiplied by yis.

8. Summary

In our lesson we reviewed the constraints of the capacitated plant location model. There are two main constraints. The first sets the total production equal to the total demand. The second constraint, makes sure the total production is less than or equal to the total production capacity. Finally, we looked at an example of how we might code these constraints. While our discussion focused on these two constraints, we could always modify or add to the constraints to fit a particular situation. We could add logical constraints if they were needed.

9. Review time

Time to put in action what we have learned.