A new algorithm for process flowsheeting