|
@@ -69,7 +69,9 @@ static DoubleOption opt_lastflipRatio(_cat,"initFlipRatio","initial & now steps
|
|
|
static DoubleOption opt_timeRatio (_cat,"timeRatio","cnnrTime / totalTime", 0.35, DoubleRange(0, true, 1.5, true));
|
|
static DoubleOption opt_timeRatio (_cat,"timeRatio","cnnrTime / totalTime", 0.35, DoubleRange(0, true, 1.5, true));
|
|
|
static DoubleOption opt_raiseFlipRatio(_cat,"raiseFlipRatio","lastflipRatio*=raiseFlipRatio every time call cnnr", 1.02, DoubleRange(1, true, 5, true));
|
|
static DoubleOption opt_raiseFlipRatio(_cat,"raiseFlipRatio","lastflipRatio*=raiseFlipRatio every time call cnnr", 1.02, DoubleRange(1, true, 5, true));
|
|
|
static DoubleOption opt_switchMode(_cat,"switchMode","time to switch to VSIDS", 2500, DoubleRange(0, true, 6000, true));
|
|
static DoubleOption opt_switchMode(_cat,"switchMode","time to switch to VSIDS", 2500, DoubleRange(0, true, 6000, true));
|
|
|
-
|
|
|
|
|
|
|
+static BoolOption opt_aspiration(_cat,"aspiration","if turn on aspiration",true);
|
|
|
|
|
+static DoubleOption opt_swt_threshold(_cat,"threshold","_swt_threshold in cnnr",50,DoubleRange(0,true,400,true));
|
|
|
|
|
+static DoubleOption opt_swt_q(_cat,"swt_q","_swt_q in cnnr",0.7,DoubleRange(0,true,1,true));
|
|
|
//==============
|
|
//==============
|
|
|
|
|
|
|
|
|
|
|
|
@@ -168,6 +170,10 @@ Solver::Solver() :
|
|
|
, solvedByUncom (false)
|
|
, solvedByUncom (false)
|
|
|
, forceRestart (false)
|
|
, forceRestart (false)
|
|
|
, lastLearntNum (0)
|
|
, lastLearntNum (0)
|
|
|
|
|
+ , aspiration (opt_aspiration)
|
|
|
|
|
+ , swt_q (opt_swt_q)
|
|
|
|
|
+ , swt_threshold (opt_swt_threshold)
|
|
|
|
|
+
|
|
|
//=============================
|
|
//=============================
|
|
|
{
|
|
{
|
|
|
//--------------------------------
|
|
//--------------------------------
|
|
@@ -2239,7 +2245,8 @@ lbool Solver::solve_()
|
|
|
//printf("c | Conflicts | ORIGINAL | LEARNT | Progress |\n");
|
|
//printf("c | Conflicts | ORIGINAL | LEARNT | Progress |\n");
|
|
|
//printf("c | | Vars Clauses Literals | Limit Clauses Lit/Cl | |\n");
|
|
//printf("c | | Vars Clauses Literals | Limit Clauses Lit/Cl | |\n");
|
|
|
printf("c areaRatio:%lf conflRatio:%lf timeRatio:%lf\n",areaRatio,conflRatio,timeRatio);
|
|
printf("c areaRatio:%lf conflRatio:%lf timeRatio:%lf\n",areaRatio,conflRatio,timeRatio);
|
|
|
- printf("c maxFlipRatio:%lf initFlipRatio:%lf raiseFlipRatio:%lf\t \n",maxflipRatio,lastflipRatio,raiseFlipRatio);
|
|
|
|
|
|
|
+ printf("c maxFlipRatio:%lf initFlipRatio:%lf raiseFlipRatio:%lf\n",maxflipRatio,lastflipRatio,raiseFlipRatio);
|
|
|
|
|
+ printf("c aspiration:%s swt_q:%lf swt_threshold:%lf \n",(aspiration?"true":"false"),swt_q,swt_threshold);
|
|
|
printf("c -------------------------------------------------------------------------------\n");
|
|
printf("c -------------------------------------------------------------------------------\n");
|
|
|
printf("c call|nRestart|trueRatio|expect|LastLearnts|Learnts|ccnrTime |totalTime | end\n");
|
|
printf("c call|nRestart|trueRatio|expect|LastLearnts|Learnts|ccnrTime |totalTime | end\n");
|
|
|
printf("c ===============================================================================\n");
|
|
printf("c ===============================================================================\n");
|
|
@@ -2506,9 +2513,14 @@ bool Solver::callUnCom(){
|
|
|
bool Solver::callUnCom(){
|
|
bool Solver::callUnCom(){
|
|
|
|
|
|
|
|
ls_solver ccnr;
|
|
ls_solver ccnr;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
int ret = build_instance(ccnr);
|
|
int ret = build_instance(ccnr);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ ccnr.aspiration = this->aspiration;
|
|
|
|
|
+ ccnr._swt_q = this->swt_q;
|
|
|
|
|
+ ccnr._swt_threshold = this->swt_threshold;
|
|
|
|
|
+
|
|
|
if (!ret) { printf("c init fail\n");return 1;}
|
|
if (!ret) { printf("c init fail\n");return 1;}
|
|
|
|
|
|
|
|
if(timeRatio <= 1){
|
|
if(timeRatio <= 1){
|