Add convenience function for cost generation