12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

overlaps with an endpoint of two other segments, and consequently, the isolated point will beignored by <strong>ILOG</strong> <strong>CPLEX</strong>.Using IloPiecewiseLinear in ExpressionsWhether it represents a continuous or a discontinuous piecewise linear function, an instanceof IloPiecewiseLinear behaves like a floating-point expression. That is, you may use itin a term of a linear expression or in a constraint added to a model (an instance ofIloModel).Describing the ProblemAssume that a company must ship cars from factories to showrooms. Each factory cansupply a fixed number of cars, and each showroom needs a fixed number of cars. There is acost for shipping a car from a given factory to a given showroom. The objective is tominimize 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 quantitythat each factory can supply:supply0 = 1000supply1 = 850supply2 = 1250Each showroom has a fixed demand:demand 0 = 900demand 1 = 1200demand2 = 600demand3 = 400Let nbSupply be the number of factories and nbDemand be the number of showrooms. Letx ij be the number of cars shipped from factory i to showroom j. The model is composed ofnbDemand + nbSupply constraints that force all demands to be satisfied and all supplies tobe shipped. Thus far, a model for our problem looks like this:nbDemand – 1 nbSupply – 1Minimize ∑ ∑ costij⋅ x iji = 0 j = 0subject tonbSupply – 1x ijj = 0∑= supply ii = 0 ,…,nbDemand – 1nbDemand – 1x iji = 0∑= demand jj = 0 ,…,nbSupply – 1342 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!