toulbar2
Public Member Functions | Public Attributes | List of all members
LSAlgorithm Class Reference
Inheritance diagram for LSAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for LSAlgorithm:
Collaboration graph
[legend]

Public Member Functions

virtual int isfeasible (Move *move)
 
virtual int configurationmove (OpProblem *problem, Configuration *configuration)
 
int test_bestfound (Move *move)
 

Public Attributes

int walklength
 
NeighborhoodSearchnbhsearch
 
Metaheuristicmheur
 
int nhtries
 
int nbmoves
 
- Public Attributes inherited from IncompleteAlgorithm
Long threshold
 

Detailed Description

The class of local search algorithm on one particle : the random walk is parameterized with the walk lengh,a neighborhood and a metaheuristics

Member Function Documentation

◆ configurationmove()

int LSAlgorithm::configurationmove ( OpProblem problem,
Configuration configuration 
)
virtual

Neighborhood exploration algorithm for selecting and do a move from the current configuration : returns 1 if a move has been done and 0 if no move has been done

References OpProblem::best_config, OpProblem::bestmove, OpProblem::compute_var_conflict(), Configuration::copy_element(), Move::copymove(), OpProblem::currentmove, OpProblem::firstmove, OpProblem::move_execution(), OpProblem::next_move(), and Configuration::update_conflicts().

Referenced by GWWAlgorithm::randomwalk().

◆ isfeasible()

int LSAlgorithm::isfeasible ( Move move)
virtual

feasability of a move (under or at threshold level pour GWW walks)

References OpProblem::lower_bound, GWWAlgorithm::randomwalk(), IncompleteAlgorithm::threshold, and Configuration::valuation.

◆ test_bestfound()

int LSAlgorithm::test_bestfound ( Move move)

test if a global best configuration has been found (returns 1 in that case)

References IncompleteAlgorithm::threshold.

Member Data Documentation

◆ mheur

Metaheuristic* LSAlgorithm::mheur

the metaheuristics used

◆ nbhsearch

NeighborhoodSearch* LSAlgorithm::nbhsearch

the way the neighborhood is explored

◆ nbmoves

int LSAlgorithm::nbmoves

number of moves done

Referenced by GWWAlgorithm::populationrandomwalk().

◆ nhtries

int LSAlgorithm::nhtries

number of move tries (for statistics)

Referenced by GWWAlgorithm::populationrandomwalk().

◆ walklength

int LSAlgorithm::walklength

walk length

Referenced by GWWAlgorithm::randomwalk().