Search code examples
linear-programming

LP warehouse problem with a certain truck capacity


The problem that I need to solve is almost like the basic LP warehouse problem, where you have n warehouses, each one with a certain amount of a product, and m shops, each one demanding a certain amount of that product. So the goal is to minimize the amount of Km made by the trucks that have to deliver the products from the warehouses to the shops. This was the easy part, I already identified the constraints and the objective function. The part that I can't get my head around, is that the truck that delivers the products has a certain capacity, C. Every single truck has the same capacity. I can't tell if that piece of information is really relevant and should be included in some kind of constraint or something. I would really apreciate a hint, cause I've been stuck on this part for a while now and couldn't fine any example of this exact type of problem on the Internet


Solution

  • The number of trucs needed can be bounded by

    numtrucs(i,j)*capacity >= shipment(i,j)
    

    Add a term to the objective that minimizes the number of trucs.