Cyber-physical systems (CPS), as a significant set of the Internet of Things (IoT), play a key role in our life. CPS has a wide range of applications. Regardless of the benefits of CPS, they need a secure approach to communication. In this paper, an approach to CPS security is proposed. Usability of the proposed approach is the major characteristic of it because it employs a multi-objective model (MOM) of security. In this study, three algorithms were used to solve MOM (Multi-Objective Imperialist Competitive Algorithm, Multi-Objective Automata, Multi-Objective Bee Colony), because the evolutionary structure of the proposed algorithms causes the best adaptation on the network.