Text this: Profit-based optimal generation scheduling of a microgrid