Create edgeCost