Optimization Of Total Cost