taking events into account when computing edge cost.