A framework for hybrid model predictive control in mineral processing