Reliability is one of the most important characteristics of the electrical and mechanical systems with applications in the space communication industries, internet networks, telecommunication systems, power generation systems, and productive facilities. What adds to the importance of reliability in these systems are system complications, nature of competitive markets, and increasing production costs due to failures. This paper investigates availability optimization of a system using both repairable and non-repairable components, simultaneously. The availability-redundancy allocation problems involve the determination of component availability (i.e., life time and repair time of the components) and the redundancy levels that produce maximum system availability. These problems are often subject to some constraints on their components such as cost, weight, and volume. To maximize the availability and to minimize the total cost of the system, a new Mixed Integer Nonlinear Programming (MINLP) model is presented. To solve the proposed model, an improved version of the genetic algorithm is designed as an efficient meta-heuristic algorithm. Finally, in order to verify the efficiency of the proposed algorithm, a numerical example of a system is presented that consists of both repairable and non-repairable components.