update cost
update cost (static, dynamic, overall)