User blog comment:BentLauridsenDK/Gold outcome from IT and local trains/@comment-26692787-20170126235605/@comment-26828130-20170127021232

Nothing is impossible :P
 * 1) If a set has more than 1 type of wagons, and all wagons are enough to make a set, the template calculates mail profit + pass profit (1 result)
 * 2) If a set has more than 1 type of wagons, and a set can be made with either type, the template calculates the profits for both types (multiple results)
 * 3) If a set has more wagons available for a single set, but not enough for a second set, we enter the best values, so the template calculates max profit (1 result)