Optimisation of Discrete and Continuous Parameters for the Manufacture of Pharmaceuticals