Let $\mathscr T = \{0,1, \ldots, T\}$ denote the entire time horizon, $x : \mathscr T \to [0,1]$ the state and $u : \mathscr T \to \mathbb [0,1]$ the control. Consider the following problem: \begin{align} & \max_{u}\sum_{t=0}^{T}{\ln(u(t))}\\ \text{s.t. } & x(t+1) = x(t) - u(t)\\ & x(0) = 1\\ & x(T) = \varepsilon > 0\\ & u(t) \in [0, x(t)]~\forall t \in \mathscr T \end{align}
I want to formulate the problem as an MPC problem. Let $H < T$ denote the prediction horizon. Further define a restricted state and control path by $x_t : [t, t+H] \to [0,1]$ and $u_t : [t, t+H] \to [0,1]$, respectively. For all $t \in \{0,1,2,\ldots, T - H\}$ we consider the problem \begin{align} & \max_{u_t}\sum_{s=t}^{t+H}{\ln(u(s))}\\ \text{s.t. } & x_t(s+1) = x_t(s) - u_t(s)\\ & x_t(s) = x(t)\\ & x(t+H) = ? > 0\\ & u_t(s) \in [0, x_t(s)] ~ \forall s \in \{t,t+1,\ldots, t+H\} \end{align}
As one can see I do not know how to incoporate the integral or end-of-horizon constraint $x(T) = \varepsilon$ into the subproblems.
- Is there a generic way to deal with end-of-horizon constraints in MPC problems?
- Or, what are common heuristics to incorporate them?
I want to plan a trip to Barcelona and and should arrive there after 10 hours, and the initial plan I create must be followed. Now I only plan 8 hours, and I will create new plans every hour. My options are to either say I will arrive to Barcelona after 8 hours (and thus plan a faster travel), or add a penalty to the distance to Barcelona after 8 hours. You have the same options here. There is no definite answer.
Note that when you run this in closed-loop using an MPC strategy, you are not guaranteed (generally) to reach the terminal state in finite time, regardless if you plan the full horizon or the reduced horizon.