Skip to content

Error on modify-then-query #2566

@odow

Description

@odow

If you solve a problem, modify it, then query a solution, the result is undefined behavior.

We've had a few bites at this:

The docs currently say
image
but the warning is buried in the documentation and it keeps tripping people up.

I would propose we add a flag to check this at the JuMP level and throw OptimizeNotCalled. Asking every low-level solver to do so seems like too much work, and some solvers are fine with it.

The other option is to do it at the CachingOptimizer level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions