Add function to calculate cost between two regions
add function to write the cost of transitions into a .cost file
pre-merge
Merge remote-tracking branch 'jimsBranches/TwoDimensionalCostMinimization' into TwoDimensionalCostMinimization