scheduling example with transition times and transition costs

This commit is contained in:
Laurent Perron
2018-09-14 17:26:33 +02:00
parent 9a005f9e60
commit e4423dc90e

View File

@@ -184,6 +184,7 @@ for machine_id in all_machines:
arcs.append([i + 1, j + 1, lit])
model.AddImplication(lit, PRESENCES[i])
model.AddImplication(lit, PRESENCES[j])
# Compute the transition time if task j is the successor of task i.
if Resource[i] != Resource[j]:
transition_time = 3
switch_literals.append(lit)