In this study, a numerical model was established using the coupled relationship between the initial conditions of dry density and thermal-hydraulic properties of the compacted bentonite buffer in high-level waste repositories. In addition, we applied the firefly algorithm to identify the optimal initial condition of the buffer, based on the numerical model. Results showed the minimum peak temperature was 77.89 degrees C at the optimal initial condition where the dry density was 1683 kg/m(3). The results were verified using the convergence test and parametric study. This finding gives a guideline for producing a bentonite buffer condition in the design of a repository.