Optimal schedule of membrane cleaning and replacement of SWRO system was studied. The optimization problem was formulated with detailed RO model considering membrane. A new solution method was proposed and compared with traditional method. Better optimal schedule and computing performance were demonstrated by case study. Influence of feed temperature and feed concentration was analyzed.