Skip to text

3 Data generation

In this section, we shall describe the creation of a database Di containing optimal values of (OCPi,xi,xi+1 for various pairs (xi,xi+1):

Di⊂{(xi,xi+1,c)|(xi,xi+1)admissible andVi(xi,xi+1)=c}.

Two methods are presented to achieve this goal. They are compared in terms of prior information, computation cost, and data distribution.

3.1 Method 1

The first method consists in computing the value function Vi on a given grid by solving optimal control problems thanks to the simple shooting method. This is the intuitive approach compared to the second method presented in the next section. Let Xi be a discretization of admissible initial and final states. For all (xi,xi+1)∈Xi, we solve the optimal control problem (OCPi,xi,xi+1 by an indirect simple shooting method and store the corresponding optimal value Vi(xi,xi+1) in Di. The main complexity comes from the fact we have to solve equations, which essentially amounts to invert the exponential map given in (2.6). Algorithm 2.1 provides an overview of these steps.

Algorithm 2.1 Method 1.

Prior information

First of all, the set Xi needs to be created as follows: the initial state is first discretized, then for each of these values the set of associated reachable final states has to be determined and discretized. This ensures that the space of initial and final state is fully explored and that all pairs (xi,xi+1)∈Xi are admissible, which prevents the Newton solver to fail. The determination of the reachable final states is a difficulty in this method. See the remark on page 25 for details about how we compute this set of reachable states in our application.

Computation cost

For each iteration of the Newton solver used to find a zero of the shooting function, at least one integration of the Hamiltonian vector field is required.

Data distribution

By construction, the distribution of the pairs (xi,xi+1) is fully controlled inside the admissibility set. For example, a uniform distribution may be chosen for an easy interpolation.

3.2 Method 2

The second method, described in Algorithm 2.2, is based on a discretization Zi of the initial state and costate space. For all zi=(xi,pi)∈Zi, the exponential map zi+1=(xi+1,pi+1)=exph→(ti+1,ti,zi) is computed, and Hypothesis 2.1 ensures that Vi(xi,xi+1)=c¯i(xi,pi). Compared to Method 1, here we only perform a direct computation of the exponential map exph→ instead of inverting it.

Algorithm 2.2 Method 2.

Prior information

Since there are no admissibility constraints on (xi,pi), the set Zi can be the Cartesian product between the discretization of initial state and costate. Nevertheless, the range of the costate discretization must be well chosen in order to ensure a full exploration of the reachable states xi+1 while limiting the number of useless calls of the exponential map.

Computation cost

In contrast to Method 1, no (Newton) solver is involved here. Hence, only one evaluation of exph→ is needed to compute a point of Di.

Data distribution

In this method, the distribution of the reached final states xi+1 is no more controlled. The main consequence is the risk of empty zones. Fortunately, we shall see in Section 4 that, in our application, a sufficient density in the set Zi ensures a satisfactory distribution of reached states xi+1.