////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////

[[taskAssigning]]
= Task assigning
:imagesdir: ../..


[[taskAssigningProblemDescription]]
== Problem description

Assign each task to a spot in an employee's queue.
Each task has a duration which is affected by the employee's affinity level with the task's customer.

Hard constraints:

* Skill: Each task requires one or more skills. The employee must possess all these skills.

Soft level 0 constraints:

* Critical tasks: Complete critical tasks first, sooner than major and minor tasks.

Soft level 1 constraints:

* Minimize makespan: Reduce the time to complete all tasks.
** Start with the longest working employee first, then the second longest working employee and so forth, to create xref:score-calculation/score-calculation.adoc#fairnessScoreConstraints[fairness and load balancing].

Soft level 2 constraints:

* Major tasks: Complete major tasks as soon as possible, sooner than minor tasks.

Soft level 3 constraints:

* Minor tasks: Complete minor tasks as soon as possible.


[[taskAssigningValueProposition]]
== Value proposition

image::use-cases-and-examples/task-assigning/taskAssigningValueProposition.png[align="center"]


[[taskAssigningProblemSize]]
== Problem size

[source,options="nowrap"]
----
24tasks-8employees   has  24 tasks, 6 skills,  8 employees,   4 task types and  4 customers with a search space of   10^30.
50tasks-5employees   has  50 tasks, 5 skills,  5 employees,  10 task types and 10 customers with a search space of   10^69.
100tasks-5employees  has 100 tasks, 5 skills,  5 employees,  20 task types and 15 customers with a search space of  10^164.
500tasks-20employees has 500 tasks, 6 skills, 20 employees, 100 task types and 60 customers with a search space of 10^1168.
----


[[taskAssigningDomainModel]]
== Domain model

image::use-cases-and-examples/task-assigning/taskAssigningClassDiagram.png[align="center"]
