Skip to content
Discussion options

You must be logged in to vote

Here is the answer:

a = Int('a')
b = Int('b')
s1=Solver()
s1.add(a>10)
s1.check()
# Curious eval() updates the model to force a value for that variable!
s1.model().eval(a,True)
s1.model().eval(b,True)
print(s1.model())

results in

[a = 11, b = 0]

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by DavidPratten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant