The paper presents a mixed integer linear programming model which deals with the optimal operation and maintenance of networks of compressors of chemical plants. This optimization model considers condition-based maintenance which involves the degradation of the condition of the compressors. The paper focuses on online and offline washing, two different cleaning procedures which reduce the extra power used by the compressors due to fouling. The state-of-the-art has demonstrated the optimal schedule of the maintenance of a single compressor neglecting the interactions between operation and maintenance of more than one compressor. The suggested optimization model studies a compressor station with multiple compressors and provides their optimal schedule and the best decisions for their washing. Different case scenarios examine the influence of different types of washing methods on the total costs of operation and maintenance. The paper demonstrates the benefits of the optimization and demonstrates that maintenance and operation have to be examined simultaneously and not separately, in contrast to common industrial practice and previous approaches in the literature.