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

Public Member Functions

virtual void move_execution (Configuration *configuration, Move *move)
 
virtual void incr_update_conflicts (IncrCSPConfiguration *configuration, Move *move)
 
virtual void fullincr_update_conflicts (FullincrCSPConfiguration *configuration, Move *move)
 
virtual void allocate_moves ()
 
virtual Movecreate_move ()
 
virtual void adjust_parameters (Configuration *configuration, int &maxneighbors, int &minneighbors)
 
virtual void next_move (Configuration *configuration, Move *move, NeighborhoodSearch *nbhs)
 
virtual void random_configuration (Configuration *configuration)
 
virtual void best_config_analysis ()
 
virtual void best_config_write ()
 
virtual void best_config_verification ()
 
virtual void init_population (Configuration **population, int populationsize)
 
virtual Configurationcreate_configuration ()
 
virtual Long compute_conflict (Configuration *configuration, int var, int val)
 
virtual Long config_evaluation (Configuration *configuration)
 
virtual Long move_evaluation (Configuration *configuration, Move *move)
 
virtual int index2value (int index, int var)
 
virtual int value2index (int value, int var)
 
virtual void compute_var_conflict (Configuration *configuration)
 

Public Attributes

Configurationbest_config
 
int nbvar
 
int domainsize
 
Long lower_bound
 
Movecurrentmove
 
Movefirstmove
 
Movebestmove
 

Detailed Description

Root class of Optimization Problems (minimization)

Member Function Documentation

◆ adjust_parameters()

virtual void OpProblem::adjust_parameters ( Configuration configuration,
int &  maxneighbors,
int &  minneighbors 
)
virtual

adjustment of the neighborhood parameters (when the size of the actual neighborhood is greater than maxneighbors)

Referenced by DynamicNeighborhoodSearch::dynamicmaxneighbors().

◆ allocate_moves()

void OpProblem::allocate_moves ( )
virtual

creation of 3 Move objects (currentmove,bestmove,firstmove)

Referenced by INCOP::NaryCSProblem::create_configuration().

◆ best_config_analysis()

virtual void OpProblem::best_config_analysis ( )
virtual

analysis of the best configuration

◆ best_config_verification()

void OpProblem::best_config_verification ( )
virtual

verification of the best solution (its cost is recomputed)

◆ best_config_write()

virtual void OpProblem::best_config_write ( )
virtual

writing the best solution

◆ compute_conflict()

virtual Long OpProblem::compute_conflict ( Configuration configuration,
int  var,
int  val 
)
virtual

computation of the participation of (var,val) to the configuration evaluation

Reimplemented in INCOP::NaryCSProblem.

Referenced by Configuration::get_conflicts_problem(), and Configuration::update_conflicts().

◆ compute_var_conflict()

virtual void OpProblem::compute_var_conflict ( Configuration configuration)
virtual

compute the variables participating to a conflict in the configuration

Reimplemented in CSProblem.

Referenced by LSAlgorithm::configurationmove().

◆ config_evaluation()

virtual Long OpProblem::config_evaluation ( Configuration configuration)
virtual

evaluation of a configuration

Reimplemented in INCOP::NaryCSProblem.

◆ create_configuration()

virtual Configuration* OpProblem::create_configuration ( )
virtual

create a configuration (the exact class depends on the problem and must defined in subclasses)

Reimplemented in INCOP::NaryCSProblem.

◆ create_move()

virtual Move* OpProblem::create_move ( )
virtual

creation of 1 Move object (the class of the Move depends on the problem) : this method is implemented in subclasses

◆ fullincr_update_conflicts()

virtual void OpProblem::fullincr_update_conflicts ( FullincrCSPConfiguration configuration,
Move move 
)
virtual

update of the conflict data structure (case FullincrCSPConfiguration)

Referenced by FullincrCSPConfiguration::get_conflicts().

◆ incr_update_conflicts()

virtual void OpProblem::incr_update_conflicts ( IncrCSPConfiguration configuration,
Move move 
)
virtual

update of the conflict data structure (case IncrCSPConfiguration)

Referenced by Configuration::update_conflicts().

◆ index2value()

virtual int OpProblem::index2value ( int  index,
int  var 
)
virtual

valueindex in the domain to value

◆ init_population()

virtual void OpProblem::init_population ( Configuration **  population,
int  populationsize 
)
virtual

initialization of the population of size populationsize

◆ move_evaluation()

virtual Long OpProblem::move_evaluation ( Configuration configuration,
Move move 
)
virtual

evaluation of a configuration if the move is done

◆ move_execution()

void OpProblem::move_execution ( Configuration configuration,
Move move 
)
virtual

move execution (modification of the current configuration)

References Configuration::config, Configuration::get_conflicts_problem(), and Configuration::valuation.

Referenced by LSAlgorithm::configurationmove().

◆ next_move()

virtual void OpProblem::next_move ( Configuration configuration,
Move move,
NeighborhoodSearch nbhs 
)
virtual

next move to be tested (implemented in subclasses)

Referenced by LSAlgorithm::configurationmove().

◆ random_configuration()

virtual void OpProblem::random_configuration ( Configuration configuration)
virtual

random assignment of the variables of a configuration

◆ value2index()

virtual int OpProblem::value2index ( int  value,
int  var 
)
virtual

valueindex of value in its domain

Referenced by Configuration::update_conflicts().

Member Data Documentation

◆ best_config

Configuration* OpProblem::best_config

◆ bestmove

Move* OpProblem::bestmove

the best move found in the neighborhood

Referenced by LSAlgorithm::configurationmove().

◆ currentmove

Move* OpProblem::currentmove

the current move being tested

Referenced by LSAlgorithm::configurationmove().

◆ domainsize

int OpProblem::domainsize

◆ firstmove

Move* OpProblem::firstmove

the first feasible move tried in the neighborhood

Referenced by LSAlgorithm::configurationmove().

◆ lower_bound

Long OpProblem::lower_bound

◆ nbvar

int OpProblem::nbvar

the number of variables