IBM ILOG Scheduler User's Manual > Local Search in Scheduler > Tabu Search for the Jobshop Problem with Alternatives > Solving the Problem > Modifying the N1 Neighborhood

Given that much of the implementation of the N1 neighborhood in the previous chapter is now implemented in the abstract MyNHoodI class, the N1NHoodI is quite straightforward. Two methods are defined. The addMove method creates an instance of the SwapRC class and calls the MyNHoodI function to add it to the list of moves.

  void addMove(IloSolver solver, 
               IloResourceConstraint rc, IloResourceConstraint after) {
    SwapRC *move = new (solver.getEnv()) SwapRC(rc, after);
    MyNHoodI::realAddMove(move);
  }

The start method has the same functionality as the N1HoodI::start method presented in the previous chapter, but the fact that some of the functionality is performed in the parent method means that the code is shorter. Refer to Creating the N1 Neighborhood for more details.

  void start(IloSolver, IloSolution soln) {
    _solution = IloSchedulerSolution(soln);
    _nbMoves = 0;
  }