Optimal scheduling in a microgrid with a tidal generation