1. A computer-implemented method for run-to-run control, the method comprising: identifying contexts associated with a process, the process having one or more threads, and each thread involving one or more contexts; defining a set of input-output equations describing the process, wherein each input-output equation corresponds to a thread and includes a thread offset expressed as a summation of individual context offsets; and creating a state-space model that describes an evolution of the process using the set of input-output equations, the state-space model allowing to estimate individual context offsets.