Add cost calculation
Merge branch 'master' of https://github.com/alexfz420/DSG.git