Skip to content

Dispatch results not being saved when there's unmet demand #1083

@tsmbland

Description

@tsmbland

If the dispatch fails at any point, we run again with unmet demand variables, and return an error message giving the commodities with unmet demand to help diagnose the problem. We also have a debug_unmet_demand.csv file, the purpose of which is to give more detailed data about the unmet demand in this situation (i.e. which timeslices, how much unmet demand).

BUT, this file never gets written to because we exit the program with the error message before calling the output file writer. Not sure when this crept in but I'm pretty sure this used to work fine.

I think we just have to reshuffle things so the output file writer gets called before exiting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions