Sachin Verma
Sachin Verma

Reputation: 3812

Optaplanner to have assignment Criteria

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.

Upvotes: 1

Views: 253

Answers (1)

Geoffrey De Smet
Geoffrey De Smet

Reputation: 27337

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.

Upvotes: 2

Related Questions