FRAMES NO FRAMES

IloSwap

public IloNHood IloSwap(IloEnv env, IloNumVarArray vars, const char * name=0)
Definition file: ilsolver/iimnhood.h
Include file: <ilsolver/iimls.h>

This function returns a neighborhood that can be used to swap variable values in a local search problem.

The function defines a “swapping” neighborhood over the variables specified in vars. Specifically, for each pair of indices a, b drawn from [0, vars.getSize()), such that a < b, a swap of the values of vars[a] and vars[b] is present in the neighborhood.The optional argument name, if supplied, becomes the name of the returned neighborhood.

See Also: