reward shaping for erp optimization