A model-based framework to optimize pharmaceuticals freeze drying