Modelling, simulation, optimization and control of multistage flashing (MSF) desalination plants Part I: Modelling and simulation