Skip to content

Incomplete MaxSAT #5158

Answered by NikolajBjorner
kgoyal40 asked this question in Q&A
Apr 8, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

You can register a callback with the Optimize object that returns intermediary solutions.
So far I support the callback for the python API. You can also enable the parameter "opt.enable_lns", which when used from the default maxsat solver uses some improved search for intermediary solutions. While it remains to be further tuned, it can offer much higher quality solutions than the default option on hard MaxSAT problems.

The option is called enable_lns=true, example:

opt = Optimize()
opt.set(“enable_lns”, True)

From the command-line use “opt.enable_lns=true”.

You can also get intermediary solutions from a callback in Python

def on_model(model):
       print(model)

opt.set_on_model(on_model)

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@kgoyal40
Comment options

Answer selected by NikolajBjorner
Comment options

You must be logged in to vote
2 replies
@kgoyal40
Comment options

@NikolajBjorner
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants