Optimal control of a batch crystallization process