> Discrete Optimization > Transport: Piecewise Linear Optimization > Describing the Problem

Assume that a company must ship cars from factories to showrooms. Each factory can supply a fixed number of cars, and each showroom needs a fixed number of cars. There is a cost for shipping a car from a given factory to a given showroom. The objective is to minimize the total shipping cost while satisfying the demands and respecting supply.

In concrete terms, assume there are three factories and four showrooms. Here is the quantity that each factory can supply:

supply0 = 1000 
supply1 = 850 
supply2 = 1250 

Each showroom has a fixed demand:

demand0 = 900 
demand1 = 1200 
demand2 = 600 
demand3 = 400 

Let nbSupply be the number of factories and nbDemand be the number of showrooms. Let xij be the number of cars shipped from factory i to showroom j. The model is composed of nbDemand + nbSupply constraints that force all demands to be satisfied and all supplies to be shipped. Thus far, a model for our problem looks like this:

Minimize images/usingPiecewiseLina7.gif

subject to

images/usingPiecewiseLina8.gif

images/usingPiecewiseLina9.gif