IBM ILOG Solver User's Manual > Local Search > Basic Local Search > Example: Using metaheuristics > Creating the metaheuristic object

We create an metaheuristic object which performs the simulated annealing filtering rule.

  IloMetaHeuristic simAnn = IloSimulatedAnnealing(env, rand, 1.0, 0.99);

The parameters passed are, a source of random numbers (so that probabilistic tests can be carried out), the initial temperature (1.0 in this case), and the reduction rate (the temperature is multiplied by 0.99 after each move). We use the same source of random numbers as used by the neighborhood, but we could have used a different source if we had desired (another instance of IloRandom). There is no need to pass a cost variable or objective to the metaheuristic. The one added to the solution will be used. This is true of all of Solver's built in metaheuristics.