tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
59 stars 18 forks source link

Error with TaskEndBeforeLax constraint #11

Closed dreinon closed 3 years ago

dreinon commented 3 years ago

I run my code with the new branch and got this error I wasn't getting before. I got it even before adding optional=True


AttributeError Traceback (most recent call last)

in 12 av_list = [] 13 for j in availability: ---> 14 av_list.append(ps.and_([ps.TaskStartAfterLax(students_tasks[-1], j[0],optional=True), ps.TaskEndBeforeLax(students_tasks[-1], j[1],optional=True)])) 15 constraints.append(ps.ForceApplyNOptionalConstraints(av_list,1)) 16 for i in range(num_practices_simple): ~/ProcessScheduler/processscheduler/task_constraint.py in __init__(self, task, value, optional) 216 217 if task.optional: --> 218 self.add_assset_applied_not_applied_assertionsertion(Implies(task.scheduled, scheduled_assertion)) 219 else: 220 self.set_applied_not_applied_assertions(scheduled_assertion) AttributeError: 'TaskEndBeforeLax' object has no attribute 'add_assset_applied_not_applied_assertionsertion'
tpaviot commented 3 years ago

Fixed by commit 0348d6320e09988c61c49d48df805c67c5d4989f