-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Milestone
Description
What version of OR-Tools and what language are you using?
Version: v9.10
Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
CP-SAT
What operating system (Linux, Windows, ...) and version?
Windows
What did you do?
The following simple script silently stops at the line status = solver.solve(model). There is nothing in the console.
from ortools.sat.python import cp_model
def simple_sat_program():
model = cp_model.CpModel()
num_vals = 3
x = model.new_int_var(0, num_vals - 1, "x")
y = model.new_int_var(0, num_vals - 1, "y")
z = model.new_int_var(0, num_vals - 1, "z")
model.add(x != y)
solver = cp_model.CpSolver()
solver.parameters.log_search_progress = True
status = solver.solve(model)
if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:
print(f"x = {solver.value(x)}")
print(f"y = {solver.value(y)}")
print(f"z = {solver.value(z)}")
else:
print("No solution found.")
simple_sat_program()What did you expect to see
Optimal values of x, y, z
What did you see instead?
Nothing.
Reactions are currently unavailable