Added simple greedy optimizer and abstract classes for revenue/cost models.