Closed leonlan closed 1 month ago
add_min_equality
with an empty list is infeasible.
from ortools.sat.python.cp_model import CpModel, CpSolver
model = CpModel()
start = model.new_int_var(0, 10, '')
end = model.new_int_var(0, 10, '')
duration = model.new_int_var(5, 5, '')
interval_var = model.new_interval_var(start, duration, end, name='')
model.add_min_equality(start, [])
solver = CpSolver()
solver.parameters.log_search_progress = True
solver.log_callback = lambda x: print(x)
status = solver.solve(model)
solver.status_name(status)
I encountered this when spanning job variables with task variables.
add_min_equality
with an empty list is infeasible.from ortools.sat.python.cp_model import CpModel, CpSolver model = CpModel() start = model.new_int_var(0, 10, '') end = model.new_int_var(0, 10, '') duration = model.new_int_var(5, 5, '') interval_var = model.new_interval_var(start, duration, end, name='') model.add_min_equality(start, []) solver = CpSolver() solver.parameters.log_search_progress = True solver.log_callback = lambda x: print(x) status = solver.solve(model) solver.status_name(status)
I encountered this when spanning job variables with task variables.
This issue collects things I encounter with OR-Tools that I want to document for future reference.