Method of controlling a real production process, wherein the method comprises: a) receiving initial condition data from an on-line simulator system simulating the real production process, the initial condition data comprising the state of the real production process as determined by the on-line simulator system based on simulated state variable values, b) performing an optimisation based on the initial condition data received from the on-line simulator system, wherein the optimisation involves using an objective function and constraints to obtain optimal solutions or manipulated variable trajectories which are set points for controllers for controlling the real production process, c) providing the set points to controllers to control the real production process, testing the set points obtained in step b) before step c) and performing step c) only if the set points are validated in the test, wherein the testing involves using the set points in an auxiliary process simulation which simulates the real production process off-line to obtain test-simulated process state variables, wherein the set points are validated if the test-simulated process state variables are within an acceptable range, wherein the testing comprises running the auxiliary process simulation faster than real-time to obtain the test-simulated process state variables, and tuning the dynamic model of the real production process used by the on-line simulator and/or in case the constraints include a dynamic model of the real production process, of the dynamic model used in the optimisation based on the test, wherein the on-line simulator system runs in real-time, parallel to the real production process based on real-time process data and events. a) receiving initial condition data from an on-line simulator system simulating the real production process, the initial condition data comprising the state of the real production process as determined by the on-line simulator system based on simulated state variable values, b) performing an optimisation based on the initial condition data received from the on-line simulator system, wherein the optimisation involves using an objective function and constraints to obtain optimal solutions or manipulated variable trajectories which are set points for controllers for controlling the real production process, c) providing the set points to controllers to control the real production process, testing the set points obtained in step b) before step c) and performing step c) only if the set points are validated in the test, wherein the testing involves using the set points in an auxiliary process simulation which simulates the real production process off-line to obtain test-simulated process state variables, wherein the set points are validated if the test-simulated process state variables are within an acceptable range, wherein the testing comprises running the auxiliary process simulation faster than real-time to obtain the test-simulated process state variables, and tuning the dynamic model of the real production process used by the on-line simulator and/or in case the constraints include a dynamic model of the real production process, of the dynamic model used in the optimisation based on the test, wherein the on-line simulator system runs in real-time, parallel to the real production process based on real-time process data and events. testing the set points obtained in step b) before step c) and performing step c) only if the set points are validated in the test, wherein the testing involves using the set points in an auxiliary process simulation which simulates the real production process off-line to obtain test-simulated process state variables, wherein the set points are validated if the test-simulated process state variables are within an acceptable range, wherein the testing comprises running the auxiliary process simulation faster than real-time to obtain the test-simulated process state variables, and tuning the dynamic model of the real production process used by the on-line simulator and/or in case the constraints include a dynamic model of the real production process, of the dynamic model used in the optimisation based on the test, wherein the on-line simulator system runs in real-time, parallel to the real production process based on real-time process data and events.