Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
SAT4J
sat4j
Commits
a5ae1b29
Commit
a5ae1b29
authored
Oct 04, 2020
by
Daniel Le Berre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebuilt random solver.
parent
aea58944
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
org.sat4j.core/src/main/java/org/sat4j/minisat/SolverFactory.java
...j.core/src/main/java/org/sat4j/minisat/SolverFactory.java
+18
-0
No files found.
org.sat4j.core/src/main/java/org/sat4j/minisat/SolverFactory.java
View file @
a5ae1b29
...
...
@@ -46,6 +46,7 @@ import org.sat4j.minisat.learning.PercentLengthLearning;
import
org.sat4j.minisat.orders.PhaseCachingAutoEraseStrategy
;
import
org.sat4j.minisat.orders.RSATLastLearnedClausesPhaseSelectionStrategy
;
import
org.sat4j.minisat.orders.RSATPhaseSelectionStrategy
;
import
org.sat4j.minisat.orders.RandomLiteralSelectionStrategy
;
import
org.sat4j.minisat.orders.RandomWalkDecorator
;
import
org.sat4j.minisat.orders.VarOrderHeap
;
import
org.sat4j.minisat.restarts.ArminRestarts
;
...
...
@@ -177,6 +178,23 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
return
solver
;
}
/**
*
* @since 2.3.6
*/
public
static
ICDCL
<
DataStructureFactory
>
newRandomSolver
()
{
MiniSATLearning
<
DataStructureFactory
>
learning
=
new
MiniSATLearning
<
DataStructureFactory
>();
Solver
<
DataStructureFactory
>
solver
=
new
Solver
<
DataStructureFactory
>(
learning
,
new
MixedDataStructureDanielWL
(),
new
RandomWalkDecorator
(
new
VarOrderHeap
(
new
RandomLiteralSelectionStrategy
()),
1.0
),
new
NoRestarts
());
// solver.setSearchParams(new SearchParams(1.1, 100));
solver
.
setSimplifier
(
solver
.
EXPENSIVE_SIMPLIFICATION
);
return
solver
;
}
/**
* @since 2.2
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment