Thermoeconomic functional analysis :a method for optimal design or improvement of complex thermal systems