1

If we take an example of task assignment to employee where we assign a list of tasks to list of employees based on employee's availability and skills(hard constraints) required to perform an individual task.

Now, if there is a task and no employee has skill to do that, Optaplanner will still assign that task to an employee and will break a Hard constraint. This result tells me that there is there is a hard constraint broken but still that task is assigned and that effects the chain of task an employee is supposed to do ie rather than assigning an irrelevant(out of skills) task, shouldn't system(Optaplanner) provide an assigment criteria that wont allow assigning of a task to an employee which is out of his/her skills.

Is there a way to achieve such criteria?

P.S. I'm just beginning to understand Optoplanner, please feel free to correct question if needed.

Sachin Verma
  • 3,712
  • 10
  • 41
  • 74

1 Answers1

2

This is called overconstrained planning. Look for it in the docs. There are basically 3 options for you to choose from:

  • Break hard constraints (default behaviour)
  • Assign to null (nullable=true and extra medium constraint)
  • Assign to virtuals (extra medium constraint and maybe even adjustments to soft constraints)

See docs.

andre-r
  • 2,685
  • 19
  • 23
Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • Well, i"m using chained planning variable (my problem is similar to vrp) and it can not support nullable. Also, I'm using Bendable score so it wont have medium. Is there a way I can leave some customers(optaplanner terms for VRP) unassigned? – Sachin Verma Aug 10 '17 at 11:47
  • add one more level to your bendable score and there's room for a medium like constraint. Indeed nullable doesn't work for vrp yet (7.1), but virtual vehicles should. – Geoffrey De Smet Aug 10 '17 at 15:08