Robust optimal R&D investment under technical uncertainty in a regime-switching environment. (3rd June 2022)