Safety and mobility improvement of mixed traffic using optimization- And Learning-based methods