Commit 36235b13 authored by Simon de Givry's avatar Simon de Givry Committed by Thomas Schiex
Browse files

[error] TRW-S was not compatible with VNS ; do not perform solution based...

[error] TRW-S was not compatible with VNS ; do not perform solution based phase saving with LDS ; TRW-S is deactivated by default
parent a7766cf6
......@@ -93,9 +93,9 @@ echo -n "\\item "
echo "Solve another WCSP using the original Russian Doll Search method~\\cite{Verfaillie96} with static variable"
echo "ordering (following problem file) and soft arc consistency:"
echo "\\begin{DoxyCode}"
echo " toulbar2 EXAMPLES/505.wcsp -B=3 -j=1 -svo -k=1 -trws:"
echo " toulbar2 EXAMPLES/505.wcsp -B=3 -j=1 -svo -k=1"
echo "\\end{DoxyCode}"
echo "{\\scriptsize" ; echo "\\begin{DoxyCode}" ; toulbar2 EXAMPLES/505.wcsp -B=3 -j=1 -svo -k=1 -trws: | awk '/^Read /{ok=1} /Solving cluster subtree 3 /{ok=1} ok{print $0} /Solving cluster subtree 2 /{ok=0;print "";print "...";print ""}'
echo "{\\scriptsize" ; echo "\\begin{DoxyCode}" ; toulbar2 EXAMPLES/505.wcsp -B=3 -j=1 -svo -k=1 | awk '/^Read /{ok=1} /Solving cluster subtree 3 /{ok=1} ok{print $0} /Solving cluster subtree 2 /{ok=0;print "";print "...";print ""}'
echo "\\end{DoxyCode}}"
echo -n "\\item "
......@@ -109,7 +109,7 @@ echo "\\end{DoxyCode}}"
echo -n "\\item "
#echo "________________________________________________________________________________"
echo "Download file {\\em example.dec}. Solve a WCSP using a variable neighborhood search algorithm (UDGVNS) with a given cluster decomposition:"
echo "Download a cluster decomposition file {\\em example.dec} (each line corresponds to a cluster of variables, clusters may overlap). Solve a WCSP using a variable neighborhood search algorithm (UDGVNS) with a given cluster decomposition:"
echo "\\begin{DoxyCode}"
echo " toulbar2 EXAMPLES/example.wcsp EXAMPLES/example.dec -vns"
echo "\\end{DoxyCode}"
......
This diff is collapsed.
No preview for this file type
// Cmake generated version
#define Toulbar_VERSION "1.0.0-120-g4b4e357-master-tainted (1540827368)"
#define Toulbar_VERSION "1.0.0-121-g4a5cff9-master-tainted (1540891863)"
......@@ -290,7 +290,7 @@ void tb2init()
ToulBar2::costThresholdPreS = "";
ToulBar2::costThreshold = UNIT_COST;
ToulBar2::costThresholdPre = UNIT_COST;
ToulBar2::trwsAccuracy = 0.001;
ToulBar2::trwsAccuracy = -1; // 0.001;
ToulBar2::trwsOrder = false;
ToulBar2::trwsNIter = 1000;
ToulBar2::trwsNIterNoChange = 5;
......@@ -447,6 +447,10 @@ void tb2checkOptions(Cost ub)
// cout << "Warning! Hybrid best-first search not compatible with Limited Discrepancy Search." << endl;
ToulBar2::hbfs = 0;
}
if (ToulBar2::lds && ToulBar2::solutionBasedPhaseSaving) {
// cout << "Warning! Solution based phase saving is not recommended with Limited Discrepancy Search." << endl;
ToulBar2::solutionBasedPhaseSaving = false;
}
if (ToulBar2::hbfs && ToulBar2::btdMode >= 2) {
cout << "Warning! Hybrid best-first search not compatible with RDS-like search methods." << endl;
ToulBar2::hbfs = 0;
......@@ -2820,7 +2824,7 @@ void WCSP::propagateTRWS()
Store::store();
assignLS(bestPrimalVar, bestPrimalVal);
assert(numberOfUnassignedVariables() == 0);
((Solver *) getSolver())->newSolution();
((Solver *) getSolver())->Solver::newSolution();
bestUb = min<Cost>(getUb(), bestUb);
} catch (Contradiction) {
whenContradiction();
......
......@@ -1858,10 +1858,10 @@ void Solver::endSolve(bool isSolution, Cost cost, bool isComplete)
}
if (ToulBar2::allSolutions) {
if (ToulBar2::approximateCountingBTD)
cout << "Number of solutions : ~= " << nbSol << endl;
cout << "Number of solutions : ~= " << std::fixed << std::setprecision(0) << nbSol << std::setprecision(DECIMAL_POINT) << endl;
else {
if (!isComplete)
cout << "Number of solutions : >= " << nbSol << endl;
cout << "Number of solutions : >= " << std::fixed << std::setprecision(0) << nbSol << std::setprecision(DECIMAL_POINT) << endl;
else
cout << "Number of solutions : = " << std::fixed << std::setprecision(0) << nbSol << std::setprecision(DECIMAL_POINT) << endl;
}
......@@ -1940,13 +1940,13 @@ void Solver::approximate(BigInteger& nbsol, TreeDecomposition* td)
if (nbsol < 1)
nbsol = 1;
// the minimum upper bound of solutions number
cout << "\nCartesian product \t\t : " << cartesianProduct << endl;
cout << "\nCartesian product \t\t : " << std::fixed << std::setprecision(0) << cartesianProduct << std::setprecision(DECIMAL_POINT) << endl;
BigInteger minUBsol = cartesianProduct;
for (map<int, BigInteger>::iterator it = ubSol.begin(); it != ubSol.end(); ++it) {
if (it->second < minUBsol)
minUBsol = it->second;
}
cout << "Upper bound of number of solutions : <= " << minUBsol << endl;
cout << "Upper bound of number of solutions : <= " << std::fixed << std::setprecision(0) << minUBsol << std::setprecision(DECIMAL_POINT) << endl;
}
// Maximize h' W h where W is expressed by all its
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment