Fixes bugs when calculating total costs of a repair schedules.
Adds a reasonable fitness function.