In actual production, in order to improve production efficiency, workpieces are divided into different batch groups according to processing similarity, and different batch groups of workpieces need independent machine adjustment time when processing on a single machine. To solve this problem, taking the maximum delay of the order as the optimization goal, two solution models of 0-1 mixed integer programming and constraint programming are proposed, and the optimal solution of the two models at the scale of small and medium-sized problems is verified and compared by OPL Studio programming, and the simulation results show that the optimal solution obtained by using the constraint programming model is more effective, and the results can be used to verify the effectiveness of other heuristic algorithms.