Algorithms for large scale water resource structured models with network flow kernels,