Selective laser melting part quality prediction and energy consumption optimization