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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Consequently, the function can be represented as a piecewise linear function with onebreakpoint and two slopes, like this:IloInt last = nbResource - 1;IloExpr costSum(env);for(j = 0; j < nbJob; j++) {costSum += IloPiecewiseLinear(s[j][last] + duration[j][last],IloNumArray(env, 1, jobDueDate[j]),IloNumArray(env, 2, -jobEarlinessCost[j], jobTardinessCost[j]),jobDueDate[j], 0);}model.add(IloMinimize(env, costSum));Figure 22.1CostEarliness CostJob due dateTardiness CostTimeFigure 22.1 Earliness and Tardiness as Piecewise Linear Cost FunctionTransforming the ProblemWhen <strong>ILOG</strong> <strong>CPLEX</strong> extracts disjunctive constraints and piecewise linear functions, ittransforms them to produce a MIP with linear constraints and possibly SOS constraints overinteger or continuous variables. The tightness of the transformation depends on the boundsset on the variables.In this example, the Horizon is set to 10000, but if you have information about yourproblem that indicates that a good or even optimal solution exists with a tighter horizon (say,2000 instead) then the linear formulation of disjunctions will be tighter with that tighterhorizon.That kind of tightening often leads to a better lower bound at the root node and to a reductionof the solving time.<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 371

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

Saved successfully!

Ooh no, something went wrong!