Add an example that illustrates set_on_model for Optimize
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 123
- Forks
- 34
- Avg merge
- 3h 48m
- Merged PRs (30d)
- 4
Description
Here is a bare bones example:
from z3 import *
import sys
opt = Optimize()
def on_model(m):
print("model", m)
sys.stdout.flush()
opt.set_on_model(on_model)
#opt.set("maxsat_engine","wmax")
opt.set("enable_lns", True)
opt.from_file("../smtlib.txt")
set_option(verbose=2)
opt.set(timeout=3000)
opt.check()
print(opt.model())
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.