## toulbar2## An exact solver for cost function networks |

The available file formats are:

- Weighted Constraint Satisfaction Problem (.wcsp file extension)
- Probabilistic Graphical Model (.uai/.LG file extension)
- Weigthed Partial Max-SAT (.cnf/.wcnf file extension)
- Quadratic Pseudo-Boolean Optimization (.qpbo file extension)

- Random binary cost function network example.wcsp
- Latin square 4x4 with random costs on each variable latin4.wcsp
- Radio link frequency assignment CELAR instance scen06.wcsp
- Earth observation satellite management SPOT5 instance 404.wcsp, 505.wcsp
- Linkage analysis instance pedigree9.uai
- Computer vision superpixel-based image segmentation instance GeomSurf-7-gm256.uai
- Protein folding instance 1CM1.uai
- Max-clique DIMACS instance brock200_4.clq.wcnf
- Graph 6-coloring instance GEOM40_6.wcsp

Many more instances available here and there.

List of optional arguments (use symbol ":" after an option to remove a default option):

- -help : shows this help message
- -ub=[integer] : initial problem upperbound (default value is 512409557603043100)
- -v=[integer] : verbosity level
- -s : shows each solution found
- -w=[filename] : writes last solution found in filename (or "sol" if no parameter is given)
- -precision=[integer] : probability/real precision is a conversion factor (a power of ten) for representing fixed point numbers (default value is 7)
- -timer=[integer] : CPU time limit in seconds
- -var=[integer] : searches by branching only on the first -the given value- decision variables, assuming the remaining variables are intermediate variables completely assigned by the decision variables (use a zero if all variables are decision variables) (default value is 0)
- -b : searches using binary branching always instead of binary branching for interval domains and n-ary branching for enumerated domains (default option)
- -svo : searches using a static variable ordering heuristic (same order as DAC)
- -c : searches using binary branching with last conflict backjumping variable ordering heuristic (default option)
- -q=[integer] : weighted degree variable ordering heuristic if the number of cost functions is less than the given value (default value is 10000)
- -m=[integer] : variable ordering heuristic based on mean (m=1) or median (m=2) costs (in conjunction with weighted degree heuristic -q) (default value is 0)
- -d=[integer] : searches using dichotomic branching (d=1 splitting in the middle of domain range, d=2 splitting in the middle of sorted unary costs) instead of binary branching when current domain size is strictly greater than 10 (default value is 1)
- -sortd : sorts domains based on increasing unary costs (warning! works only for binary WCSPs)
- -e=[integer] : boosting search with variable elimination of small degree (less than or equal to 3) (default value is 3)
- -p=[integer] : preprocessing only: general variable elimination of degree less than or equal to the given value (default value is -1)
- -t=[integer] : preprocessing only: simulates restricted path consistency by adding ternary cost functions on triangles of binary cost functions within a given maximum space limit (in MB)
- -f=[integer] : preprocessing only: variable elimination of functional (f=1) (resp. bijective (f=2)) variables (default value is 1)
- -dec : preprocessing only: pairwise decomposition of cost functions with arity >=3 into smaller arity cost functions (default option)
- -n=[integer] : preprocessing only: projects n-ary cost functions on all binary cost functions if n is lower than the given value (default value is 10)
- -mst : maximum spanning tree DAC ordering
- -nopre : removes all preprocessing options (equivalent to -e: -p: -t: -f: -dec: -n: -mst: -dee:)
- -o : ensures optimal worst-case time complexity of DAC and EAC (can be slower in practice)
- -k=[integer] : soft local consistency level (NC with Strong NIC for global cost functions=0, (G)AC=1, D(G)AC=2, FD(G)AC=3, (weak) ED(G)AC=4) (default value is 4)
- -dee=[integer] : restricted dead-end elimination (value pruning by dominance rule from EAC value (dee>=1 and dee<=3)) and soft neighborhood substitutability (in preprocessing (dee=2 or dee=4) or during search (dee=3)) (default value is 1)
- -l=[integer] : limited discrepancy search, use a negative value to stop the search after the given absolute number of discrepancies has been explored (discrepancy bound = 4 by default)
- -L=[integer] : randomized (quasi-random variable ordering) search with restart (maximum number of nodes = 10000 by default)
- -i=["string"] : initial upperbound found by INCOP local search solver, string parameter is optional, using "0 1 3 idwa 100000 cv v 0 200 1 0 0" by default with the following meaning: stoppinglowerbound randomseed nbiterations method nbmoves neighborhoodchoice neighborhoodchoice2 minnbneighbors maxnbneighbors neighborhoodchoice3 autotuning tracemode
- -z=[filename] : saves problem in wcsp format in filename (or "problem.wcsp" if no parameter is given), writes also the graphviz dot file and the degree distribution of the input problem
- -z=[integer] : 1: saves original instance (by default), 2: saves after preprocessing
- -Z=[integer] : debug mode (save problem at each node if verbosity option -v=num >= 1 and -Z=num >=3)
- -opt filename.sol : checks a given optimal solution (given as input filename with ".sol" extension) is never pruned by propagation (works only if compiled with debug)
- -x=[(,i=a)*] : assigns variable of index i to value a (multiple assignments are separated by a comma and no space) (without any argument, a complete assignment -- used as initial upper bound and as value heuristic -- read from default file "sol" or given as input filename with ".sol" extension)
- -M=[integer] : preprocessing only: Min Sum Diffusion algorithm (default number of iterations is 0)
- -A=[integer] : enforces VAC at each search node with a search depth less than a given value (default value is 0)
- -T=[integer] : threshold cost value for VAC (default value is 1)
- -P=[integer] : threshold cost value for VAC during the preprocessing phase (default value is 1)
- -C=[float] : multiplies all costs by this number when loading the problem (default value is 1)
- -S : preprocessing only: performs singleton consistency (only in conjunction with option "-A")
- -V : VAC-based value ordering heuristic
- -B=[integer] : (0) DFBB, (1) BTD, (2) RDS-BTD, (3) RDS-BTD with path decomposition instead of tree decomposition (default value is 0)
- -O=[filename] : reads a variable elimination order from a file in order to build a tree decomposition (if BTD-like and/or variable elimination methods are used) and also a compatible DAC ordering
- -O=[negative integer] : build a tree decomposition (if BTD-like and/or variable elimination methods are used) and also a compatible DAC ordering using (-1) maximum cardinality search ordering, (-2) minimum degree ordering, (-3) minimum fill-in ordering, (-4) maximum spanning tree ordering (see -mst), (-5) reverse Cuthill-Mckee ordering, (-6) approximate minimum degree ordering (if not specified, then use the variable order in which variables appear in the problem file)
- -j=[integer] : splits large clusters into a chain of smaller embedded clusters with a number of proper variables less than this number (use options "-B=3 -j=1 -svo -k=1" for pure RDS, use value 0 for no splitting) (default value is 0)
- -r=[integer] : limit on maximum cluster separator size (merge cluster with its father otherwise, use a negative value for no limit) (default value is -1)
- -X=[integer] : limit on minimum number of proper variables in a cluster (merge cluster with its father otherwise, use a zero for no limit) (default value is 0)
- -E : merges leaf clusters with their fathers if small local treewidth (in conjunction with option "-e")
- -R=[integer] : choice for a specific root cluster number
- -I=[integer] : choice for solving only a particular rooted cluster subtree (with RDS-BTD only)
- -a=[integer] : finds at most a given number of solutions with a cost strictly lower than the initial upper bound and stops, or if no integer is given, finds all solutions (or counts the number of zero-cost satisfiable solutions in conjunction with BTD)
- -D : approximate satisfiable solution count with BTD
- -logz : computes log of probability of evidence (i.e. log partition function or log(Z) or PR task) for graphical models only (problem file extension .uai)
- -epsilon=[float] : approximation factor for computing the partition function (default value is 1000)
- -hbfs=[integer] : hybrid best-first search, restarting from the root after a given number of backtracks (default value is 10000)
- -open=[integer] : hybrid best-first search limit on the number of open nodes (default value is -1)
- -seed=[integer] : random seed value (default value is 1)