The application discloses an irregular rock three-dimensional packing optimization method based on a partial random key
genetic algorithm, and relates to the technical field of packing optimization, and particularly relates to a method for packing irregular rocks in a limited container. The method comprises the following steps: visual sampling and three-dimensional reconstruction are performed on rock samples; a grid model is processed; the partial random key
genetic algorithm is initialized to generate an initial
population; a
collision model of a container and an OBB (Oriented Bounding Box) is established, and the position and posture of the container and the OBB are set; a
collision model of each OBB corresponding to the
rock sample is established, and the position and posture of the OBB are set; gravity and friction are added, and the
container space occupancy rate is calculated as the fitness of an individual; the
population individuals are divided into two categories, i.e., elite individuals and general individuals, according to the fitness, the
population is subjected to
copying, crossing and
mutation operations according to the partial random key
genetic algorithm, and a next generation population is generated; the operation is repeatedly performed, and when a termination condition is met, the maximum fitness individual is decoded to output the final position and posture of each
rock sample after packing as a final packing scheme. The application can realize maximum packing of irregular rocks in a limited container.