Robust and optimal switching linear parameter-varying control