This paper addresses the optimal contraflow lane configuration problem arising in the contraflow lane control strategy that has been implemented successfully in practice. The problem is formulated as a bilevel programming model in which the upper level problem is a binary integer programming formulation that aims to minimize the total travel time of a study area, while the lower level problem is a microscopic traffic simulation model that can simulate the dynamic reaction of the drivers resulting from a contraflow lane configuration scheme. A microscopic traffic simulation model is adopted in this study because it is easily handled by traffic engineers. Such an adoption results in inexistence of analytical expression of the objective function in the upper level problem. Accordingly, some conventional analytical solution methods for solving integer programming problems are no longer available for the proposed model. Therefore, this paper develops a variation of genetic algorithm that embeds with the microscopic traffic simulation model as well as a chromosome repairing procedure to find an optimal contraflow lane configuration solution. A case study in Singapore is carried out to evaluate the proposed methodology, in which PARAMICS as the microscopic traffic simulation model is applied.