Solving Nesting Problems with Non-Convex Polygons by Constraint Logic Programming * Maria Ant´onia Carravilla †‡ Cristina Ribeiro †‡ Jos´ e F. Oliveira †‡ Rua Dr. Roberto Frias s/n, 4250-465 Porto, Portugal {mac,mcr,jfo}@fe.up.pt Abstract In this paper an application of constraint logic programming (CLP) to the resolution of nesting problems is presented. Nesting problems are a special case of the cutting and packing problems, in which the pieces generally have non-convex shapes. Due to their combinatorial optimization nature, nesting problems have traditionally been tackled by heuristics and in the recent past by meta-heuristics. When trying to formulate nesting problems as linear programming models, to achieve global optimal solutions, the difficulty of dealing with the disjunction of constraints arises. On the contrary, CLP deals easily with this type of relationships among constraints. A CLP implementation for the nesting problem is described for convex and non-convex shapes. The concept of no-fit polygon is used to deal with the geometric constraints inherent to all cutting and packing problems. Computational results are presented. Keywords: packing, nesting, artificial intelligence, constraint logic pro- gramming 1 Introduction In the cutting and packing problems one or more pieces of material or space must be divided into smaller pieces. The minimisation of the waste is usually the main objective of these combinatorial optimisation problems. Figure 1 presents examples of cutting and packing problems of different dimensions. In the nesting problems only two dimensions, the length and the width, are relevant since the other dimension is common to all the pieces. Moreover * Partially supported by FCT, POSI and FEDER (POSI/33757/SRI/2000 (CLPnest)) † Faculty of Engineering of the University of Porto ‡ Institute of Computers and Systems Engineering – Porto 1