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.

Then use a for-loop to add the constraints for each month (from What Are the Constraints?on page 362), like this:IloExpr profit(env);for (i = 0; i < nbMonths; i++) {model.add(use[i][v1] + use[i][v2] = 20),use[i][o3] >= 20));To consolidate the monthly objectives, add the overall objective to the model, like this:model.add(IloMaximize(env, profit));364 <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!