In an increasingly interconnected and technologically advanced world, the performance and dependability of complex systems are of paramount importance. This thesis studies the challenges facing the systems while ensuring cost-effectiveness and sustainability. It focuses on the relationships between optimization, reliability, and maintenance, recognizing their collective impact on the operation and longevity of complex systems. It delves into advanced optimization methods, which ensure that resources such as maintenance activities and production rates are wisely allocated to achieve the best possible results. Central to the thesis is the examination of reliability using models and analyses, to understand failure modes and their probabilities, enabling the design of robust systems that can withstand unforeseen challenges. At the same time, a range of maintenance methods are studied, from preventive measures to corrective actions, all to ensure the system's reliability. By optimizing maintenance strategies, the research seeks to minimize downtime, reduce operational costs, and maximize the lifespan of systems. Recognizing the dynamic nature of systems, the thesis emphasizes continuous improvement by developing adaptable frameworks and methods that can evolve with changing operational conditions and emerging technologies. As systems strive to meet the demands of a rapidly changing world, it is essential to harness appropriate knowledge thus paving the way for resilient, efficient, and sustainable complex systems.