A method for optimizing the layout of carbon fiber composite floorings for BIW was proposed to enhance precision,efficiency,and structural lightweight.Initially,BIW finite element model was established and its efficiency was validated.Subsequently,material parameters for the carbon fiber composite were obtained through mechanical performance testing,followed by conceptual designing and modeling of the flooring layout.Subsequent utilization of continuous variable optimization determined the thickness,block shapes,and layers of the flooring,employing a discretization and rounding strategy to achieve discrete layer numbers for each layup angle.The optimization results show that the Particle Swarm Optimization-Bacteria Foraging Optimization(PSO-BFO)algorithm proposed herein improves flooring quality,static bending stiffness and BIW lightweight coefficient by 34.4%,6.0%and 5.3%,respectively.