Optimal design of membrane processes. A problem of choices between process layout, operating conditions and adopted control system