Optimal control of finite horizon type for a multidimensional delayed switching system

We consider a finite horizon optimal control problem for an ODE system, with trajectories presenting a delayed two-values switching along a fixed direction. In particular the system exhibits hysteresis. Due to the presence of the switching component of the trajectories, several definitions of value functions are possible. None of these value functions is in general continuous. We prove that, under general hypotheses, the "least value function", i.e. the value function of the more relaxed problem, is the unique lower semicontinuous viscosity solution of two suitably coupled Hamilton-Jacobi-Bellman equations. Such a coupling involves boundary conditions in the viscosity sense.