1 Introduction

The generalized assignment problem (GAP) is the problem of assigning n jobs to m agents such that total cost is minimal and that each job is assigned to exactly one agent and agent’s capacity is also satisfied. GAP is NP hard and has had many approaches being proposed in the past 50 years. The GAP model is the general case of the assignment problem in which both jobs and agents have an equal size and the cost associated with each job-agent combination may have different values. GAP has many applications in real life and these include vehicle routing: Toth and Vigo (2001), resource allocation: Winston and Venkataramanan (2003), supply chain: Yagiura (2004, 2006), machine scheduling and location among others. It is because of these important applications that so many exact and inexact methods have been proposed. The exact approaches that were developed include methods by: Ross and Soland (1975); Martello and Toth (1981); Fisher et al. (1986); Guignard and Rosenwein (1989); Karabakal et al. (1992); Savelsburgh (1997) and Pigatti et al. (2005). An inexact method or heuristic is a method that gives a highly accurate but not necessarily optimal solution. Some of the heuristics for the GAP were developed by: Laguna et al. (1995); Osman (1995); Chu and Beasley (1997); Asahiro et al. (2003); Nauss (2003) and Yagiura et al. (1998). Note that: Nauss (2003) presented both a heuristic and an optimizing approach.

In this paper we propose a transportation branch and bound algorithm for solving the GAP. This is a branch and bound technique in which the sub-problems are solved by use of the available efficient transportation techniques rather than the usual simplex based approaches. A technique for selecting branching variables so as to minimize sub-problems is also presented.

2 Generalized assignment problem

A mathematical formulation of the GAP may be represented as shown in Eq. (1).

$$ \left. \begin{aligned} Z_{GAP} = \,{\text{Minimize}}\,\sum\limits_{i}^{m} {\sum\limits_{j}^{n} {c_{ij} x_{ij} } } \\ {\text{Subject to}} \,\sum\limits_{j}^{n} {r_{ij} x_{ij} \le b_{i} } ,\forall i \\ & \quad \quad \quad \quad \sum\limits_{i}^{m} {x_{ij} = 1} ,\forall j \\ \end{aligned} \right\} $$
(1)

where x ij  = 0 or 1, (i = 1, 2,…,m) is a set of agents, (j = 1,2,…,n) is a set of jobs, c ij is the cost of assigning agent i to job j, r ij is the resource needed by agent i to do job j, b i is the resource available to agent i.

3 Relaxing the GAP

The GAP can be relaxed to become an ordinary transportation problem. A transportation model is easy to handle and efficient solution methods such as network approaches are available. This type of relaxation was proposed by Munapo et al. (2010).

3.1 Relaxing the model

Some of the GAP constraints representing resource restrictions are given in Eq. (2),

$$ \sum\limits_{j}^{n} {r_{ij} x_{ij} \le b_{i} } ,\forall i $$
(2)

The GAP model can be relaxed by replacing these constraints with other forms of inequalities given in Eq. (3).

$$ \sum\limits_{j}^{n} {x_{ij} \le \gamma_{i} } ,\forall i. $$
(3)

Thus the model becomes a transportation model as presented in Eq. (4).

$$ \left. \begin{gathered} {\text{Minimize}}\,\sum\limits_{i}^{m} {\sum\limits_{j}^{n} {c_{ij} x_{ij} } } \hfill \\ {\text{Subject to}} \,\sum\limits_{j}^{n} {x_{ij} \le \gamma_{i} } ,\forall i \hfill \\ \quad \quad \quad \quad \sum\limits_{i}^{m} {x_{ij} = 1} ,\forall j \hfill \\ \end{gathered} \right\} $$
(4)

where γ i is obtained by solving the knapsack problem in Eq. (5).

$$ \begin{gathered} \gamma_{i}= {\text{Maximize}}\,\sum\limits_{j}^{n} {{\text{x}}_{ij} } \hfill \\ {\text{Subject to }}\,\sum\limits_{j}^{n} {{\text{r}}_{{_{ij} }} {\text{x}}_{ij} \le {\text{b}}_{i} } \hfill \\ \quad \quad \quad \quad {\text{x}}_{ij} { = 0}\,{\text{or}}\, 1\hfill \\ \end{gathered} $$
(5)

The optimal solution to this knapsack problem (5) is readily available.

3.2 Solving the knapsack problem

The optimal solution to the knapsack solution can be obtained by arranging the resource coefficients in row i in ascending order i.e.,

$$ r^{\prime}_{i1} ,r^{\prime}_{i2} , \ldots ,r^{\prime}_{in} $$
(6)

where

$$ r^{\prime}_{i1} \le r^{\prime}_{i2} \le \ldots \le r^{\prime}_{{i\gamma_{i} }} < \ldots < r^{\prime}_{in} $$
(7)

are the arranged coefficients. The knapsack objective value γ i , is the largest integral value such that

$$ b_{i} \ge r^{\prime}_{i1} + r^{\prime}_{i2} + \ldots + r^{\prime}_{{i\gamma_{i} }} $$
(8)

where,\( 1 \le \gamma_{i} \le n. \) The integral value γ i is now the supply in the transportation model.

4 The transportation model

The optimal solution to the transportation model will act as a lower bound to the GAP and is usually infeasible to the original GAP model. The relaxed problem is shown in Table 1.

Table 1 Transportation problem

This transportation problem is not a balanced model. In most cases

$$ \sum\limits_{i}^{m} {\gamma_{i} } \ne n $$
(9)
$$ {\text{If}}\,\sum\limits_{i}^{m} {\gamma_{i} } < n $$
(10)

Then Eq. (1) is infeasible i.e., at least one of constraints, \( \sum\limits_{i}^{m} {x_{ij} = 1} , \) is violated.

$$ {\text{If}}\,\sum\limits_{i}^{m} {\gamma_{i} } = n $$
(11)

Then the relaxed model can be solved directly without balancing. The solution to the relaxation is optimal if it satisfies Eq. (1).

$$ {\text{If}}\,\sum\limits_{i}^{m} {\gamma_{i} } > n $$
(12)

Then the relaxed model requires balancing before applying transportation techniques. To balance the transportation problem, a dummy column is added when we have inequality Eq. (12) of the form > type. When the transportation is balanced then the optimal solution can be found by using network codes for transportation models. These are efficient and recommended and the sub-problems are not solved from scratch. The current solutions are used as starting solutions in the next iterations. Lagrangian or linear programming (LP) relaxations are not readily useful to this procedure. With this approach it is only possible to branch if the relaxation gives an integer optimal solution and this is not possible with LP or Lagrangian relaxations.

4.1 Branch and Bound Approach

A branch and bound method can be used to ascend from the lower bound to an optimal solution of the GAP. The lower bound obtained by solving the relaxed model is usually infeasible to Eq. (1). A row i that is not feasible can be selected, a clique inequality generated and used to create branches.

4.2 Generating branching inequalities

Suppose from row i, the following variables are basic and they make up an infeasible solution

$$ x_{if1} ,x_{if2} , \ldots ,x_{ifl} $$
(13)
$$ r_{if1} + r_{if2} + \ldots + r_{if\ell } > b_{i} $$
(14)

where x ifj is basic variable and r ifj is its corresponding resource coefficient with j = 1,2,…l.

From the inequality given in Eq. (14), it implies that some of these basic variables are not supposed to be basic. One or more of these basic variables may not be the required basic feasible solutions and the exact number is only known for the specific given problem. Branching does not necessarily mean the transportation sub-problem has to be resolved from scratch. The sub-problem is solved by improving the current solution. The previous solution is used as a starting solution in the next iteration.

4.3 Order of branching

The order of branching is very important as it can affect the size of the search tree. Strategies are required to determine a branching order that results in the smallest search tree. In this paper it is recommended that branching starts with those rows that have the least number of choices. In other words the most restricted rows are used in creating branches: Kumar et al. (2007). Thus the branching starts with the most restricted row, which in this paper is defined as the row where the least number of branches can be generated.

5 Transportation branch and bound algorithm for GAP

The transportation branch and bound algorithm for the GAP consists of the following steps,

Step 1:

Relax GAP to obtain a lower bound.

Step 2:

Select the most restricted row to come up with branching variables.

Step 3:

Branch using the selected variables. Return to step 2 until the best transportation solution is feasible.

Best solution: A solution is said to be the best solution if it is the smallest optimal solution available.

5.1 Optimality

Suppose the terminal nodes are given in Eq. (15).

$$ Z_{1}^{T} {\mkern 1mu} Z_{2}^{T} \ldots {\mkern 1mu} Z_{\eta }^{T} $$
(15)

The upper bound is selected from the node giving best solution so far.

$$ Z_{GAP} = \hbox{min} [Z_{1}^{T} ,Z_{2}^{T} , \ldots {\mkern 1mu} ,Z_{\eta }^{T} ] $$
(16)

Thus Z GAP is optimal.In the branching tree, a node is said to be a terminal one if the

  • optimal solution to the transportation model is feasible to original GAP model,

  • transportation model does not have feasible optimal solution or

  • optimal solution to the transportation model is bigger than a given upper bound.

Note: Generation of clique inequalities and using them as cuts is not a new idea. Clique constraints used in this paper are in fact a simple type of knapsack constraints generated from single constraints of the original problem. Knapsack constraint generators are very common in modern MIP solvers. What is new is the fashion of using these inequalities to form branches and solving the sub-problems generated as transportation problems. This is effective for GAP models. Jumptracking is preferred in this procedure and branching is done on a node with the smallest objective value (Table 2).

Table 2 Transportation model for numerical illustration
Table 3 Balancing the transportation model (by adding a dummy column)

5.2 Numerical illustration

Use the transportation branch and bound algorithm to solve the following GAP model.

$$ \left. \begin{aligned} Z_{GAP} = \,&{\text{Minimize}}\,\,28x_{11} + 76x_{12} + 52x_{14} + 28x_{15} + 98x_{21} + 40x_{23} \hfill \\ &+ 92x_{24} + 98x_{25} + 90x_{32} + 32x_{33} + 20x_{34} \hfill \\ \end{aligned} \right\} $$
(17)
$$ {\text{Subject}}\,{\text{to:}}\left. \begin{gathered} \,24x_{11} + 38x_{12} + 22x_{14} + 36x_{15} \le 56;12x_{21} + 22x_{23} + 30x_{24} + 36x_{25} \le 56 \hfill \\ \,20x_{32} + 28x_{33} + 44x_{34} \le 56;\,x_{11} + x_{21} = 1;\,x_{12} + x_{32} = 1;x_{23} + x_{33} = 1; \hfill \\ \,x_{14} + x_{24} + x_{34} = 1;\,x_{15} + x_{25} = 1 ;\,x_{ij} = 0 \, or \, 1 \, \forall ij. \hfill \\ \end{gathered} \right\} $$
(18)
  • A terminal node is said to be feasible if the optimal solution to the transportation sub-problem is feasible to the original GAP problem.

  • A terminal node is said to be infeasible if the optimal solution to the transportation is infeasible to the GAP model.

  • DNE means the transportation sub-problem does not have a feasible optimal solution

  • The numbers in the circles denote the order of solution.

From the search tree given in Appendix Fig. 2, the optimal solution to the GAP problem is given as shown in Eq. (19)

$$ Z_{GAP} = \hbox{min} [Z_{1}^{T} ,Z_{2}^{T} ,Z_{3}^{T} ,Z_{4}^{T} ,Z_{5}^{T} ,Z_{6}^{T} ] = 300 $$
(19)

The optimal solution from (19) is given as:

$$ x_{11} = x_{14} = x_{25} = x_{32} = x_{33} = 1\quad x_{12} = x_{15} = x_{21} = x_{23} = x_{24} = x_{32} = x_{33} = x_{34} = 0 $$
(20)

For details, see the appendix to this paper.

6 Conclusions

The proposed approach has the advantage that the individual, γ i values can be found independently allowing the much needed use of parallel processors. The sub-problems resulting from the search trees are transportation models and can be solved efficiently by the available network approaches. The sub-problems that result from the usual branch and bound related approaches are NP hard integer models which are very difficult to solve. The only nuisance to this approach is that like the simplex based approaches it is also not spared by degeneracy. It may be desirable to use the approach discussed by the authors in an earlier publication (Munapo et al. 2012).

In the search tree diagram given in Appendix Fig. 2, it may be noted that there is no change in the objective value from node 4 to node 7. The degeneracy drawback can be alleviated by noting all alternate optimal solutions at every node and then branch in such a way that the objective value does not remain static.

Attempts will be made in future to use cuts in branching and compare its efficiency with the available approaches and explore for better strategies that can significantly improve the selection of branching variables.