|
|
virtual int | getIndex () const =0 |
| | instantiation occurrence number of current WCSP object
|
| |
|
virtual string | getName () const =0 |
| | get WCSP problem name (defaults to filename with no extension)
|
| |
|
virtual void | setName (const string &problem)=0 |
| | set WCSP problem name
|
| |
|
virtual void * | getSolver () const =0 |
| | special hook to access solver information
|
| |
|
virtual Cost | getLb () const =0 |
| | gets internal dual lower bound
|
| |
|
virtual Cost | getUb () const =0 |
| | gets internal primal upper bound
|
| |
|
virtual Double | getDPrimalBound () const =0 |
| | gets problem primal bound as a Double representing a decimal cost (upper resp. lower bound for minimization resp. maximization)
|
| |
|
virtual Double | getDDualBound () const =0 |
| | gets problem dual bound as a Double representing a decimal cost (lower resp. upper bound for minimization resp. maximization)
|
| |
|
virtual Double | getDLb () const =0 |
| | gets problem lower bound as a Double representing a decimal cost
|
| |
|
virtual Double | getDUb () const =0 |
| | gets problem upper bound as a Double representing a decimal cost
|
| |
|
virtual void | updateUb (Cost newUb)=0 |
| | sets initial problem upper bound and each time a new solution is found
|
| |
|
virtual void | enforceUb ()=0 |
| | enforces problem upper bound when exploring an alternative search node
|
| |
| virtual void | increaseLb (Cost addLb)=0 |
| | increases problem lower bound thanks to eg soft local consistencies More...
|
| |
| virtual void | decreaseLb (Cost shift)=0 |
| | shift problem optimum toward negative costs More...
|
| |
|
virtual Cost | getNegativeLb () const =0 |
| | gets constant term used to subtract to the problem optimum when printing the solutions
|
| |
| virtual Cost | finiteUb () const =0 |
| | computes the worst-case assignment finite cost (sum of maximum finite cost over all cost functions plus one) More...
|
| |
| virtual void | setInfiniteCost ()=0 |
| | updates infinite costs in all cost functions accordingly to the problem global lower and upper bounds More...
|
| |
|
virtual bool | enumerated (int varIndex) const =0 |
| | true if the variable has an enumerated domain
|
| |
| virtual string | getName (int varIndex) const =0 |
| |
|
virtual unsigned int | getVarIndex (const string &s) const =0 |
| | return variable index from its name, or numberOfVariables() if not found
|
| |
|
virtual Value | getInf (int varIndex) const =0 |
| | minimum current domain value
|
| |
|
virtual Value | getSup (int varIndex) const =0 |
| | maximum current domain value
|
| |
| virtual Value | getValue (int varIndex) const =0 |
| | current assigned value More...
|
| |
|
virtual unsigned int | getDomainSize (int varIndex) const =0 |
| | current domain size
|
| |
|
virtual vector< Value > | getEnumDomain (int varIndex)=0 |
| | gets current domain values in an array
|
| |
| virtual bool | getEnumDomain (int varIndex, Value *array)=0 |
| |
|
virtual vector< pair< Value, Cost > > | getEnumDomainAndCost (int varIndex)=0 |
| | gets current domain values and unary costs in an array
|
| |
| virtual bool | getEnumDomainAndCost (int varIndex, ValueCost *array)=0 |
| |
|
virtual unsigned int | getDomainInitSize (int varIndex) const =0 |
| | gets initial domain size (warning! assumes EnumeratedVariable)
|
| |
|
virtual Value | toValue (int varIndex, unsigned int idx)=0 |
| | gets value from index (warning! assumes EnumeratedVariable)
|
| |
|
virtual unsigned int | toIndex (int varIndex, Value value)=0 |
| | gets index from value (warning! assumes EnumeratedVariable)
|
| |
|
virtual unsigned int | toIndex (int varIndex, const string &valueName)=0 |
| | gets index from value name (warning! assumes EnumeratedVariable with value names)
|
| |
|
virtual int | getDACOrder (int varIndex) const =0 |
| | index of the variable in the DAC variable ordering
|
| |
|
virtual Value | nextValue (int varIndex, Value v) const =0 |
| | first value after v in the current domain or v if there is no value
|
| |
|
virtual void | increase (int varIndex, Value newInf)=0 |
| | changes domain lower bound
|
| |
|
virtual void | decrease (int varIndex, Value newSup)=0 |
| | changes domain upper bound
|
| |
|
virtual void | assign (int varIndex, Value newValue)=0 |
| | assigns a variable and immediately propagates this assignment
|
| |
|
virtual void | remove (int varIndex, Value remValue)=0 |
| | removes a domain value (valid if done for an enumerated variable or on its domain bounds)
|
| |
| virtual void | assignLS (vector< int > &varIndexes, vector< Value > &newValues, bool force=false)=0 |
| | assigns a set of variables at once and propagates (used by Local Search methods such as Large Neighborhood Search) More...
|
| |
|
virtual Cost | getUnaryCost (int varIndex, Value v) const =0 |
| | unary cost associated to a domain value
|
| |
|
virtual Cost | getMaxUnaryCost (int varIndex) const =0 |
| | maximum unary cost in the domain
|
| |
|
virtual Value | getMaxUnaryCostValue (int varIndex) const =0 |
| | a value having the maximum unary cost in the domain
|
| |
|
virtual Value | getSupport (int varIndex) const =0 |
| | NC/EAC unary support value.
|
| |
|
virtual Value | getBestValue (int varIndex) const =0 |
| | hint for some value ordering heuristics (only used by RDS)
|
| |
|
virtual void | setBestValue (int varIndex, Value v)=0 |
| | hint for some value ordering heuristics (only used by RDS)
|
| |
|
virtual bool | getIsPartOfOptimalSolution ()=0 |
| | special flag used for debugging purposes only
|
| |
|
virtual void | setIsPartOfOptimalSolution (bool v)=0 |
| | special flag used for debugging purposes only
|
| |
|
virtual int | getDegree (int varIndex) const =0 |
| | approximate degree of a variable (ie number of active cost functions, see Variable elimination)
|
| |
|
virtual int | getTrueDegree (int varIndex) const =0 |
| | degree of a variable
|
| |
|
virtual Long | getWeightedDegree (int varIndex) const =0 |
| | weighted degree heuristic
|
| |
|
virtual void | resetWeightedDegree (int varIndex)=0 |
| | initialize weighted degree heuristic
|
| |
|
virtual void | preprocessing ()=0 |
| | applies various preprocessing techniques to simplify the current problem
|
| |
| virtual void | sortConstraints ()=0 |
| | sorts the list of cost functions associated to each variable based on smallest problem variable indexes More...
|
| |
|
virtual void | whenContradiction ()=0 |
| | after a contradiction, resets propagation queues
|
| |
|
virtual void | propagate ()=0 |
| | propagates until a fix point is reached (or throws a contradiction)
|
| |
|
virtual bool | verify ()=0 |
| | checks the propagation fix point is reached
|
| |
|
virtual unsigned int | numberOfVariables () const =0 |
| | number of created variables
|
| |
|
virtual unsigned int | numberOfUnassignedVariables () const =0 |
| | current number of unassigned variables
|
| |
|
virtual unsigned int | numberOfConstraints () const =0 |
| | initial number of cost functions (before variable elimination)
|
| |
|
virtual unsigned int | numberOfConnectedConstraints () const =0 |
| | current number of cost functions
|
| |
|
virtual unsigned int | numberOfConnectedBinaryConstraints () const =0 |
| | current number of binary cost functions
|
| |
|
virtual unsigned int | medianDomainSize () const =0 |
| | median current domain size of variables
|
| |
|
virtual unsigned int | medianDegree () const =0 |
| | median current degree of variables
|
| |
|
virtual unsigned int | medianArity () const =0 |
| | median arity of current cost functions
|
| |
|
virtual int | getMaxDomainSize () const =0 |
| | maximum initial domain size found in all variables
|
| |
|
virtual int | getMaxCurrentDomainSize () const =0 |
| | maximum current domain size found in all variables
|
| |
|
virtual unsigned int | getDomainSizeSum () const =0 |
| | total sum of current domain sizes
|
| |
| virtual void | cartProd (BigInteger &cartesianProduct)=0 |
| | Cartesian product of current domain sizes. More...
|
| |
|
virtual Long | getNbDEE () const =0 |
| | number of value removals due to dead-end elimination
|
| |
|
virtual int | makeEnumeratedVariable (string n, Value iinf, Value isup)=0 |
| | create an enumerated variable with its domain bounds
|
| |
|
virtual int | makeEnumeratedVariable (string n, Value *d, int dsize)=0 |
| | create an enumerated variable with its domain values
|
| |
| virtual void | addValueName (int xIndex, const string &valuename)=0 |
| | add next value name More...
|
| |
|
virtual int | makeIntervalVariable (string n, Value iinf, Value isup)=0 |
| | create an interval variable with its domain bounds
|
| |
| virtual void | postUnary (int xIndex, vector< Cost > &costs)=0 |
| |
| virtual int | postNaryConstraintBegin (int *scope, int arity, Cost defval, Long nbtuples=0, bool forcenary=false)=0 |
| |
| virtual void | postNaryConstraintTuple (int ctrindex, vector< Value > &tuple, Cost cost)=0 |
| |
| virtual void | postNaryConstraintEnd (int ctrindex)=0 |
| |
| virtual int | postUnary (int xIndex, Value *d, int dsize, Cost penalty)=0 |
| |
| virtual int | postKnapsackConstraint (vector< int > &scope, const string &arguments)=0 |
| |
| virtual int | postGlobalConstraint (int *scopeIndex, int arity, const string &gcname, istream &file, int *constrcounter=NULL, bool mult=true)=0 |
| |
| virtual int | postWAmong (vector< int > &scope, const string &semantics, const string &propagator, Cost baseCost, const vector< Value > &values, int lb, int ub)=0 |
| | post a soft among cost function More...
|
| |
| virtual int | postWAmong (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost, const vector< Value > &values, int lb, int ub)=0 |
| |
| virtual void | postWAmong (int *scopeIndex, int arity, string semantics, Cost baseCost, Value *values, int nbValues, int lb, int ub)=0 |
| |
|
virtual void | postWVarAmong (vector< int > &scope, const string &semantics, Cost baseCost, vector< Value > &values, int varIndex)=0 |
| | post a weighted among cost function with the number of values encoded as a variable with index varIndex (network-based propagator only)
|
| |
| virtual void | postWVarAmong (int *scopeIndex, int arity, const string &semantics, Cost baseCost, Value *values, int nbValues, int varIndex)=0 |
| |
| virtual int | postWRegular (vector< int > &scope, const string &semantics, const string &propagator, Cost baseCost, int nbStates, const vector< WeightedObjInt > &initial_States, const vector< WeightedObjInt > &accepting_States, const vector< DFATransition > &Wtransitions)=0 |
| | post a soft or weighted regular cost function More...
|
| |
| virtual int | postWRegular (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost, int nbStates, const vector< WeightedObjInt > &initial_States, const vector< WeightedObjInt > &accepting_States, const vector< DFATransition > &Wtransitions)=0 |
| |
| virtual void | postWRegular (int *scopeIndex, int arity, int nbStates, vector< pair< int, Cost >> initial_States, vector< pair< int, Cost >> accepting_States, int **Wtransitions, vector< Cost > transitionsCosts)=0 |
| |
| virtual int | postWAllDiff (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost)=0 |
| | post a soft alldifferent cost function More...
|
| |
| virtual void | postWAllDiff (int *scopeIndex, int arity, string semantics, Cost baseCost)=0 |
| |
| virtual int | postWGcc (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost, const vector< BoundedObjValue > &values)=0 |
| | post a soft global cardinality cost function More...
|
| |
| virtual void | postWGcc (int *scopeIndex, int arity, string semantics, Cost baseCost, Value *values, int nbValues, int *lb, int *ub)=0 |
| |
| virtual int | postWSame (int *scopeIndexG1, int arityG1, int *scopeIndexG2, int arityG2, const string &semantics, const string &propagator, Cost baseCost)=0 |
| | post a soft same cost function (a group of variables being a permutation of another group with the same size) More...
|
| |
| virtual void | postWSame (int *scopeIndex, int arity, string semantics, Cost baseCost)=0 |
| |
|
virtual void | postWSameGcc (int *scopeIndex, int arity, string semantics, Cost baseCost, Value *values, int nbValues, int *lb, int *ub)=0 |
| | post a combination of a same and gcc cost function decomposed as a cost function network
|
| |
| virtual int | postWGrammarCNF (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost, int nbSymbols, int startSymbol, const vector< CFGProductionRule > WRuleToTerminal)=0 |
| | post a soft/weighted grammar cost function with the dynamic programming propagator and grammar in Chomsky normal form More...
|
| |
| virtual int | postMST (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost)=0 |
| | post a Spanning Tree hard constraint More...
|
| |
| virtual int | postMaxWeight (int *scopeIndex, int arity, const string &semantics, const string &propagator, Cost baseCost, const vector< WeightedVarValPair > weightFunction)=0 |
| | post a weighted max cost function (maximum cost of a set of unary cost functions associated to a set of variables) More...
|
| |
| virtual void | postWSum (int *scopeIndex, int arity, string semantics, Cost baseCost, string comparator, int rightRes)=0 |
| | post a soft linear constraint with unit coefficients More...
|
| |
|
virtual void | postWVarSum (int *scopeIndex, int arity, string semantics, Cost baseCost, string comparator, int varIndex)=0 |
| | post a soft linear constraint with unit coefficients and variable right-hand side
|
| |
| virtual void | postWOverlap (int *scopeIndex, int arity, string semantics, Cost baseCost, string comparator, int rightRes)=0 |
| | post a soft overlap cost function (a group of variables being point-wise equivalent – and not equal to zero – to another group with the same size) More...
|
| |
|
virtual vector< vector< int > > * | getListSuccessors ()=0 |
| | generating additional variables vector created when berge decomposition are included in the WCSP
|
| |
|
virtual bool | isGlobal ()=0 |
| | true if there are soft global constraints defined in the problem
|
| |
|
virtual Cost | read_wcsp (const char *fileName)=0 |
| | load problem in all format supported by toulbar2. Returns the UB known to the solver before solving (file and command line).
|
| |
|
virtual void | read_legacy (const char *fileName)=0 |
| | load problem in wcsp legacy format
|
| |
| virtual void | read_uai2008 (const char *fileName)=0 |
| | load problem in UAI 2008 format (see http://graphmod.ics.uci.edu/uai08/FileFormat and http://www.cs.huji.ac.il/project/UAI10/fileFormat.php) More...
|
| |
|
virtual void | read_random (int n, int m, vector< int > &p, int seed, bool forceSubModular=false, string globalname="")=0 |
| | create a random WCSP with n variables, domain size m, array p where the first element is a percentage of tuples with a nonzero cost and next elements are the number of random cost functions for each different arity (starting with arity two), random seed, a flag to have a percentage (last element in the array p) of the binary cost functions being permutated submodular, and a string to use a specific global cost function instead of random cost functions in extension
|
| |
|
virtual void | read_wcnf (const char *fileName)=0 |
| | load problem in (w)cnf format (see http://www.maxsat.udl.cat/08/index.php?disp=requirements)
|
| |
|
virtual void | read_qpbo (const char *fileName)=0 |
| | load quadratic pseudo-Boolean optimization problem in unconstrained quadratic programming text format (first text line with n, number of variables and m, number of triplets, followed by the m triplets (x,y,cost) describing the sparse symmetric nXn cost matrix with variable indexes such that x <= y and any positive or negative real numbers for costs)
|
| |
|
virtual void | read_opb (const char *fileName)=0 |
| | load pseudo-Boolean optimization problem
|
| |
|
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 |
| | returns current best solution cost or MAX_COST if no solution found
|
| |
|
virtual Cost | getSolutionCost () const =0 |
| | returns current best solution cost or MAX_COST if no solution found
|
| |
| virtual const vector< Value > | getSolution (Cost *cost_ptr)=0 |
| | returns current best solution and its cost More...
|
| |
| virtual void | initSolutionCost ()=0 |
| | returns all solutions found More...
|
| |
|
virtual void | setSolution (Cost cost, TAssign *sol=NULL)=0 |
| | set best solution from current assigned values or from a given assignment (for BTD-like methods)
|
| |
|
virtual void | printSolution ()=0 |
| | prints current best solution on standard output (using variable and value names if cfn format and ToulBar2::showSolution>1)
|
| |
|
virtual void | printSolution (ostream &os)=0 |
| | prints current best solution (using variable and value names if cfn format and ToulBar2::writeSolution>1)
|
| |
|
virtual void | printSolution (FILE *f)=0 |
| | prints current best solution (using variable and value names if cfn format and ToulBar2::writeSolution>1)
|
| |
|
virtual void | print (ostream &os)=0 |
| | print current domains and active cost functions (see Output messages, verbosity options and debugging)
|
| |
| virtual void | dump (ostream &os, bool original=true)=0 |
| | output the current WCSP into a file in wcsp format More...
|
| |
| virtual void | dump_CFN (ostream &os, bool original=true)=0 |
| | output the current WCSP into a file in wcsp format More...
|
| |
|
virtual const vector< Variable * > & | getDivVariables ()=0 |
| | returns all variables on which a diversity request exists
|
| |