3 Model definition header files

The file data/data_simulation.h is the main user’s input file and contains the parameters that define the equation to be solved. It can include an other data_xxx.h file (see basic examples data_basicmodel.h, data_FD_2d_ex1_basic.h).

3.1 Data describing the problem to be solved

The parameter NAME defines the name of the problem that will by used only for shell output during the execution.

State variables and controls .

For a one-player control problem :

For a two-player control problem :

Dynamics and cost functions For a one-player control problem :

For a two-player control problem :

Special parameters for second order equations

Additional computations

Hamiltonian function and associated parameters

Boundary conditions The parameters are:

Initial conditions

Computation in a subdomain

Obstacle terms Instead of solving ut + H(t,x,u,u) = 0, the solver can also treat HJ obstacle equations such as

    (                                )
min   ∂u-+  H (t,x, u,∇u ), u - g(t,x )  = 0.
      ∂t
\relax \special {t4ht=

(15)

where g(t,x) is defined by the user. In particular it forces to have u(t,x) g(t,x) in the case of (15).

Also, the following obstacle equations can be considered:

     (                               )
       ∂u-
max    ∂t + H (t,x,u,∇u  ), u - ˜g(t,x)  =  0
\relax \special {t4ht=

(16)

or

     (    ( ∂u                             )            )
max   min   --- + H (t,x,u,∇u ), u - g(t,x)  , u - g˜(t,x ) = 0,
             ∂t
\relax \special {t4ht=

(17)

where

g˜(t,x )
\relax \special {t4ht=

is user-defined. We will have

u(t,x) ≤ ˜g(t,x)
\relax \special {t4ht=

, in the case of (16), or

u(t,x) ∈ [g (t,x ),˜g (t,x )]
\relax \special {t4ht=

in the case of (17).

For this, the following parameters are used:

3.2 Numerical schemes and associated parameters

Discretization parameters

Stopping criteria

Therefore, in the case of a time dependent problem, iterations are performed until tn = T , where the program stops. The parameter EPSILON should be set to 0, and T is used to fix the terminal time. (MAX_ITERATION should be set to a sufficiently large value).

In the case of a steady problem, EPSILON should be set to a strictly positive (small) value, and MAX_ITERATION should be also used to limit the number of maximum iterations in the case of convergence problems. (For debugging purposes, the parameter MAX_ITERATION can also be set to 1 or a small integer value.)

Choice of the solver

3.2.1 Finite Difference Method

This method is used when METHOD=MDF. The user has to set the following scheme discretization parameters:

3.2.2 Semi-Lagrangian Method

This method is used when METHOD=MSL. One needs to define :

3.3 Value problems defined implicitly

Some special computations can be made in addition to solving the HJB equation in the case when the computed d-dimensional solution function u is used to characterize the epigraph of an other value function v of a d - 1 dimensional problem. This approach is used for general state-constrained value problems as described in [1], where the problem is set back to a state-constrained reachability problem. It is assumed that both value functions are related to each other as follows:

v (t,x ,...,x    ) = inf{z, u(t,x ,...,x    ,z) ≤ 0}.
      1      d-1               1       d- 1
\relax \special {t4ht=

(18)

So the value function v can be considered as being implicitly defined by the computed function u.

Also when VALUE_PB=1 it is assumed that only the last state variable, xd, can be used to define an implicit value function. This convention must be taken into account when defining the dynamical system and its parameters in the header file.

3.4 Execution and output parameters

The main purpose of the library is to solve the HJB - type equations. In addition, it is possible to compute and save some associated functions during the main computation. It is also possible to work with optimal trajectory algorithms, after the computation of the solution. The main computation to solve the PDE is most time and memory consuming part of the work. Once the solution computed and saved one can run the program many times to compute different trajectories from this data without need to make the main loop computation at each time. To choose the execution modes the user can use the following parameters (see below).

All the output files generated during an execution are generaly saved in the folder OUTPUT/ (the user may use other names for the output files and output directory, see file include/stdafx.h (or src/stdafx.h) although it is recommanded to not modify the filenames).

3.5 Parameters for trajectory reconstruction

The dynamics used for the trajectory reconstruction algorithms is the one defined in the function dynamics (in the case COMMANDS=0 or 1) or dynamics2 (in the case COMMANDS=2). Related reconstruction procedures are located, if available, in the files

src/compute_ot.h (reconstruction based on an optimal time function)
src/compute_otval.h (reconstruction based on the value function)
src/find_oc.h

For two-player games, the reconstruction procedure is programmed in

src/compute_ot2.h (reconstruction based on an optimal time function)
src/find_oc2.h.

The following parameters are used:

Now we describe some stopping criteria which are used in the trajectory reconstruction routines.

In the case COMMANDS=2 (in the presence of an adverse control denoted u2), it is possible to reconstruct trajectories by setting TRAJ_METHOD=0 (using the minimal time function approach) and using the following; the function dynamics2 is used to describe the dynamics for the two-control case.

The following can be used for more outputs concerning trajectory reconstructions:

3.6 Output parameters and files

Output files are generally contained in the directory OUTPUT/. (It is possible to use other names for the output files and output directory, see file include/stdafx.h, although it is recommanded not to do so.)

3.6.1 Savings options

3.6.2 Data formatting options

3.6.3 General data files

3.6.4 Files related to trajectory reconstruction

3.7 Advanced parameters