#include <csproblem.h>
Inheritance diagram for CSProblem:
Public Member Functions | |
CSProblem (int nbvar, int nbconst ) | |
CSProblem (int nbvar, int nbconst , int lower) | |
void | move_execution (Configuration *configuration, Move *move) |
virtual int | variable_domainsize (int var) |
void | random_configuration (Configuration *configuration) |
virtual int | random_variable (Configuration *configuration) |
virtual int | random_conflict_variable (Configuration *configuration) |
virtual int | random_value (int var, int val) |
virtual int | min_conflict_value (int var, int val, Configuration *configuration) |
virtual void | init_domains (int nbvar, int s) |
virtual void | init_tabdomains (int s) |
void | compute_var_conflict (Configuration *configuration) |
void | best_config_analysis () |
void | best_config_write () |
int | move_evaluation (Configuration *configuration, Move *move) |
void | init_population (Configuration **population, int populationsize) |
Configuration * | create_configuration () |
Move * | create_move () |
void | adjust_parameters (Configuration *configuration, int &maxneighbors, int &minneighbors) |
void | next_move (Configuration *configuration, Move *move, NeighborhoodSearch *nbhs) |
virtual void | set_domains_connections (int *dom, vector< int > *tabledom, vector< int > *connect) |
virtual void | init_domain_tabdomain () |
int | tabuindex (Move *move, Configuration *config) |
int | tabuinverseindex (Move *move, Configuration *config) |
int | nbtabuindex () |
Public Attributes | |
int | nbconst |
vector< int > * | tabdomains |
int * | domains |
vector< int > * | connections |
|
constructor |
|
constructor with lower bound (stopping condition when it is reached) |
|
adjustment of the neighborhood parameters (when the size of the actual neighborhood is greater than maxneighbors) Reimplemented from OpProblem. Reimplemented in Carseq, Latinsquare, CliqueProblem, SwNqueen, and SwNiNqueen. |
|
analysis of the best configuration Reimplemented from OpProblem. Reimplemented in Carseq, ColorCSProblem, and ImpasseColor. |
|
writing the best solution Reimplemented from OpProblem. Reimplemented in CelarCSProblem, ColorCSProblem, and ImpasseColor. |
|
compute the variables in conflict : rebuilding the vector of conflict variables of the configuration Reimplemented from OpProblem. Reimplemented in Carseq, CelarCSProblem, ColorCSProblem, ImpasseColor, Latinsquare, and SwNqueen. |
|
create a configuration (the exact class depends on the problem and must defined in subclasses) Reimplemented from OpProblem. Reimplemented in Carseq, CelarCSProblem, ColorCSProblem, ExtensionBinaryCSProblem, Latinsquare, CliqueProblem, NaryCSProblem, Nqueen, SwNiNqueen, and WeightExtensionBinaryCSProblem. |
|
creation of 1 Move object (the class of the Move depends on the problem) : this method is implemented in subclasses Reimplemented from OpProblem. Reimplemented in Carseq, Latinsquare, CliqueProblem, and SwNqueen. |
|
initialization of the domains : call init_domains and init_tabdomains |
|
standard domain initialization : a unique domain number 0 for all variables Reimplemented in ColorCSProblem, and ImpasseColor. |
|
initialization of the population of size populationsize Reimplemented from OpProblem. |
|
standard unique domain : integers from 0 to s-1 Reimplemented in ImpasseColor. |
|
a value in the domain minimizing the conflict with the configuration (implementation of Minton min-conflict heuristics) returns the index of the value in the domain Reimplemented in ColorCSProblem. |
|
evaluation of a configuration if the move is done Reimplemented from OpProblem. Reimplemented in Carseq, CelarCSProblem, ColorCSProblem, Latinsquare, CliqueProblem, SwNqueen, and SwNiNqueen. |
|
move execution (modification of the current configuration) Reimplemented from OpProblem. Reimplemented in Carseq, CelarCSProblem, ImpasseColor, Latinsquare, CliqueProblem, and SwNqueen. |
|
next move to be tested (implemented in subclasses) Reimplemented from OpProblem. Reimplemented in Carseq, Latinsquare, CliqueProblem, and SwNqueen. |
|
random assignment of the variables of a configuration Reimplemented from OpProblem. Reimplemented in Carseq, CelarCSProblem, ColorCSProblem, ImpasseColor, Latinsquare, CliqueProblem, and SwNqueen. |
|
a variable taking part to a conflict in the configuration Reimplemented in Carseq, CelarCSProblem, and SwNqueen. |
|
a value for variable var, randomly chosen in its domain, if possible distinct with val : returns the index of the value in the domain |
|
a variable randomly chosen Reimplemented in CelarCSProblem. |
|
set the domains and connections of a problem |
|
the domain size of variable var |
|
connections table : for each variable, vector of connected variables |
|
for each variable, domain number : index in tabdomains array |
|
constraint number |
|
domain array : each domain is implemented by a vector of integers |