Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
sat4j
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
53
Issues
53
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SAT4J
sat4j
Commits
876bc671
Commit
876bc671
authored
Oct 23, 2017
by
Daniel Le Berre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KTH launcher can now output dot files using -dot <filename> option
parent
062d697d
Pipeline
#326
passed with stages
in 23 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
org.sat4j.sat/src/main/java/org/sat4j/sat/KTHLauncher.java
org.sat4j.sat/src/main/java/org/sat4j/sat/KTHLauncher.java
+13
-0
No files found.
org.sat4j.sat/src/main/java/org/sat4j/sat/KTHLauncher.java
View file @
876bc671
...
...
@@ -28,6 +28,7 @@ import org.sat4j.pb.reader.OPBReader2012;
import
org.sat4j.reader.ParseFormatException
;
import
org.sat4j.specs.ContradictionException
;
import
org.sat4j.specs.TimeoutException
;
import
org.sat4j.tools.DotSearchTracing
;
/**
* A specific launcher for experimenting various settings in the PB solvers with
...
...
@@ -58,6 +59,8 @@ public class KTHLauncher {
"Remove literals that are not implied/propagated by the assignment at the backjump level. Legal values are true or false."
);
options
.
addOption
(
"division"
,
"division-strategy"
,
true
,
"Detect if all the coefficients can be divided by a common number. Legal values are two, gcd or none."
);
options
.
addOption
(
"dot"
,
"dot-output"
,
true
,
"Output the search as a dot file"
);
Option
op
=
options
.
getOption
(
"coeflim"
);
op
.
setArgName
(
"limit"
);
op
=
options
.
getOption
(
"coeflim-small"
);
...
...
@@ -74,6 +77,8 @@ public class KTHLauncher {
op
.
setArgName
(
"type"
);
op
=
options
.
getOption
(
"weaken-nonimplied"
);
op
.
setArgName
(
"boolean"
);
op
=
options
.
getOption
(
"dot-output"
);
op
.
setArgName
(
"filename"
);
return
options
;
}
...
...
@@ -247,6 +252,14 @@ public class KTHLauncher {
OptToPBSATAdapter
optimizer
=
new
OptToPBSATAdapter
(
handle
);
try
{
reader
.
parseInstance
(
filename
);
if
(
reader
.
hasAMapping
()&&
line
.
hasOption
(
"dot-output"
))
{
String
dotfilename
=
line
.
getOptionValue
(
"dot-output"
);
if
(
dotfilename
!=
null
)
{
DotSearchTracing
<
String
>
dotTracing
=
new
DotSearchTracing
<>(
dotfilename
);
solver
.
setSearchListener
(
dotTracing
);
dotTracing
.
setMapping
(
reader
.
getMapping
());
}
}
if
(
optimizer
.
isSatisfiable
())
{
if
(
optimizer
.
isOptimal
())
{
System
.
out
.
println
(
"s OPTIMUM FOUND"
);
...
...
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