Optimal control and inverse problems involving point and line functionals and inequality constraints