“…Algorithm 1: Receding-Horizon method 1 Input: τ ≥ 0, T ≥ τ , and n max such that n max τ ≤ T ∞ ; 2 for n = 0, 1, 2, ..., n max − 1 do 3 Find the solution (y, u) to Problem (P (θ; φ)) with θ = nτ , y θ = y n , and φ defined by (51); 4 Set y RH (t) = y(t) and u RH (t) = u(t) for a.e. t ∈ (nτ, (n + 1)τ ); 5 Set y n+1 = y(τ ); 6 end 7 Find the solution (y, u) to Problem (P (θ)) with θ = n max τ and y θ = y nmax ; 8 Set y RH (t) = y(t) and u RH (t) = u(t) for a.e. t ∈ (n max τ, T ∞ );…”