Optimal boundary control of Saint-Venant equations with arbitrary friction and space-varying slope. (3rd June 2021)