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 package org.sat4j.pb;
31
32 import org.sat4j.core.ASolverFactory;
33 import org.sat4j.minisat.core.IOrder;
34 import org.sat4j.minisat.core.IPhaseSelectionStrategy;
35 import org.sat4j.minisat.core.Solver;
36 import org.sat4j.minisat.learning.ClauseOnlyLearning;
37 import org.sat4j.minisat.learning.MiniSATLearning;
38 import org.sat4j.minisat.learning.NoLearningButHeuristics;
39 import org.sat4j.minisat.orders.PhaseInLastLearnedClauseSelectionStrategy;
40 import org.sat4j.minisat.orders.RSATPhaseSelectionStrategy;
41 import org.sat4j.minisat.orders.UserFixedPhaseSelectionStrategy;
42 import org.sat4j.minisat.orders.VarOrderHeap;
43 import org.sat4j.minisat.restarts.ArminRestarts;
44 import org.sat4j.minisat.restarts.LubyRestarts;
45 import org.sat4j.minisat.restarts.MiniSATRestarts;
46 import org.sat4j.pb.constraints.AbstractPBDataStructureFactory;
47 import org.sat4j.pb.constraints.CompetMinHTmixedClauseCardConstrDataStructureFactory;
48 import org.sat4j.pb.constraints.CompetResolutionMinPBLongMixedWLClauseCardConstrDataStructure;
49 import org.sat4j.pb.constraints.CompetResolutionPBLongMixedHTClauseCardConstrDataStructure;
50 import org.sat4j.pb.constraints.CompetResolutionPBLongMixedWLClauseCardConstrDataStructure;
51 import org.sat4j.pb.constraints.CompetResolutionPBMixedHTClauseCardConstrDataStructure;
52 import org.sat4j.pb.constraints.CompetResolutionPBMixedWLClauseCardConstrDataStructure;
53 import org.sat4j.pb.constraints.PBLongMaxClauseCardConstrDataStructure;
54 import org.sat4j.pb.constraints.PBLongMinClauseCardConstrDataStructure;
55 import org.sat4j.pb.constraints.PBMaxClauseAtLeastConstrDataStructure;
56 import org.sat4j.pb.constraints.PBMaxClauseCardConstrDataStructure;
57 import org.sat4j.pb.constraints.PBMaxDataStructure;
58 import org.sat4j.pb.constraints.PBMinClauseCardConstrDataStructure;
59 import org.sat4j.pb.constraints.PBMinDataStructure;
60 import org.sat4j.pb.constraints.PuebloPBMinClauseAtLeastConstrDataStructure;
61 import org.sat4j.pb.constraints.PuebloPBMinClauseCardConstrDataStructure;
62 import org.sat4j.pb.constraints.PuebloPBMinDataStructure;
63 import org.sat4j.pb.core.PBDataStructureFactory;
64 import org.sat4j.pb.core.PBSolver;
65 import org.sat4j.pb.core.PBSolverCP;
66 import org.sat4j.pb.core.PBSolverCautious;
67 import org.sat4j.pb.core.PBSolverClause;
68 import org.sat4j.pb.core.PBSolverResCP;
69 import org.sat4j.pb.core.PBSolverResolution;
70 import org.sat4j.pb.core.PBSolverWithImpliedClause;
71 import org.sat4j.pb.orders.VarOrderHeapObjective;
72 import org.sat4j.pb.tools.ClausalConstraintsDecorator;
73 import org.sat4j.pb.tools.ManyCorePB;
74 import org.sat4j.specs.ISolver;
75 import org.sat4j.tools.DimacsOutputSolver;
76
77
78
79
80
81
82
83 public class SolverFactory extends ASolverFactory<IPBSolver> {
84
85
86
87
88 private static final long serialVersionUID = 1L;
89
90
91 private static SolverFactory instance;
92
93
94
95
96
97
98 private SolverFactory() {
99
100 }
101
102 private static synchronized void createInstance() {
103 if (instance == null) {
104 instance = new SolverFactory();
105 }
106 }
107
108
109
110
111
112
113 public static SolverFactory instance() {
114 if (instance == null) {
115 createInstance();
116 }
117 return instance;
118 }
119
120
121
122
123
124 public static PBSolverResolution newPBResAllPB() {
125 return newPBRes(new PBMaxDataStructure());
126 }
127
128
129
130
131
132 public static PBSolverCP newPBCPAllPB() {
133 return newPBCP(new PBMaxDataStructure());
134 }
135
136
137
138
139 public static IPBSolver newOPBStringSolver() {
140 return new OPBStringSolver();
141 }
142
143
144
145
146
147
148 public static PBSolverCP newPBCPMixedConstraints() {
149 return newPBCP(new PBMaxClauseCardConstrDataStructure());
150 }
151
152
153
154
155
156
157
158 public static PBSolverCP newPBCPMixedConstraintsObjective() {
159 return newPBCP(new PBMaxClauseCardConstrDataStructure(),
160 new VarOrderHeapObjective());
161 }
162
163 public static PBSolverCP newCompetPBCPMixedConstraintsObjective() {
164 return newPBCP(new PBMaxClauseCardConstrDataStructure(),
165 new VarOrderHeapObjective());
166 }
167
168 public static PBSolverCP newCompetPBCPMixedConstraintsMinObjective() {
169 return newPBCP(new PBMinClauseCardConstrDataStructure(),
170 new VarOrderHeapObjective());
171 }
172
173 public static PBSolverCP newCompetPBCPMixedConstraintsLongMaxObjective() {
174 return newPBCP(new PBLongMaxClauseCardConstrDataStructure(),
175 new VarOrderHeapObjective());
176 }
177
178 public static PBSolverCP newCompetPBCPMixedConstraintsLongMinObjective() {
179 return newPBCP(new PBLongMinClauseCardConstrDataStructure(),
180 new VarOrderHeapObjective());
181 }
182
183
184
185
186
187
188
189
190
191 public static PBSolverCP newPBCPMixedConstraintsObjectiveLearnJustClauses() {
192 ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
193 PBSolverCP solver = new PBSolverCP(learning,
194 new PBMaxClauseCardConstrDataStructure(),
195 new VarOrderHeapObjective());
196 learning.setSolver(solver);
197 return solver;
198 }
199
200 public static PBSolverCP newCompetPBCPMixedConstraintsObjectiveLearnJustClauses() {
201 ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
202 PBSolverCP solver = new PBSolverCP(learning,
203 new PBMaxClauseCardConstrDataStructure(),
204 new VarOrderHeapObjective());
205 learning.setSolver(solver);
206 return solver;
207 }
208
209 private static PBSolverCP newPBKiller(IPhaseSelectionStrategy phase) {
210 ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
211 PBSolverCP solver = new PBSolverCP(learning,
212 new PBMaxClauseCardConstrDataStructure(),
213 new VarOrderHeapObjective(phase));
214 learning.setSolver(solver);
215 return solver;
216 }
217
218 public static PBSolverCP newPBKillerRSAT() {
219 return newPBKiller(new RSATPhaseSelectionStrategy());
220 }
221
222 public static PBSolverCP newPBKillerClassic() {
223 return newPBKiller(new PhaseInLastLearnedClauseSelectionStrategy());
224 }
225
226 public static PBSolverCP newPBKillerFixed() {
227 return newPBKiller(new UserFixedPhaseSelectionStrategy());
228 }
229
230 private static PBSolverCP newCompetPBKiller(IPhaseSelectionStrategy phase) {
231 ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
232 PBSolverCP solver = new PBSolverCP(learning,
233 new PBMaxClauseCardConstrDataStructure(),
234 new VarOrderHeapObjective(phase));
235 learning.setSolver(solver);
236 return solver;
237 }
238
239 public static PBSolverCP newCompetPBKillerRSAT() {
240 return newCompetPBKiller(new RSATPhaseSelectionStrategy());
241 }
242
243 public static PBSolverCP newCompetPBKillerClassic() {
244 return newCompetPBKiller(new PhaseInLastLearnedClauseSelectionStrategy());
245 }
246
247 public static PBSolverCP newCompetPBKillerFixed() {
248 return newCompetPBKiller(new UserFixedPhaseSelectionStrategy());
249 }
250
251
252
253
254
255
256
257
258 public static PBSolverCP newMiniLearningOPBClauseCardConstrMaxSpecificOrderIncrementalReductionToClause() {
259
260 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
261
262 PBSolverCP solver = new PBSolverClause(learning,
263 new PBMaxClauseCardConstrDataStructure(),
264 new VarOrderHeapObjective());
265 learning.setDataStructureFactory(solver.getDSFactory());
266 learning.setVarActivityListener(solver);
267 return solver;
268 }
269
270
271
272
273
274
275
276
277 public static PBSolverCP newPBCPMixedConstraintsObjectiveNoLearning() {
278 NoLearningButHeuristics<PBDataStructureFactory> learning = new NoLearningButHeuristics<PBDataStructureFactory>();
279
280 PBSolverCP solver = new PBSolverCP(learning,
281 new PBMaxClauseCardConstrDataStructure(),
282 new VarOrderHeapObjective());
283 learning.setSolver(solver);
284 learning.setVarActivityListener(solver);
285 return solver;
286 }
287
288 public static PBSolverResolution newPBResMixedConstraintsObjective() {
289 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
290 PBSolverResolution solver = new PBSolverResolution(learning,
291 new PBMaxClauseCardConstrDataStructure(),
292 new VarOrderHeapObjective(), new MiniSATRestarts());
293 learning.setDataStructureFactory(solver.getDSFactory());
294 learning.setVarActivityListener(solver);
295 return solver;
296 }
297
298 public static PBSolverResolution newCompetPBResWLMixedConstraintsObjectiveExpSimp() {
299 return newCompetPBResMixedConstraintsObjectiveExpSimp(new CompetResolutionPBMixedWLClauseCardConstrDataStructure());
300 }
301
302 public static PBSolverResolution newCompetPBResHTMixedConstraintsObjectiveExpSimp() {
303 return newCompetPBResMixedConstraintsObjectiveExpSimp(new CompetResolutionPBMixedHTClauseCardConstrDataStructure());
304 }
305
306 public static PBSolverResolution newCompetPBResLongHTMixedConstraintsObjectiveExpSimp() {
307 return newCompetPBResMixedConstraintsObjectiveExpSimp(new CompetResolutionPBLongMixedHTClauseCardConstrDataStructure());
308 }
309
310 public static PBSolverResolution newCompetPBResLongWLMixedConstraintsObjectiveExpSimp() {
311 return newCompetPBResMixedConstraintsObjectiveExpSimp(new CompetResolutionPBLongMixedWLClauseCardConstrDataStructure());
312 }
313
314 public static PBSolverResolution newCompetMinPBResLongWLMixedConstraintsObjectiveExpSimp() {
315 return newCompetPBResMixedConstraintsObjectiveExpSimp(new CompetResolutionMinPBLongMixedWLClauseCardConstrDataStructure());
316 }
317
318 public static PBSolverResolution newCompetPBResMixedConstraintsObjectiveExpSimp(
319 PBDataStructureFactory dsf) {
320 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
321 PBSolverResolution solver = new PBSolverResolution(learning, dsf,
322 new VarOrderHeapObjective(new RSATPhaseSelectionStrategy()),
323 new ArminRestarts());
324 learning.setDataStructureFactory(solver.getDSFactory());
325 learning.setVarActivityListener(solver);
326 solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
327 return solver;
328 }
329
330 public static PBSolverResolution newPBResHTMixedConstraintsObjective() {
331 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
332 AbstractPBDataStructureFactory ds = new CompetResolutionPBMixedHTClauseCardConstrDataStructure();
333 ds.setNormalizer(AbstractPBDataStructureFactory.NO_COMPETITION);
334 PBSolverResolution solver = new PBSolverResolution(learning, ds,
335 new VarOrderHeapObjective(), new MiniSATRestarts());
336 learning.setDataStructureFactory(solver.getDSFactory());
337 learning.setVarActivityListener(solver);
338 return solver;
339 }
340
341 public static PBSolverResolution newCompetPBResMinHTMixedConstraintsObjective() {
342 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
343 PBSolverResolution solver = new PBSolverResolution(learning,
344 new CompetMinHTmixedClauseCardConstrDataStructureFactory(),
345 new VarOrderHeapObjective(), new MiniSATRestarts());
346 learning.setDataStructureFactory(solver.getDSFactory());
347 learning.setVarActivityListener(solver);
348 return solver;
349 }
350
351 public static PBSolverResolution newPBResMinHTMixedConstraintsObjective() {
352 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
353 AbstractPBDataStructureFactory ds = new CompetMinHTmixedClauseCardConstrDataStructureFactory();
354 ds.setNormalizer(AbstractPBDataStructureFactory.NO_COMPETITION);
355 PBSolverResolution solver = new PBSolverResolution(learning, ds,
356 new VarOrderHeapObjective(), new MiniSATRestarts());
357 learning.setDataStructureFactory(solver.getDSFactory());
358 learning.setVarActivityListener(solver);
359 return solver;
360 }
361
362 public static PBSolverResolution newCompetPBResMixedConstraintsObjectiveExpSimp() {
363 PBSolverResolution solver = newPBResMixedConstraintsObjective();
364 solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
365 return solver;
366 }
367
368 public static PBSolverResolution newPBResHTMixedConstraintsObjectiveExpSimp() {
369 PBSolverResolution solver = newPBResHTMixedConstraintsObjective();
370 solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
371 return solver;
372 }
373
374 public static PBSolverResolution newCompetPBResMinHTMixedConstraintsObjectiveExpSimp() {
375 PBSolverResolution solver = newCompetPBResMinHTMixedConstraintsObjective();
376 solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
377 return solver;
378 }
379
380
381
382
383
384
385
386
387 public static PBSolverClause newPBCPMixedConstraintsReduceToClause() {
388 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
389 PBSolverClause solver = new PBSolverClause(learning,
390 new PBMaxClauseCardConstrDataStructure(), new VarOrderHeap());
391 learning.setDataStructureFactory(solver.getDSFactory());
392 learning.setVarActivityListener(solver);
393 return solver;
394 }
395
396
397
398
399
400
401
402
403 public static PBSolverCautious newPBCPMixedConstraintsCautious(int bound) {
404 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
405 PBSolverCautious solver = new PBSolverCautious(learning,
406 new PBMaxClauseCardConstrDataStructure(),
407 new VarOrderHeapObjective(), bound);
408 learning.setDataStructureFactory(solver.getDSFactory());
409 learning.setVarActivityListener(solver);
410 return solver;
411 }
412
413 public static PBSolverCautious newPBCPMixedConstraintsCautious() {
414 return newPBCPMixedConstraintsCautious(PBSolverCautious.BOUND);
415 }
416
417
418
419
420
421
422
423
424 public static PBSolverResCP newPBCPMixedConstraintsResCP(long bound) {
425 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
426 PBSolverResCP solver = new PBSolverResCP(learning,
427 new PBMaxClauseCardConstrDataStructure(),
428 new VarOrderHeapObjective(), bound);
429 learning.setDataStructureFactory(solver.getDSFactory());
430 learning.setVarActivityListener(solver);
431 solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
432 return solver;
433 }
434
435 public static PBSolverResCP newPBCPMixedConstraintsResCP() {
436 return newPBCPMixedConstraintsResCP(PBSolverResCP.MAXCONFLICTS);
437 }
438
439
440
441
442
443
444
445 public static PBSolverWithImpliedClause newPBCPMixedConstrainsImplied() {
446 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
447 PBSolverWithImpliedClause solver = new PBSolverWithImpliedClause(
448 learning, new PBMaxClauseCardConstrDataStructure(),
449 new VarOrderHeap());
450 learning.setDataStructureFactory(solver.getDSFactory());
451 learning.setVarActivityListener(solver);
452 return solver;
453 }
454
455
456
457
458
459
460
461
462 public static PBSolverCP newMiniOPBClauseAtLeastConstrMax() {
463 return newPBCP(new PBMaxClauseAtLeastConstrDataStructure());
464 }
465
466
467
468
469
470 public static PBSolverResolution newPBResAllPBWL() {
471 return newPBRes(new PBMinDataStructure());
472 }
473
474
475
476
477
478 public static PBSolverCP newPBCPAllPBWL() {
479 return newPBCP(new PBMinDataStructure());
480 }
481
482
483
484
485
486 public static PBSolverResolution newPBResAllPBWLPueblo() {
487 return newPBRes(new PuebloPBMinDataStructure());
488 }
489
490 private static PBSolverResolution newPBRes(PBDataStructureFactory dsf) {
491 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
492 PBSolverResolution solver = new PBSolverResolution(learning, dsf,
493 new VarOrderHeap(), new MiniSATRestarts());
494 learning.setDataStructureFactory(solver.getDSFactory());
495 learning.setVarActivityListener(solver);
496 return solver;
497 }
498
499
500
501
502
503 public static PBSolverCP newPBCPAllPBWLPueblo() {
504 return newPBCP(new PuebloPBMinDataStructure());
505 }
506
507
508
509
510
511 public static PBSolverCP newMiniOPBClauseCardMinPueblo() {
512 return newPBCP(new PuebloPBMinClauseCardConstrDataStructure());
513 }
514
515
516
517
518
519 public static PBSolverCP newMiniOPBClauseCardMin() {
520 return newPBCP(new PBMinClauseCardConstrDataStructure());
521 }
522
523
524
525
526
527 public static PBSolverCP newMiniOPBClauseAtLeastMinPueblo() {
528 return newPBCP(new PuebloPBMinClauseAtLeastConstrDataStructure());
529 }
530
531 private static PBSolverCP newPBCP(PBDataStructureFactory dsf, IOrder order) {
532 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
533 PBSolverCP solver = new PBSolverCP(learning, dsf, order);
534 learning.setDataStructureFactory(solver.getDSFactory());
535 learning.setVarActivityListener(solver);
536 solver.setRestartStrategy(new ArminRestarts());
537 solver.setLearnedConstraintsDeletionStrategy(solver.glucose);
538 return solver;
539 }
540
541 private static PBSolverCP newPBCP(PBDataStructureFactory dsf) {
542 return newPBCP(dsf, new VarOrderHeap());
543 }
544
545
546
547
548
549
550
551 public static IPBSolver newCuttingPlanes() {
552 return newCompetPBCPMixedConstraintsObjective();
553 }
554
555
556
557
558
559
560
561 public static IPBSolver newCuttingPlanesAggressiveCleanup() {
562 PBSolverCP solver = newCompetPBCPMixedConstraintsObjective();
563 solver.setLearnedConstraintsDeletionStrategy(solver.fixedSize(100));
564 return solver;
565 }
566
567
568
569
570
571
572
573 public static IPBSolver newResolution() {
574 return newResolutionGlucoseExpSimp();
575 }
576
577
578
579
580
581
582
583
584 public static IPBSolver newBoth() {
585 return new ManyCorePB(newResolution(), newCuttingPlanes());
586 }
587
588
589
590
591
592
593
594 public static IPBSolver newSATUNSAT() {
595 return new ManyCorePB(newSAT(), newUNSAT());
596 }
597
598
599
600
601
602
603 public static PBSolverResolution newSAT() {
604 PBSolverResolution solver = newResolutionGlucose();
605 solver.setRestartStrategy(new LubyRestarts(100));
606 solver.setLearnedConstraintsDeletionStrategy(solver.memory_based);
607 return solver;
608 }
609
610
611
612
613
614
615 public static PBSolverResolution newUNSAT() {
616 return newResolutionGlucose();
617 }
618
619
620
621
622
623
624
625
626
627 public static PBSolverResolution newResolutionGlucose() {
628 PBSolverResolution solver = newCompetPBResLongWLMixedConstraintsObjectiveExpSimp();
629 solver.setSimplifier(Solver.NO_SIMPLIFICATION);
630 solver.setLearnedConstraintsDeletionStrategy(solver.glucose);
631 return solver;
632 }
633
634
635
636
637
638
639
640
641 public static PBSolverResolution newResolutionGlucoseSimpleSimp() {
642 PBSolverResolution solver = newResolutionGlucose();
643 solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
644 return solver;
645 }
646
647
648
649
650
651
652
653
654
655
656 public static PBSolverResolution newResolutionGlucoseExpSimp() {
657 PBSolverResolution solver = newResolutionGlucose();
658 solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
659 return solver;
660 }
661
662
663
664
665
666
667
668
669 public static IPBSolver newSimpleSimplification() {
670 PBSolverResolution solver = newCompetPBResWLMixedConstraintsObjectiveExpSimp();
671 solver.setLearnedConstraintsDeletionStrategy(solver.glucose);
672 solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
673 return solver;
674 }
675
676
677
678
679
680
681
682
683 public static IPBSolver newResolutionSimpleRestarts() {
684 PBSolverResolution solver = newCompetPBResLongWLMixedConstraintsObjectiveExpSimp();
685 solver.setLearnedConstraintsDeletionStrategy(solver.glucose);
686 solver.setRestartStrategy(new MiniSATRestarts());
687 return solver;
688 }
689
690
691
692
693
694
695
696
697
698 public static IPBSolver newResolutionMaxMemory() {
699 PBSolverResolution solver = newCompetPBResLongWLMixedConstraintsObjectiveExpSimp();
700 solver.setLearnedConstraintsDeletionStrategy(solver.memory_based);
701 return solver;
702 }
703
704
705
706
707
708
709
710
711
712 public static PBSolver newDefault() {
713 return newResolutionGlucose();
714 }
715
716
717
718
719
720
721
722
723
724 public static IPBSolver newDefaultNonNormalized() {
725 PBSolver solver = newDefault();
726 CompetResolutionPBLongMixedWLClauseCardConstrDataStructure ds = new CompetResolutionPBLongMixedWLClauseCardConstrDataStructure();
727 ds.setNormalizer(AbstractPBDataStructureFactory.NO_COMPETITION);
728 solver.setDataStructureFactory(ds);
729 return solver;
730 }
731
732 @Override
733 public PBSolver defaultSolver() {
734 return newDefault();
735 }
736
737
738
739
740
741
742
743
744 public static IPBSolver newLight() {
745 return newCompetPBResMixedConstraintsObjectiveExpSimp();
746 }
747
748 @Override
749 public IPBSolver lightSolver() {
750 return newLight();
751 }
752
753 public static ISolver newDimacsOutput() {
754 return new ClausalConstraintsDecorator(new DimacsOutputSolver());
755 }
756
757 public static IPBSolver newEclipseP2() {
758 MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
759 PBSolverResolution solver = new PBSolverResolution(learning,
760 new CompetResolutionPBMixedHTClauseCardConstrDataStructure(),
761 new VarOrderHeapObjective(new RSATPhaseSelectionStrategy()),
762 new ArminRestarts());
763 learning.setDataStructureFactory(solver.getDSFactory());
764 learning.setVarActivityListener(solver);
765 solver.setTimeoutOnConflicts(300);
766 solver.setVerbose(false);
767 return new OptToPBSATAdapter(new PseudoOptDecorator(solver));
768 }
769
770 }