Research Article

Consistent Neighborhood Search for Combinatorial Optimization

Algorithm 1

CNS.
Initialization: generate an initial solution 𝑠 , set 𝑠 βˆ— = 𝑠 and  𝑓 βˆ— =  𝑓 ( 𝑠 ) ;
While a stopping time condition is not met and  𝑓 βˆ— > 0 , do
 1. initialize the value of the best move: set 𝑔 = + ∞ ;
 2. generate the best move: for each non assigned variable 𝑠 𝑖 and each value 𝑑 𝑗 ∈ 𝐷 𝑖 , test move π‘š = ( 𝑠 𝑖 , 𝑑 𝑗 ) on 𝑠 as follows:
   (a) assignment phase: give value 𝑑 𝑗 to variable 𝑠 𝑖 and compute the associated set 𝐢 ( π‘š ) of conflicting variables;
   (b) reassignment phase (optional): for each variable 𝑠 π‘Ÿ of 𝐢 ( π‘š ) , if it is possible to assign another admissible value to 𝑠 π‘Ÿ
   without augmenting the number of violations, do it and remove 𝑠 π‘Ÿ from 𝐢 ( π‘š ) ;
   (c) let 𝑠 c a n d be the so obtained candidate neighbor solution (which might be non feasible at this stage);
   (d) update the best candidate move: if | 𝐢 ( π‘š ) | < 𝑔 , set 𝑠 β€² = 𝑠 c a n d and 𝑔 = | 𝐢 ( π‘š ) | ;
 3. repairing phase on the best move: remove the value of the 𝑔 conflicting variables of 𝑠 β€² and let 𝑠 be the
  resulting new current solution;
 4. update the record: if   𝑓 𝑓 ( 𝑠 ) < βˆ— , set 𝑠 βˆ— = 𝑠 and  𝑓 βˆ— =  𝑓 ( 𝑠 )
Output: solution 𝑠 βˆ— (which is a complete feasible solution if  𝑓 βˆ— = 0 );