Tenant mix is a central issue in the development and operation of shopping malls. An effective tenant layout can enhance the consumer experience and increase shop sales. So it is crucial to comprehensively consider the rent and retail compatibility when crafting the tenant mix. Developers mainly considered the rent income from anchor and non-anchor tenants. But many studies ignored the externality effect of anchor tenants on the rent of non-anchor tenants. Furthermore, the relationship between different tenant type and retail compatibility under customers' behavioral preferences is not adequately studied. In addition, existing optimization methods is inefficient, poorly integrated and cannot rapidly explore design options. Therefore, this paper aims to achieve automatic generation and optimization of tenant mix layouts considering the rent and retail compatibility objective. Firstly, a bi-objective model consisting of the rent and retail compatibility objectives is developed to evaluate the performance of the generated schemes. The rent objective function quantifies the externality of anchor shop on the rent of non-anchor shops in the shopping center. The retail compatibility function quantifies the relationship between the consumers’ behavior preferences and retail types. Then this paper proposed a generative mechanism consisting of parametric design, scheme optimization and decision making processes. The results of the case study show that the optimized scheme outperforms the original scheme in terms of both rent and retail compatibility objectives. The proposed generative mechanism achieves automatic generation and optimization of tenant mix layouts, and greatly improves the efficiency of the design process.