Jan Paralic Julius Csont6 Milan Schmotzer Department of Cybernetics and Artificial Intelligence Technical University of Kosice Kosice, Slovak Republic E-mail: Jan.Paralic@tuke.sk UDC: 007.52 Original Scientific Paper Optimal Scheduling Using Constraint Logic Programming In this paper a methodology to solve scheduling applications (e.g. job-shop) using constraint logic programming (CLP) is presented. Firstly, the CLP problem definition is briefly described. Secondly, a new strategy for finding optimal solution is presented. New strategy consists of three steps. (1) A heuristic capable tofind an initial solution of good quality very quickly (upper bound). (2) A heuristic to find a good lower for optimisation. (3) An effective strategy for finding the optimal solution within a minimal number of steps. The results achieved using this methodology on a set of randomly generated job-shop problems are presented. Keywords: constraint logic programming, optimisation, scheduling, job-shop. 1.Introduction Constraint logic programming (Jaffar and Lassez, 1987) is a declarative programming paradigm derived from logic programming (PROLOG is the most important representative of the logic programming languages). CLP is particularly useful for solving constraint satisfaction problems, which are formulated as a set of variables and constraints between these variables. The goal is to find such an assignment of values to variables that none of the constraints is violated. In addition, there can be defined a cost function which has to be optimised in the final solution. Typical representative of this class of problems are scheduling applications (e.g. job- shop). CLP serves powerful tools to handle this kind of problems. Constraints are used actively to prune the search space in an a priori way. Moreover, there are tools to define new constraints and way how the constraints are to be handled by the user. Optimisation is supported as well by predicates which implement the branch and bound strategy. By this strategy often a large number of iterations are needed to find an optimal solution. In this paper a better strategy is presented and the results achieved by solving randomly generated job-shop scheduling problems are shown. The rest of this paper is organised as follows. In the next section, the CLP problem definition is briefly described on the job-shop scheduling example. Traditional