|
virtual WeightedCSP * | getWCSP ()=0 |
| access to its associated Weighted CSP
|
|
virtual Long | getNbNodes () const =0 |
| number of search nodes (see WeightedCSPSolver::increase, WeightedCSPSolver::decrease, WeightedCSPSolver::assign, WeightedCSPSolver::remove)
|
|
virtual Long | getNbBacktracks () const =0 |
| number of backtracks
|
|
virtual void | increase (int varIndex, Value value, bool reverse=false)=0 |
| changes domain lower bound and propagates
|
|
virtual void | decrease (int varIndex, Value value, bool reverse=false)=0 |
| changes domain upper bound and propagates
|
|
virtual void | assign (int varIndex, Value value, bool reverse=false)=0 |
| assigns a variable and propagates
|
|
virtual void | remove (int varIndex, Value value, bool reverse=false)=0 |
| removes a domain value and propagates (valid if done for an enumerated variable or on its domain bounds)
|
|
virtual Cost | read_wcsp (const char *fileName)=0 |
| reads a Cost function network from a file (format as indicated by ToulBar2:: global variables)
|
|
virtual void | read_random (int n, int m, vector< int > &p, int seed, bool forceSubModular=false, string globalname="")=0 |
| create a random WCSP, see WeightedCSP::read_random
|
|
virtual bool | solve (bool first=true)=0 |
| simplifies and solves to optimality the problem More...
|
|
virtual Cost | narycsp (string cmd, vector< Value > &solution)=0 |
| solves the current problem using INCOP local search solver by Bertrand Neveu More...
|
|
virtual bool | solve_symmax2sat (int n, int m, int *posx, int *posy, double *cost, int *sol)=0 |
| quadratic unconstrained pseudo-Boolean optimization Maximize where is expressed by all its non-zero half squared matrix costs (can be positive or negative, with ) More...
|
|
virtual void | dump_wcsp (const char *fileName, bool original=true, ProblemFormat format=WCSP_FORMAT)=0 |
| output current problem in a file More...
|
|
virtual void | read_solution (const char *fileName, bool updateValueHeuristic=true)=0 |
| read a solution from a file
|
|
virtual void | parse_solution (const char *certificate, bool updateValueHeuristic=true)=0 |
| read a solution from a string (see ToulBar2 option -x)
|
|
virtual const vector< Value > | getSolution ()=0 |
| after solving the problem, return the optimal solution (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
|
|
virtual Double | getSolutionValue () const =0 |
| after solving the problem, return the optimal solution value (can be an arbitrary real cost in minimization or preference in maximization, see CFN format) (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
|
|
virtual Cost | getSolutionCost () const =0 |
| after solving the problem, return the optimal solution nonnegative integer cost (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
|
|
virtual Cost | getSolution (vector< Value > &solution) const =0 |
| after solving the problem, add the optimal solution in the input/output vector and returns its optimum cost (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that) More...
|
|
virtual vector< pair< Double, vector< Value > > > | getSolutions () const =0 |
| after solving the problem, return all solutions found with their corresponding value
|
|
Abstract class WeightedCSPSolver representing a WCSP solver
- link to a WeightedCSP
- generic complete solving method configurable through global variables (see ::ToulBar2 class and command line options)
- optimal solution available after problem solving
- elementary decision operations on domains of variables
- statistics information (number of nodes and backtracks)
- problem file format reader (multiple formats, see Weighted Constraint Satisfaction Problem file format (wcsp))
- solution checker (output the cost of a given solution)