Optimization: principles and algorithms, by Michel Bierlaire

Implementation of a variant of the local search algorithm with random neighbors for the knapsack problen. More...
Go to the source code of this file.
Functions  
function  ksLocalSearchRandom (in u, in w, in c, in x0, in s, in maxiter) 
Implementation of a variant of the local search algorithm with random neighbors for the knapsack problen.
Perform a variant of the local search for the knapsack problem with a neighborhood of a given size, where neighbord are selected randomly, and accepted if hey improve the objective function.
u  utility of each item 
w  weight of each item 
c  capacity of the knapsack 
x0  current solution 
s  size of the neighborhood 
maxiter  number of candidates being evaluated (Default: 1000) 
Definition in file ksLocalSearchRandom.m.
function ksLocalSearchRandom  (  in  u, 
in  w,  
in  c,  
in  x0,  
in  s,  
in  maxiter  
) 