In this paper, the flexible synthesis problem for heat exchanger network(HEN) is formulated to a mixed integer nonlinear program(MINLP) model. The objection function of the model consists of two components: First, a candidate HEN structure has to satisfy flexible criterion during input span. Second, a minimized annual cost consisting of investment cost and operating cost is investigated. The solution strategy based on particle swarm optimization(PSO) algorithm is proposed to obtain the optimal solution of the presented model. Finally, a four streams example is investigated to show the advantage of the whole proposed optimization approach.