Text this: Flash smelting: analysis, control and optimization