Closed timnon closed 6 years ago
In the following example, T1 should not be scheduled, but only T2 in slot 0:
#! /usr/bin/python import sys sys.path.append('../src') import pyschedule # get input size S = pyschedule.Scenario('test',horizon=10) R = S.Resource('R') T1 = S.Task('T1',length=1,schedule_cost=100) T2 = S.Task('T2',completion_time_cost=1) S += T1 >= 0 S += T1 < T2 T1 += R T2 += R if pyschedule.solvers.mip.solve(S,msg=1,kind='CBC'): pyschedule.plotters.matplotlib.plot(S,color_prec_groups=False) else: print('no solution found')
A workaround is T1 > 0, T1 < 1 at the moment
T1 > 0, T1 < 1
In the following example, T1 should not be scheduled, but only T2 in slot 0: