OMD Go uses a cost function when estimating the fitness of a plan. This cost function considers a set of real-world constraints that reflect the quality of a plan. The term cost as such does not have a financial meaning (although theoretically possible), but rather a virtual cost or penalty that allows to compare one plan with another. In some cases, one might also want to refer to a fitness parameter or score.
p be a plan for the assignment of tasks to resources. The assignments result in trips, consisting of several stops, starting with a departure and an arrival. All other stops are visits to a client's site or other locatable activities. The total cost of a plan is the sum of the costs for each trip in the plan:
total cost(p) = sum(cost(each trip in p)) +
sum(cost(each unplanned task)).
The cost of a trip consists of the costs of each stop in the trip plus a cost for possible overtime (in case the trip is longer than the resource's working hours):
sum(cost(each stop in trip)) +
The fact that a task is not planned yet is not considered a cost.
The overtime costs are calculated by comparing the (end) time of the arrival to the end time of the second last stop. In case they are subsequent in time, no costs are applied. Otherwise, the time difference (in minutes) is multiplied with the overtime factor. The overtime factor defaults to 1 and can be influenced in the settings:
overtime(trip) = (time(arrival) > time(second last stop)) ? 0 : (time(second last stop) - time(arrival)) * overtime factor
During assignment of a task, overtime is limited by the maximum overtime parameter. If this parameter is exceeded, the task will not be considered as an option. During planning, this parameter is considered a hard restriction.
The amount of time of the available standard working hours of a resource can be limited to a certain percentage. The
MaxWorkload parameter indicates this percentage. The value may be higher than 100 to indicate that overtime is accepted. The workload is based on the sum of all stop durations in a trip. During planning, this parameter is considered a hard restriction.
Travel Time and Travel Distance
In general, each stop adds a cost to the plan that is relative to the travel time (in minutes) and distance (in kilometers) to reach the location of the next stop:
cost(stop) = (travel time(stop) * travelTime + travel distance(stop) * travelDistance + overlap(stop)
where the duration of an unplanned task is not considered during the cost calculation.
A possible time overlap with the next stop (including the second last stop that might overlap with the arrival) results in additional costs. The overlap in (minutes) is multiplied with the Overlap factor and is added to the total cost of a trip:
overlap(stop) = (time(stop) + travel time(stop) < time(next stop)) ? 0 : time(stop) + travel time(stop) - time(next stop)
Task Too Early and Task Too Late
Different stop types may have different cost parameters. For example, visits are bound to certain time limits,
called _earliest and
Scheduler tries to place the
task between these boundaries. In case this is not possible, the visit will exceed one of these boundaries which will provoke additional costs. The costs for an excess of the boundaries are calculated as follows:
excess costs(stop) =
excess earliest(stop) +
excess latest(stop) where excess earliest(stop) =
TaskTooEarly : 0 and excess
TaskTooLate : 0
Whenever a task is plannable between a earliest and latest boundary, there is usually a certain point that would be the best point for insertion. Imagine a regular
task that is to be scheduled every seven weeks. Each single task will have an earliest and a latest, but getting close to the boundaries is not favorable, since the repetitive series will result in too short or too long time differences between the tasks.
The best option to schedule the task would be at a certain point between
latest, for example, in the sixth week. We therefore define a parameter called
best age which is the percentage of the
latest-earliest range where the task is preferably planned. In our example above, this would be 6/7 = 86%.
Any scheduling before that point would result in larger costs, any scheduling beyond this point will also result in additional costs. The absolute cost is called
Fixed, representing the cost that is applied whenever the task is scheduled at exactly one of the boundaries.
If planned at the best age, the cost is zero.
The best starting time for a task is calculated by the following formula:
best start(task) = earliest(task) + (latest(task) - earliest(task) * BestAge_ /100.
BestAge to 0% indicates that the task should be planned as early as possible. Setting
BestAge to 100% indicates that the task should be planned as late as possible. Costs planning outside of the
earliest/latest boundaries is reflected by the
TaskTooLate parameters. In that case, the
Fixed_ parameters are not applied. The
BestAge cost is only considered if the
Fixed value is not 0.
Skills and Skill Levels
Whenever a task requires a certain skill, OMD Go only considers those resources that have this skill assigned. Resources may have different skill levels attached to the skill itself. For example, one resource is an expert for one particular machine. Another resource is recently trained and is only considered as a
trainee. It is expected that the
trainee will perform the task in a longer time that the expert.
A mismatch of skills may result in a very high penalty/cost. A skill level mismatch may result in lower but still considerable costs.
skill cost(visit) = skill level cost(visit) + (supports skill(resource, skill(visit))) ? 0 : skillMismatch
skill level cost(visit) = skill level too low cost(visit) + skill level too high cost(visit)
skill level too high cost(visit) = (skill level(resource, skill (visit)) > skill level(visit)) ? _skillLevelTooHigh * skill level(resource, skill (visit)) - skill level(visit)) : 0
skill level too low cost(visit) = (skill level(resource, skill (visit)) < skill level(visit)) ? skillLevelTooLow * skill level(resource, skill (visit)) - skill level(visit)) : 0
This parameter is only applicable when the
useSkills preference is selected.
Preferred Resources and Backup Resources
Service tasks may have preferred resources assigned. This is to increase the customer loyalty towards a constant service representative and to limit costs during the travel to unknown sites. In case the preferred resource is not available or the costs to let this resource perform the task is too high, the backup resource may perform the task. In case the backup resource is not available or the costs are too high, another resource needs to perform the task. The
preferred mismatch cost and the
backup mismatch cost factors indicate the costs that need to be calculated when a task is not performed by a requested resource.
preferred resource cost(visit) = (resource(visit) = preferred resource(task(visit))) ? 0 : preferred mismatch cost + backup resource cost(visit) and backup resource cost(visit) = (resource(visit) = backup resource(task(visit))) ? 0 : backup mismatch cost
Costs may occur whenever a task is planned outside of the customer's opening hours. Starting the service outside opening hours is prohibitive.
Although in some cases the resource may start the task within the opening hours, it may be possible to extend the service beyond the opening hours.
endsOutsideOpeningHours factor and
startsOutsideOpeningHours factor reflect the costs that are applied whenever visiting a customer outside the opening hours of that day.
opening hours cost(visit) = (starts during opening hours(start(visit), day(visit))) ? opening hours excess cost(visit) : startsOutsideOpeningHours
opening hours excess cost(visit) = (ends during opening hours(end(visit), day(visit))) ? 0 : (end(visit) - end(opening hour(visit)) * endOutsideOpeningHours
This parameter is only valid if the
useOpening Hours preference is selected.
Planned Shift Duration
This is particularly useful with opening hours to plan visits rather in the morning than in the afternoon since the costs for a visit later in the afternoon results in a long shift duration. The planned
shift duration is calculated as the amount of minutes from the departure of a trip to the last visit for that day. Each minute of the planned shift duration is multiplied with the
Excessive Weight and Volume
Each resource has a default maximum weight and volume it can carry (in a car or a truck). Any weight or volume surplus results in additional costs as defined by the
ExcessiveVolume parameters. The parameter is only applicable if the
use Weight and
use Volume preferences are selected.