A model and a heuristic algorithm for reliabilty op timi zation in generalized stochastic flow networks are proposed in this paper. The stochastic characteristic of the demands at terminal nodes is considered in the model. The algorithm proposed is powerful and can be applied to optimal planning of transmission capacity for large scale stochastic flow networks, because it can facilitate a fast location of optimal capacity expansion from the information obtained by the last iteration by making full use of the relationships of the k-weak link set and failure events set to the paramsters in generalized stochastic flow networks