Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
bfcc6ff8
Commit
bfcc6ff8
authored
Jul 22, 2019
by
SOLIMAN Sylvain
Browse files
use rc2.py from python-sat instead of qmaxsat for macos/future-proofness
parent
87de7a89
Changes
2
Hide whitespace changes
Inline
Side-by-side
install.sh
View file @
bfcc6ff8
...
...
@@ -132,26 +132,8 @@ then
popd
fi
# Does not work on MacOS?
### QMaxSat solver
if
!
hash
qmaxsat 2>/dev/null
then
qmaxsat_url
=
https://maxsat-evaluations.github.io/2018/mse18-solver-src/complete/QMaxSAT.zip
qmaxsat_archive
=
${
qmaxsat_url
##*/
}
if
[[
!
-r
$qmaxsat_archive
]]
then
curl
-fsSLO
$qmaxsat_url
fi
unzip
$qmaxsat_archive
pushd
QMaxSAT/code
make
sudo cp
qmaxsat_g3 /usr/local/bin/qmaxsat
popd
rm
-Rf
QMaxSAT
fi
### Jupyter
packages
=
'jupyter bokeh ipywidgets'
### Jupyter and python-sat
packages
=
'python-sat jupyter bokeh ipywidgets'
if
hash
pip3 2>/dev/null
then
pip3
install
-U
$packages
...
...
sat.pl
View file @
bfcc6ff8
...
...
@@ -114,8 +114,8 @@ run_sat(FileIn, Bottom, Sepis) :-
call_maxsat
(
FileIn
,
Sepis
):-
debug
(
sepi
,
"running maxsatsolver"
,
[]),
process_create
(
path
(
'
qmaxsat
'
),
[
FileIn
],
path
(
'
rc2.py
'
),
[
'-vv'
,
FileIn
],
[
process
(
Id
),
stderr
(
null
),
stdout
(
pipe
(
Stream
))]
),
(
...
...
@@ -161,7 +161,7 @@ write_sat_header(Stream) :-
format
(
Stream
,
"c ~w~np cnf ~d ~d~n"
,
[
Comment
,
Vars
,
Clauses
]).
%% read_lines for qqmaxsat
%% read_lines for
rc2.py/
qqmaxsat
read_lines
(
Stream
,
Output
)
:-
read_line_to_codes
(
Stream
,
Codes
),
read_lines
(
Codes
,
Stream
,
Solutions
,
Optimum
),
...
...
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