Correct behaviour of AdvancedHeurCalculator.

Fixes #1.
Better diagnostic for bad solutions
Add "custom" to gitignore