Optimal cyclic scheduling of multistage continuous multiproduct plants