Estimating and optimizing thermal behavior of several electromechanical and electronic parts