Gas tank filling cost function