An intelligent thermal management system for optimized lithium-ion battery pack