Skip to content

CP-SAT solver stopped working on Windows after updating to ortools 9.10 #4225

@vaidzelevich

Description

@vaidzelevich

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions