-
Notifications
You must be signed in to change notification settings - Fork 11
/
reports.c
854 lines (631 loc) · 29.7 KB
/
reports.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
/*
## ## ##### ##### $$$$$ $$$$ $$$$$$
## ## ## ## ## $$ $$ $$ $$
## ## ##### ## $$$$ $$$$$$ $$
## ## ## ## ## $$ $$ $$ $$
#### ##### ##### $$$$$ $$ $$ $$
======================================================
SLS SAT Solver from The University of British Columbia
======================================================
...Developed by Dave Tompkins (davet [@] cs.ubc.ca)...
------------------------------------------------------
.......consult legal.txt for legal information........
......consult revisions.txt for revision history......
------------------------------------------------------
... project website: http://www.satlib.org/ubcsat ....
------------------------------------------------------
.....e-mail ubcsat-help [@] cs.ubc.ca for support.....
------------------------------------------------------
*/
#include "ubcsat.h"
REPORT *pRepHelp;
REPORT *pRepErr;
REPORT *pRepOut;
REPORT *pRepRTD;
REPORT *pRepStats;
REPORT *pRepState;
REPORT *pRepModel;
REPORT *pRepSolution;
REPORT *pRepUniqueSol;
REPORT *pRepBestSol;
REPORT *pRepBestStep;
REPORT *pRepTrajBestLM;
REPORT *pRepOptClauses;
REPORT *pRepFalseHist;
REPORT *pRepDistance;
REPORT *pRepDistHist;
REPORT *pRepCNFStats;
REPORT *pRepFlipCounts;
REPORT *pRepBiasCounts;
REPORT *pRepUnsatCounts;
REPORT *pRepVarLast;
REPORT *pRepClauseLast;
REPORT *pRepSQGrid;
REPORT *pRepPenalty;
REPORT *pRepPenMean;
REPORT *pRepPenStddev;
REPORT *pRepPenCV;
REPORT *pRepMobility;
REPORT *pRepMobFixed;
REPORT *pRepMobFixedFreq;
REPORT *pRepAutoCorr;
REPORT *pRepTriggers;
REPORT *pRepSATComp;
void AddReports() {
pRepOut = CreateReport("out", "Standard Output with Columns","Prints an array of data, with each row representing an independent run~you can customize the report to include a variety of columns","stdout","ReportOut");
AddReportParmString(pRepOut,"Columns to Display (ubcsat -hc for info)","default");
AddReportParmUInt(pRepOut,"Delay: Set to 1 to print after all runs are complete",&bReportOutputSuppress,0);
pRepOut->bActive = TRUE;
pRepStats = CreateReport("stats","Statistics Report","Shows summary statistics from all runs~you can customize the report to include a variety of statistics","stdout","ReportStats");
pRepStats->bActive = TRUE;
AddReportParmString(pRepStats,"Statistics to Display (ubcsat -hs for info)","default");
pRepRTD = CreateReport("rtd","Run-Length and Run-Time Distribution","Similar to (-r out), except results are sorted by search steps,~and include successful runs~you can customize the report to include a variety of columns", "stdout","ReportRTD,SortByStepPerformance");
AddReportParmString(pRepRTD,"Columns to Display (ubcsat -hc for info)","rtd");
pRepModel = CreateReport("model","Solution Model","Prints the solution model found from the last run executed~is turned on automatically with the -solve parameter~output format example is: -1 2 3 -4 ... ~meaning variables (1,4) are true, and variables (2,3) are false","stdout","ReportModelPrint");
pRepCNFStats = CreateReport("cnfstats","Instance Statistics","Provides additional information about the properties of the instance","stdout","ReportCNFStatsPrint");
pRepState = CreateReport("state","State Information Trace","Provides detailed state information for each search step, including:~the solution quality, the variable flipped, and the state of all variables","stdout","ReportStatePrint");
AddReportParmUInt(pRepState,"Only print when in local minima",&bReportStateLMOnly,0);
AddReportParmFloat(pRepState,"Only print at a specific Solution Quality (all if -1)",&fReportStateQuality,-1.0f);
pRepSolution = CreateReport("solution","Solutions","Prints solutions for every successful run in the format:~1001001101...~where variable 1 is true, 2 is false, 3 is false, etc...","stdout","ReportSolutionPrint");
pRepUniqueSol = CreateReport("uniquesol","Unique Solutions","Prints the same as (-r solution), except only unique solutions (no repeats)","stdout","ReportUniqueSolPrint");
pRepBestSol = CreateReport("bestsol","Best Candidate Solutions","Similar to (-r solution), but includes variable assignments for the~best solution quality encountered when no solution is found","stdout","ReportBestSolPrint");
pRepBestStep = CreateReport("beststep","Steps of Each New Best Solution Quality","Print step information for each new best solution encountered","stdout","ReportBestStepPrint");
AddReportParmUInt(pRepBestStep,"Include the variable assignment for each new best",&bReportBestStepVars,0);
pRepTrajBestLM = CreateReport("tbestlm","Trajectory Best Local Minima","Very similar to (-r beststep), except it ignores best solutions that~are improved upon in the next step","stdout","ReportTrajBestLM");
pRepOptClauses = CreateReport("unsatclauses","Unsatisfied Clauses","Print unsatisfied clauses when the run is complete~mostly useful when -target > 0 -- the format is:~1101111...~where clause 3 was unsatisfied when the run terminated","stdout","ReportUnsatClausesPrint");
AddReportParmUInt(pRepOptClauses,"Only Include runs where -target solution was reached",&bReportOptClausesSol,0);
pRepFalseHist = CreateReport("falsehist","Number of False Clauses Histogram","Prints a count (histogram) that shows the distribution~of the number of false clauses throughout the search","stdout","ReportFalseHistPrint");
AddReportParmUInt(pRepFalseHist,"Only include data from the last N steps",&iReportFalseHistCount,0);
pRepDistance = CreateReport("distance","Hamming Distance Information","Detailed information for each step of the Hamming Distance~to the closest known solution~Note: Requires solution file (-filesol)","stdout","ReportDistancePrint");
AddReportParmUInt(pRepDistance,"Only print when in local minima",&bReportDistanceLMOnly,0);
pRepDistHist = CreateReport("disthist","Hamming Distance Histogram","Prints a count (histogram) that shows the distribution~of the Hamming distance from the solution(s) throughout the search~Note: Requires solution file (-filesol)","stdout","ReportDistHistPrint");
AddReportParmUInt(pRepDistHist,"Only include data from the last N steps",&iReportDistHistCount,0);
pRepFlipCounts = CreateReport("flipcount","Variable Flip Count","Prints the number of times each variable was flipped~restarts are counted in the first column (nullflips)","stdout","ReportFlipCountsPrint");
pRepBiasCounts = CreateReport("biascount","Variable Bias Count","Prints the number of steps each variable was true and false","stdout","ReportBiasCountsPrint");
pRepUnsatCounts = CreateReport("unsatcount","Clause Unsatisfied Count","Prints the number of steps that each clause was unsatisfied","stdout","ReportUnsatCountsPrint");
pRepVarLast = CreateReport("varlastflip","Step of Last Variable Flip","Prints the step of the last time each variable was flipped","stdout","ReportVarLastPrint");
pRepClauseLast = CreateReport("clauselast","Step of Last Clause Unsatisfied","Prints the last step each clause was unsatisfied","stdout","ReportClauseLastPrint");
pRepSQGrid = CreateReport("sqgrid","Solution Quality Grid","Prints the solution quality at key step values","stdout","ReportSQGridPrint");
AddReportParmUInt(pRepSQGrid,"# of key step points per decade",&iLogDistStepsPerDecade,10);
pRepPenalty = CreateReport("penalty","Clause Penalties","Prints the Clause penalties (weights) from DLS algorithms (i.e.: SAPS,PAWS)~Note: the renormalize to total overrides renormalize to base","stdout","ReportPenaltyPrint");
AddReportParmUInt(pRepPenalty,"Re-normalise to base so an untouched clause is equal to 1",&bReportPenaltyReNormBase,1);
AddReportParmUInt(pRepPenalty,"Re-normalise to total so sum of all penalties equals 1",&bReportPenaltyReNormFraction,0);
AddReportParmUInt(pRepPenalty,"Print penalties every local min (0=end of run only)",&bReportPenaltyEveryLM,0);
pRepPenMean = CreateReport("penmean","Clause Penalties (Mean)","Mean of clause penalties throughout the run","stdout","ReportPenMeanPrint");
AddReportParmUInt(pRepPenMean,"Re-normalise to base so an untouched clause is equal to 1",&bReportPenaltyReNormBase,1);
AddReportParmUInt(pRepPenMean,"Re-normalise to total so sum of all penalties equals 1",&bReportPenaltyReNormFraction,0);
pRepPenStddev = CreateReport("penstddev","Clause Penalties (Stddev)","StdDev of clause penalties throughout the run","stdout","ReportPenStddevPrint");
AddReportParmUInt(pRepPenStddev,"Re-normalise to base so an untouched clause is equal to 1",&bReportPenaltyReNormBase,1);
AddReportParmUInt(pRepPenStddev,"Re-normalise to total so sum of all penalties equals 1",&bReportPenaltyReNormFraction,0);
pRepPenCV = CreateReport("pencv","Clause Penalties (CV)","CV of clause penalties throughout the run","stdout","ReportPenCVPrint");
AddReportParmUInt(pRepPenCV,"Re-normalise to base so an untouched clause is equal to 1",&bReportPenaltyReNormBase,1);
AddReportParmUInt(pRepPenCV,"Re-normalise to total so sum of all penalties equals 1",&bReportPenaltyReNormFraction,0);
pRepMobility = CreateReport("mobility","Mobility Report","Mean Hamming distances for windows of sizes 1..length~Parameter 2 will normalize output so 1 is maximum value","stdout","ReportMobilityPrint");
AddReportParmUInt(pRepMobility,"Largest mobility window length to display [default = n]",&iReportMobilityDisplay,0);
AddReportParmUInt(pRepMobility,"Normalize Mobility values: Mobility/min(n,windowsize)",&bReportMobilityNormalized,0);
pRepMobFixed = CreateReport("mobfixed","Mobility For a Fixed Window Size","Provides step-by-step Mobility data for a fixed window size~1st parameter sets the size of the window,~2nd parameter includes or ignores(default) the first 1..size steps~both parameters affect column results (mobx, mobxcv, etc.)~to set parameters without running report, use~-r mobfixed null INT BOOL","stdout","ReportMobFixedPrint");
AddReportParmUInt(pRepMobFixed,"Mobility window size [default = n]",&iMobFixedWindow,0);
AddReportParmUInt(pRepMobFixed,"Include first (1..windowsize) steps",&bMobilityFixedIncludeStart,0);
pRepMobFixedFreq = CreateReport("mobfixedfreq","Mobility Fixed Window Histogram","Mobility frequency counts for a fixed window size~must use the same parameter settings as (-r mobfixed)","stdout","ReportMobFixedFreqPrint");
AddReportParmUInt(pRepMobFixedFreq,"Mobility window size [default = n]",&iMobFixedWindow,0);
AddReportParmUInt(pRepMobFixedFreq,"Include first (1..windowsize) steps ",&bMobilityFixedIncludeStart,0);
pRepAutoCorr = CreateReport("autocorr","Autocorrelation Report","Autocorrelation Length (ACL) and autocorrelation values for lengths 1..max~if the ACL is greater than max, it returns an ACL value of max~parameters affect column (acl) results~to set parameters without running report, use~-r autocorr null INT FL","stdout","ReportAutoCorrPrint");
AddReportParmUInt(pRepAutoCorr,"Maximum window length [default = n]",&iAutoCorrMaxLen,0);
AddReportParmFloat(pRepAutoCorr,"Cutoff Value for finding ACL [default = 1/e]",&fAutoCorrCutoff,0.3678794f);
pRepTriggers = CreateReport("triggers","Trigger Report","Prints Out All Active Triggers","stdout","ReportTriggersPrint");
AddReportParmUInt(pRepTriggers,"Show All Triggers (not just active) [default = 0]",&bReportTriggersAll,0);
pRepSATComp = CreateReport("satcomp","SAT Competition","Prints required output for 2005 SAT Competition (use -solve)","stdout","ReportSatCompetitionPrint");
/***************************************************************************/
AddColumnComposite("default","run,found,best,beststep,steps");
AddColumnComposite("default_w","run,found,best_w,beststep_w,steps");
AddColumnComposite("rtd","prob,steps,timesteps");
AddColumnUInt("run","Run Number",
" ",
" Run",
" No.",
"%5u",
&iRun,"",ColTypeFinal);
AddColumnUInt("found","Target Solution Quality Found? (1 => yes)",
"F",
"N",
"D",
"%1u"
,&bSolutionFound,"",ColTypeFinal);
AddColumnUInt("steps","Total Number of Search Steps",
" Total",
" Search",
" Steps",
"%10u",
&iStep,"",ColTypeFinal);
AddStatCol("steps","Steps","mean+cv+median",TRUE);
AddColumnFloat("time","Time in seconds, measured (not accurate for short runs)",
" CPU Time",
"in seconds",
"(measured)",
"%10.6f",
&fRunTime,"",ColTypeFinal);
AddStatCol("time","MeasuredCPUTime","mean",FALSE);
AddColumnUInt("best","Best (Lowest) # of False Clauses Found",
" Best",
"Sol'n",
"Found",
"%5u",
&iNumFalse,"",ColTypeMin);
AddStatCol("best","BestSolution","mean",FALSE);
AddColumnFloat("best_w","Best Weighted Solution Quality Found",
" Best",
" Solution",
" Quality",
"%12.8f",
&fBestSumFalseW,"",ColTypeMin);
AddStatCol("best_w","BestWeightedSolution","mean",FALSE);
AddColumnUInt("worst","Worst (Highest) # of False Clauses Found",
"Worst",
"Sol'n",
"Found",
"%5u",
&iNumFalse,"",ColTypeMax);
AddStatCol("worst","WorstSolution","mean",FALSE);
AddColumnFloat("worst_w","Worst Weighted Solution Quality Found",
" Worst",
" Solution",
" Quality",
"%12.8f",
&fSumFalseW,"",ColTypeMax);
AddStatCol("worst_w","WorstWeightedSolution","mean",FALSE);
AddColumnUInt("last","Last (on final step) # of False Clauses",
" Last",
"Sol'n",
"Found",
"%5u",
&iNumFalse,"",ColTypeFinal);
AddStatCol("last","LastSolution","mean",FALSE);
AddColumnFloat("last_w","Last (on final step) Weighted Solution Quality",
" Last",
" Solution",
" Quality",
"%12.8f",
&fSumFalseW,"",ColTypeFinal);
AddStatCol("last_w","LastWeightedSolution","mean",FALSE);
AddColumnUInt("start","Start (on first step) # of False Clauses",
"Start",
"Sol'n",
"Found",
"%5u",
&iStartNumFalse,"StartFalse",ColTypeFinal);
AddStatCol("start","StartSolution","mean",FALSE);
AddColumnFloat("start_w","Start (on first step) Weighted Solution Quality",
" Start",
" Solution",
" Quality",
"%12.8f",
&fStartSumFalseW,"StartFalse",ColTypeFinal);
AddStatCol("start_w","StartWeightedSolution","mean",FALSE);
AddColumnUInt("beststep","Step of Best (Lowest) # of False Clauses Found",
" Step",
" of",
" Best",
"%10u",
&iBestStepNumFalse,"BestFalse",ColTypeFinal);
AddStatCol("beststep","BestStep","mean",FALSE);
AddColumnUInt("beststep_w","Step of Best Weighted Solution Quality Found",
" Step",
" of",
" W Best",
"%10u",
&iBestStepSumFalseW,"BestFalse",ColTypeFinal);
AddStatCol("beststep_w","BestWeightedStep","mean",FALSE);
AddColumnFloat("bestavgimpr","Mean Improvement per Step to Best Solution",
" Average",
" Improve.",
" To Best",
"%9.7f",
&fImproveMean,"ImproveMean",ColTypeFinal);
AddStatCol("bestavgimpr","BestAvgImprovement","mean",FALSE);
AddColumnFloat("bestavgimpr_w","Mean Improvement per Step to Best Solution Quality",
" Average",
" Improve.",
"To W Best",
"%9.7f",
&fImproveMeanW,"ImproveMean",ColTypeFinal);
AddStatCol("bestavgimpr_w","BestWeightedAvgImprovement","mean",FALSE);
AddColumnUInt("firstlm","First Local Minimum # of False Clauses",
"False",
"@ 1st",
"L.Min",
"%5u",
&iFirstLM,"FirstLM",ColTypeFinal);
AddStatCol("firstlm","FirstLocalMin","mean",FALSE);
AddColumnFloat("firstlm_w","First Weighted Local Minimum Solution Quality",
" Solution",
" Quality",
" @ 1st WLMin",
"%12.8f",
&fFirstLMW,"FirstLM",ColTypeFinal);
AddStatCol("firstlm_w","FirstWeightedLocalMin","mean",FALSE);
AddColumnUInt("firstlmstep","Step of the First Local Minimum Encountered",
" Step",
"of1st",
"L.Min",
"%5u",
&iFirstLMStep,"FirstLM",ColTypeFinal);
AddStatCol("firstlmstep","FirstLocalMinStep","mean",FALSE);
AddColumnUInt("firstlmstep_w","Step of the First Weighted Local Minimum Encountered",
" Step",
"of1st",
"WLMin",
"%5u",
&iFirstLMStepW,"FirstLM",ColTypeFinal);
AddStatCol("firstlmstep_w","FirstWeightedLocalMinStep","mean",FALSE);
AddColumnFloat("firstlmratio","Improvement from 1st LM: (start-firstlm)/(start-best)",
" First",
"Local Min",
" Ratio",
"%9.7f",
&fFirstLMRatio,"FirstLMRatio",ColTypeFinal);
AddStatCol("firstlmratio","FirstLocalMinRatio","mean",FALSE);
AddColumnFloat("firstlmratio_w","Improve from 1st WLM: (startw - firstlmw)/(startw-bestw)",
" First W.",
"Local Min",
" Ratio",
"%9.6f",
&fFirstLMRatioW,"FirstLMRatio",ColTypeFinal);
AddStatCol("firstlmratio_w","FirstWeightedLocalMinRatio","mean",FALSE);
AddColumnFloat("tbestlmmean","Mean of the Trajectory Best LM (# False)",
" Traj.",
"Best LM",
" Mean",
"%7.3f",
&fTrajBestLMMean,"TrajBestLM",ColTypeFinal);
AddStatCol("tbestlmmean","TrajBestLocalMinMean","mean",FALSE);
AddColumnFloat("tbestlmmean_w","Mean of the Trajectory Best LM (W.Sol'n Quality)",
" Traj.",
"Best LM",
" Mean",
"%7.3f",
&fTrajBestLMMeanW,"TrajBestLM",ColTypeFinal);
AddStatCol("tbestlmmean_w","TrajBestLocalMinWeightedMean","mean",FALSE);
AddColumnFloat("tbestlmcv","C.V. of the Trajectory Best LM (# False)",
" Traj.",
"Best LM",
" C.V.",
"%7.5f",
&fTrajBestLMCV,"TrajBestLM",ColTypeFinal);
AddStatCol("tbestlmcv","TrajBestLocalMinCV","mean",FALSE);
AddColumnFloat("tbestlmcv_w","C.V. of the Trajectory Best LM (W.Sol'n Quality)",
" Traj.",
"Best LM",
" C.V.",
"%7.5f",
&fTrajBestLMCVW,"TrajBestLM",ColTypeFinal);
AddStatCol("tbestlmcv_w","TrajBestLocalMinWeightedCV","mean",FALSE);
AddColumnUInt("qualmean","Average (Mean) # of False Clauses",
"Average",
" # of",
" False",
"%7.3f",
&iNumFalse,"",ColTypeMean);
AddStatCol("qualmean","SolutionQualityMean","mean",FALSE);
AddColumnFloat("qualmean_w","Average (Mean) of Weighted Solution Quality",
"Average",
"W.Sol'n",
"Quality",
"%7.3f",
&fSumFalseW,"",ColTypeMean);
AddStatCol("qualmean_w","WeightedSolutionQualityMean","mean",FALSE);
AddColumnUInt("qualstddev","Std.Dev. # of False Clauses",
"Std.Dev",
" # of",
" False",
"%7.3f",
&iNumFalse,"",ColTypeStddev);
AddStatCol("qualstddev","SolutionQualityStdDev","mean",FALSE);
AddColumnFloat("qualstddev_w","Std.Dev. of Weighted Solution Quality",
"Std.Dev",
"W.Sol'n",
"Quality",
"%7.3f",
&fSumFalseW,"",ColTypeStddev);
AddStatCol("qualstddev_w","WeightedSolutionQualityStdDev","mean",FALSE);
AddColumnUInt("qualcv","Coeff. of Var. # of False Clauses",
" C.V.",
" # of",
" False",
"%7.3f",
&iNumFalse,"",ColTypeCV);
AddStatCol("qualcv","SolutionQualityCV","mean",FALSE);
AddColumnFloat("qualcv_w","Coeff. of Var. of Weighted Solution Quality",
" C.V.",
"W.Sol'n",
"Quality",
"%7.3f",
&fSumFalseW,"",ColTypeCV);
AddStatCol("qualcv_w","WeightedSolutionQualityCV","mean",FALSE);
AddColumnUInt("seed","Starting Seed For the Run",
" ",
" Starting",
" Seed",
"%10u",
&iStartSeed,"StartSeed",ColTypeFinal);
AddColumnUInt("nullflips","Number of Null Flips",
" Number",
" of Null",
" Flips",
"%10u",
&iNumNullFlips,"NullFlips",ColTypeFinal);
AddStatCol("nullflips","NullFlips","mean",FALSE);
AddColumnUInt("percentnull","Percent of Null Flips",
"Percent",
" Null",
" Flips",
"%7.4f",
&iNumNullFlips,"NullFlips",ColTypeFinalDivStep100);
AddStatCol("percentnull","PercentNull","mean",FALSE);
AddColumnUInt("restarts","Number of Restarts",
" Number",
" of",
"Restarts",
"%8u",
&iNumRestarts,"NumRestarts",ColTypeFinal);
AddStatCol("restarts","NumRestarts","mean",FALSE);
AddColumnUInt("rand","Number of Random Decisions",
" Number",
" of Random",
" Decisions",
"%10u",
&iNumRandomCalls,"CountRandom",ColTypeFinal);
AddStatCol("rand","NumRandomDecisions","mean",FALSE);
AddColumnUInt("randstep","Mean Number of Random Decisions Per Step",
"Avg. Rand",
"Decisions",
" per step",
"%9.3f",
&iNumRandomCalls,"CountRandom",ColTypeFinalDivStep);
AddStatCol("randstep","RandomDecisionsPerStep","mean",FALSE);
AddColumnUInt("candidates","Mean Number of Flip Candidates (not all algs support it)",
" Mean #",
"of Flip",
" Candid",
"%7.4f",
&iNumCandidates,"",ColTypeMean);
AddStatCol("candidates","FlipCandidatesMean","mean",FALSE);
AddColumnUInt("localmins","Number of Local Minima Encountered",
" Number",
" of Local",
" Minima",
"%10u",
&iNumLocalMins,"LocalMins",ColTypeFinal);
AddStatCol("localmins","LocalMins","mean",FALSE);
AddColumnUInt("percentlocal","Percent of Steps in Local Minima",
"Percent",
" Local",
" Minima",
"%7.4f",
&iNumLocalMins,"LocalMins",ColTypeFinalDivStep100);
AddStatCol("percentlocal","PercentLocal","mean",FALSE);
AddColumnFloat("flipcountcv","CV of the Variable Flip Count Distribution",
" CV of",
" Flip",
" Count",
"%7.5f",
&fFlipCountsCV,"FlipCountStats",ColTypeFinal);
AddStatCol("flipcountcv","FlipCountCV","mean",FALSE);
AddColumnFloat("biasmax","Mean Frac. # steps vars spent same state as their most freq.",
" Max",
" Pol-",
" arity",
"%5.4f",
&fMeanMaxBias,"BiasStats",ColTypeFinal);
AddStatCol("biasmax","BiasMaxMean","mean",FALSE);
AddColumnFloat("biasfinal","Mean Frac. # steps vars spent same as their final state",
" Final",
" Pol-",
" arity",
"%5.4f",
&fMeanFinalBias,"BiasStats",ColTypeFinal);
AddStatCol("biasfinal","BiasFinalMean","mean",FALSE);
AddColumnFloat("unsatcountcv","CV of the Clause Unsat Count Distribution",
" CV of",
" Unsat",
" Count",
"%7.5f",
&fUnsatCountsCV,"UnsatCountStats",ColTypeFinal);
AddStatCol("unsatcountcv","UnsatCountCV","mean",FALSE);
AddColumnUInt("soldistance","Mean Hamming Distance from Closest Known Solution(s)",
" Mean",
"Dist To",
"kn.soln",
"%7.2f",
&iSolutionDistance,"SolutionDistance",ColTypeMean);
AddStatCol("soldistance","SolutionDistanceMean","mean",FALSE);
AddColumnFloat("fdc","Fitness-Distance Correlation Factor (calc. in LM)",
"Fitness",
"Distnce",
" Calc",
"%7.3f",
&fFDCRun,"FDCRun",ColTypeFinal);
AddStatCol("fdc","FDC","mean",FALSE);
AddColumnUInt("acl","Auto-Correlation Length",
"Auto",
"Corr",
"Len.",
"%4u",
&iAutoCorrLen,"AutoCorr",ColTypeFinal);
AddStatCol("acl","ACL","mean",FALSE);
AddColumnFloat("acone","Auto-Correlation of distance one",
" Auto-",
" Corr.",
" (one)",
"%7.5f",
&fAutoCorrOneVal,"AutoCorrOne",ColTypeFinal);
AddStatCol("acone","ACOne","mean",FALSE);
AddColumnFloat("estacl","Estimated Auto-Correlation Length from AC of 1",
" ",
" Est.",
" ACL",
"%7.2f",
&fAutoCorrOneEst,"AutoCorrOne",ColTypeFinal);
AddStatCol("estacl","EstACL","mean",FALSE);
AddColumnFloat("branchfact","Mean Branching Factor (# possible sidesteps / #vars)",
" Mean",
"Branch",
" Fact",
"%6.4f",
&fBranchFactor, "BranchFactor", ColTypeMean);
AddStatCol("branchfact","BranchFactorMean","mean",FALSE);
AddColumnFloat("branchfact_w","Mean Weighted Branching Factor",
"W.Mean",
"Branch",
" Fact",
"%6.4f",
&fBranchFactorW, "BranchFactorW", ColTypeMean);
AddStatCol("branchfact_w","WeightedBranchFactorMean","mean",FALSE);
AddColumnFloat("mobn","Mean Mobility for window size n (# of vars)",
"Mobility",
"Window N",
" Mean",
"%8.3f",
&fMobilityColNMean,"MobilityColumn,InitMobilityColumnN",ColTypeFinal);
AddStatCol("mobn","MobilitySizeNMean","mean",FALSE);
AddColumnFloat("mobx","Mean Mobility for window size x (see -r mobfixed)",
"Mobility",
"Window X",
" Mean",
"%8.3f",
&fMobilityColXMean,"MobilityColumn,InitMobilityColumnX",ColTypeFinal);
AddStatCol("mobx","MobilitySizeXMean","mean",FALSE);
AddColumnFloat("normmobn","Normalized Mean Mobility for window size n (# of vars) ",
"Norm Mob",
"Window N",
" Mean",
"%8.6f",
&fMobilityColNMeanNorm,"MobilityColumn,InitMobilityColumnN",ColTypeFinal);
AddStatCol("normmobn","NormalizedMobilitySizeN","mean",FALSE);
AddColumnFloat("normmobx","Normalized Mean Mobility for window size x (see -r mobfixed)",
"Norm Mob",
"Window X",
" Mean",
"%8.6f",
&fMobilityColXMeanNorm,"MobilityColumn,InitMobilityColumnX",ColTypeFinal);
AddStatCol("normmobx","NormalizedMobilitySizeXMean","mean",FALSE);
AddColumnFloat("mobncv","Mobility C.V. for window size n (# of vars)",
"Mobility",
"Window N",
" C.V.",
"%8.6f",
&fMobilityColNCV,"MobilityColumn,InitMobilityColumnN",ColTypeFinal);
AddStatCol("mobncv","MobilitySizeNMean","mean",FALSE);
AddColumnFloat("mobxcv","Mobility C.V. for window size x (see -r mobfixed)",
"Mobility",
"Window X",
" C.V.",
"%8.5f",
&fMobilityColXCV,"MobilityColumn,InitMobilityColumnX",ColTypeFinal);
AddStatCol("mobxcv","MobilitySizeXMean","mean",FALSE);
AddColumnUInt("upsteps","Number of Up (Backward) Steps",
" Number",
" of Up",
" Steps",
"%10u",
&iNumUpSteps,"StepsUpDownSide",ColTypeFinal);
AddColumnUInt("upsteps_w","Number of Up (Backward) Weighted Steps",
" Number",
" of Up",
" W. Steps",
"%10u",
&iNumUpStepsW,"StepsUpDownSide",ColTypeFinal);
AddColumnUInt("percentup","Percent of Up (Backward) Steps",
"Percent",
" of Up",
" Steps",
"%7.4f",
&iNumUpSteps,"StepsUpDownSide",ColTypeFinalDivStep100);
AddStatCol("percentup","PercentUpSteps","mean",FALSE);
AddColumnUInt("percentup_w","Percent of Up (Backward) Weighted Steps",
"Percent",
" of Up",
"W.Steps",
"%7.4f",
&iNumUpStepsW,"StepsUpDownSide",ColTypeFinalDivStep100);
AddStatCol("percentup_w","PercentWeightedUpSteps","mean",FALSE);
AddColumnUInt("downsteps","Number of Down (Improving) Steps",
" Number",
" of Down",
" Steps",
"%10u",
&iNumDownSteps,"StepsUpDownSide",ColTypeFinal);
AddColumnUInt("downsteps_w","Number of Down (Improving) Weighted Steps",
" Number",
" of Down",
" W.Steps",
"%10u",
&iNumDownStepsW,"StepsUpDownSide",ColTypeFinal);
AddColumnUInt("percentdown","Percent of Down (Improving) Steps",
"Percent",
"of Down",
" Steps",
"%7.4f",
&iNumDownSteps,"StepsUpDownSide",ColTypeFinalDivStep100);
AddStatCol("percentdown","PercentUpSteps","mean",FALSE);
AddColumnUInt("percentdown_w","Percent of Down (Improving) Weighted Steps",
"Percent",
"of Down",
"W.Steps",
"%7.4f",
&iNumDownStepsW,"StepsUpDownSide",ColTypeFinalDivStep100);
AddStatCol("percentdown_w","PercentWeightedUpSteps","mean",FALSE);
AddColumnUInt("sidesteps","Number of Sideways (Plateau) Steps",
" Number of",
" Sideways",
" Steps",
"%10u",
&iNumSideSteps,"StepsUpDownSide",ColTypeFinal);
AddColumnUInt("sidesteps_w","Number of Sideways (Plateau) Weighted Steps",
" Number of",
" Sideways",
" W. Steps",
"%10u",
&iNumSideStepsW,"StepsUpDownSide",ColTypeFinal);
AddColumnUInt("percentside","Percent of Sideways (Plateau) Steps",
"Percent",
"Sideway",
" Steps",
"%7.4f",
&iNumSideSteps,"StepsUpDownSide",ColTypeFinalDivStep100);
AddStatCol("percentside","PercentSideSteps","mean",FALSE);
AddColumnUInt("percentside_w","Percent of Sideways (Plateau) Weighted Steps",
"Percent",
"Sideway",
"W.Steps",
"%7.4f",
&iNumSideStepsW,"StepsUpDownSide",ColTypeFinalDivStep100);
AddStatCol("percentside_w","PercentWeightedSideSteps","mean",FALSE);
AddColumnFloat("timesteps","Time in seconds, calculated based on steps (RTD Only)",
" CPU Time",
"in seconds",
"(by steps)",
"%10.6f",
&fDummy,"UpdateTimes,ActivateStepsFoundColumns",ColTypeFinal);
AddStatCol("timesteps","CPUTime","mean+cv+median",TRUE);
AddColumnFloat("prob","Probability of Success (RTD Only)",
" Prob",
" of",
"Success",
"%7.5f",
&fDummy,"UpdatePercents",ColTypeFinal);
/***************************************************************************/
AddContainerStat("default","instinfo,totaltime,fps,runs,numsolve,percentsolve,steps,timesteps");
AddStatCustom("numclauses","Number of Clauses","Clauses","%u",(void *)&iNumClauses,DTypeUInt,"","");
AddStatCustom("numvars","Number of Variables","Variables","%u",(void *)&iNumVars,DTypeUInt,"","");
AddStatCustom("numlits","Number of Total Literals","TotalLiterals","%u",(void *)&iNumLits,DTypeUInt,"","");
AddContainerStat("instinfo","numvars,numclauses,numlits");
AddStatCustom("runs","Runs Executed","RunsExecuted","%u",(void *)&iRun,DTypeUInt,"","");
AddStatCustom("numsolve","Number of Successful Runs","SuccessfulRuns","%u",(void *)&iNumSolutionsFound,DTypeUInt,"","");
AddStatCustom("percentsolve","Percent of Successful Runs","PercentSuccess","%-6.2f",(void *)&fPercentSuccess,DTypeFloat,"","CalcPercentSolve");
AddStatCustom("totaltime","Total Time Elapsed","TotalCPUTimeElapsed","%-10.3f",(void *)&fTotalTime,DTypeFloat,"","");
AddStatCustom("fps","Flips Per Second","FlipsPerSecond","%-7.f",(void *)&fFlipsPerSecond,DTypeFloat,"","CalcFPS");
AddStatCustom("numunique","Number of Unique Solutions Found","UniqueSolutions","%u",(void *)&iNumUniqueSolutions,DTypeUInt,"","UniqueSolutions");
AddStatCustom("instname","File Name of the Instance","InstFileName","%s",(void *)&sFilenameIn,DTypeString,"","");
AddStatCustom("alginfo","Algorithm Parameters","AlgParameters","%s",(void *)&sStringAlgParms,DTypeString,"","StringAlgParms");
AddStatCustom("version","UBCSAT Version Information","UBCSATVersion","%s",(void *)&pVersion,DTypeString,"","");
}