Combining the duration curve with data on fixed and variable costs of different generating technologies, it is possible to derive the optimal generation mix to satisfy a given electricity demand. The residual load curve is obtained by subtracting the electricity produced by the low marginal cost technology from the electricity load. Once calculated the residual load curve for a given amount of renewable energy, it is then possible to derive the “new” optimal generation mix, which satisfies that specific load at the least-cost.