Вы находитесь на странице: 1из 44

Lecture 7

Resource Allocation Proble


ms and Decisions
SEEM 4670 Service Systems
Spring, 2017

1
Resource Allocation Problem
s
Services are actions or activities that are performed fo
r people.
Supplies of resources (e.g., service agents and machine
s) are necessary in most of the applications.
The demands of the customers or tasks have to be sati
sfied by the services provided by the resources.
Examples:
Allocation of gates to aircrafts
Allocation of loads to trucks
Allocation of lecture theatres to classes
Allocation of operating rooms to patients
Allocation of service agents to locations / tasks 2
Allocation of customer representatives to customers
Characteristics of Resource Al
location Problems
Depending on the application, there may be the following concer
ns when making resource allocation decisions:
Demands required at different time periods
Resource availability
Skill types
Skill levels
Time windows
Preference
Workload
Fairness
Locations
Relief breaks
There does not exist a single model that can be applied for all res
3
ource allocation problems. We need to think very carefully about
the problem characteristics and choose the best model to repres
ent the problem, or even build our own model.
Why using Optimization for R
esource Allocation?
Resource allocation can involve various features and can
be highly complicated. Even a feasible solution is not ea
sy to obtain.
Optimality is guaranteed. e.g., Resources can be well-util
ized.
Resource allocation decisions can be automated. This sa
ves many labor hours for working out the decisions man
ually.
Reallocation of resources can be done in a much faster f
ashion in case of any unexpected problem.
Subjective and biased allocation decisions are avoided.
Human errors can be avoided. 4
Basic Resource Allocation Mod
el
basic resource allocation model serves as the basis for the di
The
fferent types of resource allocation problems. It has the followin
g characteristics:
There are a set of resources and a set of customers (or tasks) .
There is a penalty associated with the assignment of resource t
o customer , denoted by . This penalty represents the degree of
inappropriateness of the assignment (e.g., skill mismatch, disfa
vored assignment). The higher the value, the more inappropria
te it is. If the assignment is not permitted, we can set the penal
ty to a very large number. A parameter is used to indicate if th
e assignment of resource to customer is permitted.
For each customer , there is a minimum number of resources r
equired .
Fore each resource , there is a maximum number of customers 5
that can be assigned .
Basic Resource Allocation Mod
el

The decision variables are , where is 1 if resource is alloca
ted to customer ; 0 otherwise.
The model is as follows:

s.t.

The objective is to minimize the sum of all penalties for ass


ignments.
The first constraint ensures that there are sufficient resour
ces allocated to each customer.
The second constraint ensures that the number of custom 6
ers assigned to each resource does not exceed the limit.
Basic Resource Allocation Mod
el
Example:
Ashley, Jacquie, Keren, Sarah, and Tamar are executive committ
ee members of the student union. On each weekday, there sho
uld be at least two people on-duty at their office. They have dec
ided to have two shifts each day: morning and afternoon. Each
of them should take no more than 4 shifts. Since they have diff
erent class schedules, they have stated their preferences using
ranking scores for the shifts. The lower the score, the higher th
e preference is. If no score is provided for the shift, that means
the student is not available for the shift.
Wednesd
Monday Tuesday ay Thursday Friday
Name AM PM AM PM AM PM AM PM AM PM
Ashley 1 2 3 4 5
7
Jacquie 5 1 2 3 4
Keren should the allocations be?
What 4 5 1 2 3
Sarah 3 4 5 1 2
Basic Resource Allocation Mod
el
Example [cont.]
The goal is to minimize the total ranking score.
To penalize the undesirable assignments (i.e., the shifts t
hat the students do not prefer), we use a ranking score
of 10,000 to penalize such assignments.
Please refer to the worksheet FeasibleAllocation in Le
cture7-BasicAllocationModel.xlsx for the calculations.

8
Basic Resource Allocation Mod
el
Example [cont.]

9
Basic Resource Allocation Mod
el
Example [cont.]

The minimum total ranking score is 56 and the optimal assign


ment is as follows (1 if assigned, 0 otherwise).

Monday Tuesday Wednesday Thursday Friday


Name AM PM AM PM AM PM AM PM AM PM
Ashley 1 0 1 1 1 0 0 0 0 0 10
Jacquie 0 1 1 1 1 0 0 0 0 0
Keren 0 0 0 0 0 1 0 1 1 1
Sarah 0 0 0 0 0 0 1 1 1 1
Tamar 1 1 0 0 0 1 1 0 0 0
Handling Infeasibility
Example [cont.]
Suppose that Tamar just realized that she has made a mistak
e when filling out the preferences and has revised the table.
The updated ranking score is as follows.
Wednesd
Monday Tuesday ay Thursday Friday
Name AM PM AM PM AM PM AM PM AM PM
Ashley 1 2 3 4 5
Jacquie 5 1 2 3 4
Keren 4 5 1 2 3
We solve the problem again and Excel Solver Add-in returns
Sarah 3 4 5 1 2
a message reporting problem infeasibility.
Tamar 2 3 4 1 5
This implies that there does not exist any solution that assig
ns the students only to their available shifts, ensures there a 11
re sufficient people on-duty, and avoids extra workload.
Handling Infeasibility
Example [cont.]
In this case, there are three ways to resolve the probl
em infeasibility:
Assignments of students to their unavailable shifts
Shortfalls in the number of people on-duty (i.e., so
me shift having less than 2 people on-duty)
Overallocation (i.e., some person having more than
4 shifts a week)

We slightly modify the model to allow some infeasibil


ity, though not preferable. 12
Handling Infeasibility
the decision variables be the shortfall in resources for
Let
customer (or task) and be the amount of workload overal
located for resource . The shortfalls and overallocations ar
e penalized by and respectively.

The model that can handle infeasibility is as follows:

s.t.

13
Handling Infeasibility

Among the three ways of eliminating the problem in
feasibility, which one is the most acceptable?
If assignments of students to their unavailable shift
s are the most acceptable, then .
If shortfalls in the number of people on-duty are th
e most acceptable, then .
If overallocation is the most acceptable, then .

14
Handling Infeasibility
Example
[cont.]
Suppose that assignments of students to their unavailab
le shifts are the most acceptable among the three ways
of eliminating the problem infeasibility. For example, we
can choose if student is unavailable for shift , , .

15
Handling Infeasibility
Example [cont.]

16
Handling Infeasibility
Example [cont.]
The minimum total ranking score is 149 and the opt
imal assignment is as follows (1 if assigned, 0 other
wise). Assignment
Wednesda
Monday Tuesday y Thursday Friday
Extra
Name AM PM AM PM AM PM AM PM AM PM workload
Ashley 1 1 1 0 1 0 0 0 0 0 0
Jacquie 0 1 1 1 1 0 0 0 0 0 0
Keren 0 0 0 0 0 1 0 1 1 1 0
Sarah 0 0 0 0 0 1 1 0 1 1 0
Tamar 1 0 0 1 0 0 1 1 0 0 0
Shortfall 0 0 0 0 0 0 0 0 0 0
17
Note that Tamar is still assigned to Thursday PM, th
ough she is unavailable.
Handling Infeasibility

Example [cont.]
Suppose that shortfalls in the number of people on-duty are the most
acceptable. For example, we can choose if student is unavailable for s
hift , , .
The minimum total ranking score is 149 and the optimal assignment is
as follows (1 if assigned, 0 otherwise).
Assignment
Monday Tuesday Wednesday Thursday Friday
Extra
Name AM PM AM PM AM PM AM PM AM PM Workload
Ashley 1 1 1 0 1 0 0 0 0 0 0
Jacquie 0 1 1 1 1 0 0 0 0 0 0
Keren 0 0 0 0 0 1 0 1 1 1 0
Sarah 0 0 0 0 0 1 1 0 1 1 0
Tamar 1 0 0 1 0 0 1 0 0 0 0 18
Shortfa
llNote that
0 on0 Thursday
0 PM,
there
0 0 is a 0shortfall
0 of1 one0person.
0 Only one
person is on-duty on that day.
Handling Infeasibility

Example [cont.]
Suppose that extra workload is the most acceptable. For
example, we can choose if student is unavailable for s
hift , , .
The minimum total ranking score is 154 and the optimal
assignment is as follows (1 if assigned, 0 otherwise).
Assignment
Monday Tuesday Wednesday Thursday Friday
Extra
Name AM PM AM PM AM PM AM PM AM PM Workload
Ashley 1 1 1 0 1 0 0 0 0 0 0
Jacquie 0 1 1 1 1 0 0 0 0 0 0
Keren 0 0 0 0 0 1 0 1 1 1 0
Sarah 0 0 0 0 0 1 1 1 1 1 1
Note 1that Sarah
Tamar 0 0will have
1 to0take 0an additional
1 0 shift.
0 0 0
19

Shortfall 0 0 0 0 0 0 0 0 0 0
Conflicting Assignments
In
resource allocation problems, there are often some c
onflicts between assignments. For example, a resourc
e has a capacity of one is not able to perform two tasks
simultaneously.
In such situation, if tasks and cannot be simultaneously
assigned to the same resource, we have the following co
nstraints:

The above constraints ensure that for each resource, the


re can be at most one assignment among tasks and .

20
Conflicting Assignments
Example
An airline operates more than 100 international flights and
has 100 gate agents serving passengers every day.
Each flight agent has to work for a 9-hour shift and the mai
n duties are to perform tasks relevant to boarding at the bo
arding gates of the departing flights.
For serving each flight, the assigned agents are expected to
be present at the boarding gate 45 minutes before the sche
duled flight departure time and to stay until 15 minutes afte
r the flight departs.
The airline wishes to have at 4 agents to serve passengers a
t each boarding gate. They understand that there may be in 21
sufficient agents and shortfalls may occur, but expect there
must be at least two agents to perform the tasks.
Conflicting Assignments
Example[Cont]
To enhance the service quality, the airline wishes that th
e agents to be assigned to each gate should be able to s
peak the language of the flight destination.
Since the majority of flights fly to cities in Asia, they now
consider three major languages of their passengers M
andarin, Japanese, and Korean when allocating gate ag
ents. Since every agent is fluent in English, the language
requirement for English is always satisfied for any gate a
gent.
The information about the flights and agents schedules
is available on the worksheet Flights in the workbook
22
Lecture7-GateAgentAllocation.xlsm.
Conflicting Assignments
Example [Cont]

23
Conflicting Assignments
Example [Cont]
This problem has several characteristics:
1. It is preferable to have gate agents who can speak the required lang
uages. A higher penalty will be given when the agent does not spea
k the language. In our example, we set the penalty for a language m
ismatch to 10, and the penalty for a suitable assignment to 1.
2. Shortfalls may occur but should be avoided. In this example, we set
the penalty for a shortage of an agent to 100. We also impose a con
dition that at each boarding gate the shortfall should be less than 2.
3. There is no limit on the number of assignments for each gate agent
in this case. The associated workload constraints are dropped.
4. Each gate agent can be allocated to the task only if the duration of t
he task is within his/her shift. In this example, we set the penalty fo
r assigning an agent to a task out of his/her shift to 10000. 24
5. Each task has specific start time and end time. Each gate agent can
only be assigned at most one task at any time.
Conflicting Assignments
Example
[Cont]
For handling the conflicting assignments in this example
, we consider the start time and end time of task .
If for and , , i.e., the two tasks overlap in time, then ther
e is the following constraint:

time


25
Conflicting Assignments

Example [Cont]
With the same notation introduced in the basic resource all
ocation model, a model that captures the characteristics of
the gate agent allocation problem is as follows:

s.t.
with

where is the maximum allowable shortfall in agents for task


.
To solve the above problem, we adopt VBA and IBM ILOG C 26
PLEX.
Conflicting Assignments
Example [Cont]
To use the IBM ILOG CPLEX solver on Excel, open the Excel file and g
o to Lock Disk (C:) -> Program Files [note the bits of your version] -> I
BM -> ILOG -> CPLEX_Studio [the latest version] -> cplex -> excel. Dou
ble click cplex[the latest version].xll.
To use the functions of the IBM ILOG CPLEX solver on VBA, open VBA
on Excel -> File -> Import File.

Go to Lock Disk (C:) -> Program Files [note the bits of your version] ->
IBM -> ILOG -> CPLEX_Studio [the latest version] -> cplex -> excel and 27
import the file cplexvba.bas.
You can see the module of cplexvba and the codes that enable you
to use their functions on VBA.
Conflicting Assignments
Example [Cont]

28
Conflicting Assignments
Example [Cont]

29
Conflicting Assignments
Example [Cont]

30
Conflicting Assignments
Example [Cont]

31
Conflicting Assignments
Example [Cont]

32
Conflicting Assignments
Example [Cont]

33
Conflicting Assignments
Example [Cont]

34
Conflicting Assignments
Example [Cont]

35
Conflicting Assignments
Example [Cont]
Optimal Allocations:

Check if the agents are allocated only to tasks within their shifts?
Are the shortfalls avoided as possible?
Does the solution tend to assign the right agents who can speak t 36
he required language to each boarding gate?
Workload Balance
Revisit the solution for the gate agent allocation proble
m.
We observe that Agents 76 and 79 have 5 tasks assigned
, while Agents 71 and 75 have only 2 tasks assigned.
The agents who speak multiple languages tend to be ass
igned more tasks than those who speak only one.
Workload imbalance can degrade service quality and infl
uence the fairness of the allocation decisions (which can
result in job dissatisfaction and losses of staff). Therefor
e workload balance in some applications is an importa
nt concern when allocating the resources.
By workload balance, we mean that the workload of eac 37
h resource should be similar, if not the same.
Workload Balance
Example
An online grocery shopping delivery company has 5 warehouses in tot
al, in the districts of Islands, Eastern Hong Kong Island, Kwun Tong, Yu
en Long, and Tai Po.
The company wishes to assign the whole population of Hong Kong, w
ho are their existing and potential customers, to the 5 warehouses. Th
at is, if there is an order placed, the warehouse that is assigned to the
customer is responsible for the delivery of the ordered items.
In order to reduce the transportation cost, the company wishes to mi
nimize the demand-weighted total distance.
In addition, the company also wishes that the populations assigned to
the warehouses should be similar so that the delivery process can be
more efficient. It is allowed that population in a district is partially ass
igned to a warehouse. That is, in the same district, some population c
an be assigned to a warehouse while some can be assigned to anothe 38
r.
What are the populations assigned to the 5 warehouses?
Workload Balance

Example [Cont]
This problem has several characteristics:
There are a set of warehouses and a set of districts .
Each district has a population of .
There is a distance between warehouse and district , whic
h is denoted by .
The demand-weighted total distance should be minimized.
The total population assigned to each warehouse should b
e similar. In this example, we minimize the range in the ass
igned population across all warehouses.
Let the decision variables be the population of district t
hat is assigned to warehouse , be the maximum popula
39
tion assigned to any warehouse, and be the minimum p
opulation assigned to any warehouse.
Workload Balance

Example[Cont]
The model is as follows.

s.t.

where is the cost to penalize the range in the assigned populatio


n across all warehouses.
The objective is to minimize the weighted sum of the demand-w
eighted total distance and the range in the assigned population.
The first constraint ensures that the total population of each dis
trict is fully assigned to the warehouses. 40
The second and third constraints measure the maximum and m
inimum assigned populations across all warehouses.
Workload Balance
Example[Cont]
Please refer to the file Lecture7-Workload.xlsx for the in
puts and calculations.

41
Workload Balance
Example[Cont]

42
Workload Balance
Example[Cont]

Suppose that we set . The population of each district will
be assigned to its closest warehouse. However, the pop
ulation assigned to the warehouse in Kwun Tong is 3,42
0,700 while the population assigned to the warehouse in
the district of Islands is 144,500. The assignments of po
pulations to the warehouses are significantly imbalance
d.
If we set , the maximum assigned population across the
warehouses is 1,708,800 and the minimum is 948,000. A
lthough the difference is still significant, the difference is
much smaller compared with the case of .
43
Discussion on Resource Allocation Decision
s
It is impossible to use a single model to apply for all res
ource allocation problems.
Every problem has its own characteristics. Even for the s
ame application, say gate agent allocation problem, the
models can be different from company to company (or f
rom organization to organization).
A good way to develop a resource allocation model is to
think carefully about the problem characteristics and th
e objective. In this lecture, we discussed some techniqu
es to model several problem characteristics.
Some concerns may be missed when developing a mode
l. Studying the solutions produced is helpful for refining
44
the model.

Вам также может понравиться