Skip to content

Conversation

@rwe
Copy link
Contributor

@rwe rwe commented Sep 25, 2015

This fixes use of incorrect column indices when the presolver removes rows or columns. A serious but silent error when using presolve_cols.

This fixes incorrect use of incorrect column indices when presolving
removes rows or columns.
@rwe
Copy link
Contributor Author

rwe commented Sep 25, 2015

Of my several pull requests to this project (awesome work by the way!), this is the only one that I feel is particularly necessary. When a presolver is run, the matrix's indices can be altered and some even removed, which means that getSolution and getSolutionDict return silently incorrect results.

It's possible to get the stil-existing new column indices back either by name or get_orig_index, get_origcol_name/get_col_name, etc, however those do not provide values for removed columns (for example, when presolve_cols determines its value, saves it, and removes the column for the solver).

According to the documentation:

To retrieve the variable data of all variables, including the presolved variables, API call get_var_primalresult must be used. This is the only call available to get all information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant