Added a cost evaluation to PreComputedGrid.