The invention relates to a method for controlling and regulating the
temperature of a metal strip in a finishing train of a hot rolling mill.
A target function is formed by comparing a desired temperature gradient
with an actual temperature gradient. The target function measures
deviations from desired indications positioned in various places on the
finishing train. The speed of the strip and the flow of the cooling agent
are adjusted by predicting with the aid of a method of non-linear
optimization with auxiliary conditions and are regulated and controlled
online by solving a quadratic optimization problem with linear auxiliary
conditions, preferably with the aid of an active set strategy.