In the refinery, purifiers are widely used in the recovery of hydrogen components of the emissions from hydrogen consumption units. Hydrogen network containing purification units have been optimized and integrated by lots of researchers. However, purifier models such as PSA, membrane separation have nonlinear characteristics. Even if minimizing hydrogen utility, mathematical programming models adopted by most of the researchers belong to the non-convex and nonlinear models, not guaranteeing global optimal solution. On the basis of previous studies, this paper proposes a mixed integer linear programming model to obtain a minimum hydrogen utility consumption. This method can get the inlet flowrate simultaneously. Case studies indicate that this method is effective for both hydrogen and water networks.