The Service Allocation Problem (SAP) is a tactical problem arising in the yard management of a container transshipment terminal. The objective is the minimization of the container rehandling operations inside the yard. This study of the SAP was undertaken for the Gioia Tauro port which is located in Italy and is the main hub terminal for container traffic in the Mediterranean Sea. The SAP can be formulated as a Generalized Quadratic Assignment Problem (GQAP) with side constraints. Two mixed integer linear programming formulations are presented. The first one exploits characteristics of the yard layout at Gioia Tauro where the berth and the corresponding yard positions extend along a line. The second formulation is an adaptation of a linearization for the GQAP. In both cases only small instances can be solved optimally. An evolutionary heuristic was therefore developed. For small size instances the heuristic always yields optimal solutions. For larger sizes it is always better than a...