LP(7) temporary requirement function and improved cost function