Skip to content

LinearProgram symbol serialization doesn't include feasibility information #549

@arcondello

Description

@arcondello

Currently the LinearProgram symbol always saves the state whether it's feasible or not

# we save the state regardless of whether it is feasible or not
# In the future we could choose to ignore infeasible states.
states[state_index, :] = self.state(state_index)

however, this creates an issue. The state contents are undefined and may in fact encode a feasible solution to the LP, or may contain nans and infs.

Proposed Solution
Add another feasibility array to the serialized state. This creates 6 cases (because we need to support unspecified i.e., serialized with <=0.7.0)

feasible infeasible unspecified
contains nan/inf(s) no state1 generate a new state, mark infeas2 no state
no nan/inf(s) good state use state, mark infeas use state
  1. This is a bit unintuitive, but we need a way to specify "no state" in the new schema. We could add yet another array but that feels like overkill.
  2. The generated state might itself be feasible, but the docs say that the state of an LP symbol propagating infeasible is undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions