#653 - add tariff evaluation code and tests