Modeling and control of thermal management systems on electric vehicles