simplify code

This commit is contained in:
Laurent Perron
2022-02-23 22:08:17 +01:00
parent 111e726d3d
commit edbb274a62

View File

@@ -224,7 +224,7 @@ def SolveRcpsp(problem, proto_file, params):
m2]
s2 = task_starts[next_id]
p2 = task_to_presence_literals[next_id][m2]
model.Add(s1 + delay <= s2).OnlyEnforceIf([p1, p2])
model.Add(s1 + delay <= s2).OnlyEnforceIf(p1, p2)
else:
# Normal dependencies (task ends before the start of successors).
for t in all_active_tasks: