Skip to content

Empty debug_unmet_demand.csv file always created if debug_model==true #1372

Description

@alexdewar

This is a small usability thing.

If dispatch fails because there is unmet demand, we write this unmet demand to an output file for debugging purposes (see code). The thing is, this debug_unmet_demand.csv file is unconditionally created, with nothing written to it (including a header row) in the normal case that this error doesn't happen. Let's change things so we only create the unmet demand file if we need it. Note that the program terminates if there is unmet demand, so we can have a method which creates the file, writes to it, then closes it again. (As a sanity check, we should probably verify that the method isn't called more than once though.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    🔖 Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions