On-line optimization of a batch reaction - development and experimental demonstration