• No se han encontrado resultados

EL CONTRATO DE FLETAMENTO Y SU RELACIÓN CON EL CONTRATO DE

The constraint is defined to guarantee that visiting durations are placed during a workforce shift. Each worker k has a shift defined by the earliest working

time αkL and the latest working time αkU. Generally, all assignments must take

place within that shift or working time. However, some cases might allow as- signments outside working shift but these are less preferred.

Table 2.11 presents mathematical formulations implemented to tackle time availability constraints. We found that only ODS-HHC implements this con- straint as a soft condition. To implement this requirement, ODS-HHC has ad-

ditional variables ηkL and ηUk as actual earliest working time and latest working

time respectively. Thus, arrival time must be within the duration [ηkL, ηUk]. It

also introduces s3k and s4k as positive variables to measure difference between

actual working shift and defined working shift. As such, s3kαkLηLk and

s4k =ηUk −αkU. Additionally, overtime Okis a duration that exceeds the allowed

working limit hk. Hence, the overtime can be calculated from Ok ≥ηUk −ηKL −hk

where Okis a variable to be minimised.

straint. It tackles the case as a hard constraint, i.e. a visit j to be allocated

outside a worker shift has ηkj = 0 to enforce the solver to select other work-

ers who are available where ηkj = 1. This formulation cannot apply directly to

the time window problem because a visit time window might partially over-

lap with workforce unavailable period. Therefore, a deterministic ηkj cannot be

determined.

The other models consider this requirement as a hard constraint, where as- signed time must be allocated only within shift duration. The constraint is simply expressed as

αkL ≤ ˜akjαkUδj

However, not all arrival times can be applied by this constraint. Let us con-

sider the models VRS-TPS and HCS-PCD, an arrival time ˜akj must be within

a visit time window when an assignment is made xi,jk = 1 which result in

wLj ≤ ˜akj ≤ wUj . By assuming αkL ≤ wLj ≤ wUjαkU, we can see that ˜akj is

valid in both constraints. However, if a visit j is not assigned to a worker k,

then ˜akj = 0. Thus, the value will contradict this constraint because ˜akj may be

less than αkL if αkL >0. To fix this issue, VRS-TPS and HCS-PCD only apply this

constraint to arrival times at the depot only.

On the other hand, MAP-TTC uses integer variables xki,j to control this con-

straint. The constraint will active only when xki,j = 1, otherwise the left hand

side of the inequality will always less than akj because M is a big constant value.

In addition, it is sufficient to apply this constraint only for the start and the end nodes because visits in between will have visiting arrival time after the first visit but before the last visit.

The workforce time availability constraints act similarly as the visit time window in the way that visiting arrival time must be made within a certain time frame. In some cases, the workforce time availability constraint might con-

Table 2.11:Workforce time availability implemented by five mathematical models.

Workforce time availability

ODS-HHC Hard and soft constraints for time availability and overtime duration which need to be minimised.

Soft constraint: ηkL+ti,j−M(1−xi,jk ) ≤ ˜akj ∀j∈ T, i∈ D,∀k∈K

˜akj +tj,i+δj−M(1−xkj,i) ≤ηUk ∀j∈ T, i ∈ D0,∀k∈

K

s3kαkLηLk s4kηkUαkU Soft cons. obj.

k∈K s3k+s4k s3, s4≥0 Overtime const Ok ≥ηUk −ηkL−hk Overtime obj.

k∈K Ok , Ok ≥0∀k∈K

NB-TCS See NB-TCS assignment constraint.

VRS-TPS Time from the starting node and ending node are within the time availability restriction.

Hard constraint: αkL≤ ˜akjαkUδj ∀k ∈K,∀j∈ D∪D0

MAP-TTC First and last visits must lie between worker’s time availability. Hard constraint: αkL+t0,j−M(1−xk0,j) ≤akj

aki +δi+ti,0−M(1−xki,0) ≤αkU

HCS-PCD Last visit must finish in between workforce time availability. Hard constraint: αkL≤ ˜a0k ≤αkUδj

flict with the visiting time window constraints, for example, a workforce avail- able only in the afternoon but a visit required to be made during the morning. Therefore, either workforce time availability constraint or visiting time win- dow constraint must be implemented as soft conditions to prevent constraint conflicts. The choice to be made depends on the nature of business. In some case, such as broadband companies, they might prefer to have soft conditions at visiting time window constraints rather than the workforce time availabil- ity constraint. On the other hand, a home healthcare business might prefer to soften the workforce time availability conditions because some visits are highly time dependent.

In our implementation, we apply the workforce time availability as a soft condition. We adapt the constraint in ODS-HHC by adding decision variables to add violation costs in the objective function (more detail in Section 2.4.8.