Skip to content

Potential for different dispatch results on different platforms #1174

@tsmbland

Description

@tsmbland

In #1170 we have an example model that gives different results on mac vs windows/ubuntu.

Regardless of whether we can overcome that particular issue (which seems just to be an unlucky accident), the underlying problem will remain unless specifically addressed (in other words, the rare potential for results to differ on different OS's, regardless of whether or not this happens with our particular set of examples). This is a problem, not just for our testing infrastructure, but for models out in the wild which we want to be reliable and deterministic.

The underlying problem is that it's possible (and indeed probably quite likely) for an infinite number of "equally good" solutions to exist in a dispatch optimisation, and the way that highs converges on a single result within this space appears to be potentially sensitive to small floating-point differences between platforms.

I think that to fix this issue we need to put in some deliberate though into how we "break ties", the same way that we've previously done for investment appraisal, where multiple equally good options can exist (in this case favouring existing assets over new assets, and a number of other rules). Adding a secondary term to the objective could be sufficient to compress the set of equally good solutions to a single point, which would get rid of this problem. An example would be an L2 term which would favour spreading value over multiple variables rather than a "winner-takes-all" solution where some values are large and other compressed to zero.

This isn't just a technical point and does have real implications. For example, if you have two identical assets each capable of outputting 0.5 units in a particular timeslice, but demand of only 0.4 units, what's the optimal solution? 0.2 units each? All 0.4 units from asset A? All 0.4 units from asset B? Somewhere in between? All would be equal in terms of the objective, so unless we add some kind of secondary term to resolve this conflict then it's up to highs to pick a solution, which is both obscure and, as we've seen, potentially variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions