Finish integrating the number of writes and the cost of migration into account when defining the objective function