C# Class Cream.LocalSearch

A super class of local search solvers, and also an implementation of a random walk solver. Local search is an iterative procedure. It first finds an initial soluttion, and iteratively make a small change
Inheritance: Solver
Show file Open project: kikoanis/CSharpCream Class Usage Examples

Public Properties

Property Type Description
iterTimeout long

Protected Properties

Property Type Description
iteration int
solver DefaultSolver

Public Methods

Method Description
LocalSearch ( Cream.Network network ) : System

Constructs a random-walk solver for the given network. This constructor is equivalent to LocalSearch(network, Default, null).

LocalSearch ( Cream.Network network, String name ) : System

Constructs a random-walk solver for the given network and name. This constructor is equivalent to LocalSearch(network, Default, name).

LocalSearch ( Cream.Network network, int option ) : System

Constructs a random-walk solver for the given network and option. This constructor is equivalent to LocalSearch(network, option, null).

LocalSearch ( Cream.Network network, int option, String name ) : System

Constructs a random-walk solver for the given network, option, and name.

Run ( ) : void
Stop ( ) : void

Protected Methods

Method Description
EndSearch ( ) : void
GetCandidate ( ) : Solution
NextSearch ( ) : void
StartSearch ( ) : void

Method Details

EndSearch() protected method

protected EndSearch ( ) : void
return void

GetCandidate() protected method

protected GetCandidate ( ) : Solution
return Solution

LocalSearch() public method

Constructs a random-walk solver for the given network. This constructor is equivalent to LocalSearch(network, Default, null).
public LocalSearch ( Cream.Network network ) : System
network Cream.Network the constraint network ///
return System

LocalSearch() public method

Constructs a random-walk solver for the given network and name. This constructor is equivalent to LocalSearch(network, Default, name).
public LocalSearch ( Cream.Network network, String name ) : System
network Cream.Network the constraint network ///
name String the name of the solver ///
return System

LocalSearch() public method

Constructs a random-walk solver for the given network and option. This constructor is equivalent to LocalSearch(network, option, null).
public LocalSearch ( Cream.Network network, int option ) : System
network Cream.Network the constraint network ///
option int the option for search strategy ///
return System

LocalSearch() public method

Constructs a random-walk solver for the given network, option, and name.
public LocalSearch ( Cream.Network network, int option, String name ) : System
network Cream.Network the constraint network ///
option int the option for search strategy, or Default for default search strategy ///
name String the name of the solver, or null for a default name ///
return System

NextSearch() protected method

protected NextSearch ( ) : void
return void

Run() public method

public Run ( ) : void
return void

StartSearch() protected method

protected StartSearch ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

Property Details

iterTimeout public property

public long iterTimeout
return long

iteration protected property

protected int iteration
return int

solver protected property

protected DefaultSolver,Cream solver
return DefaultSolver