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.

soon as they are enclosed in a goal. This takeover happens via the implicit constructorIloCplex::Goal::Goal(IloRange rng) that is called when the range constraints arepassed as arguments to the Or goal.In summary, the user is responsible for calling end on all <strong>ILOG</strong> Concert Technology objectscreated in a goal, except when they have been passed as arguments to a new goal.Also, user code in the execute method is not allowed to modify existing <strong>ILOG</strong> ConcertTechnology objects in any way. <strong>ILOG</strong> <strong>CPLEX</strong> uses an optimized memory managementsystem within goals for dealing with temporary objects. However, this memory managementsystem cannot be mixed with the default memory management system used by <strong>ILOG</strong>Concert Technology. Thus, for example, it is illegal to add an element to array vars in theexample, since this array has been created outside of the goal.Cuts and GoalsGoals can also be used to add global cuts. Whereas local cuts are respected only in a subtree,global cuts are added to the entire problem and are therefore respected at every node afterthey have been added.Just as you can add local cuts by means of a local cut goal, as explained in Local Cut Goalon page 431, you can add a global cut by means of a global cut goal. A global cut goal iscreated with the method IloCplex::GoalI::GlobalCutGoal(IloCplex.globalCutGoal or Cplex.GlobalCutGoal). This method takes an instanceof IloRange or IloRangeArray (IloRange[]) as its argument and returns a goal. Whenthe goal executes, it adds the constraints as global cuts to the problem.Example ilogoalex2.cpp shows the use of IloCplex::GoalI::GlobalCutGoal forsolving the noswot MILP model. This is a relatively small model from the MIPLIB 3.0 testset, consisting of only 128 variables. Nonetheless, it is very hard to solve without addingspecial cuts.<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 437

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

Saved successfully!

Ooh no, something went wrong!