tin ore cost optimization