linopy icon indicating copy to clipboard operation
linopy copied to clipboard

Adding xpress postsolve if necessary

Open come-bissuel opened this issue 10 months ago • 4 comments

Closes #420 (if applicable).

Changes proposed in this Pull Request

Small modification to allow a post solve in Xpress, only if necessary, ie if the calculations were stopped. This correction was tested on an internal problem.

Checklist

  • [x] Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • [ ] Unit tests for new features were added (if applicable).
  • [ ] A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • [x] I consent to the release of this PR's code under the MIT license.

come-bissuel avatar Feb 20 '25 07:02 come-bissuel

Thanks for linking to the documentation in the issue. The way i understand it:

  1. After aborting a run due to whatever reason one needs to run postsolve before one can modify the constraints or variables again.
  2. Running postsolve is a no-op if the matrix is not in presolved state.
  3. Since they state they keep a full copy of the original matrix and are effectively only restoring the previous one, i expect the call to be instant, but correct me if that is not your impression.

Do you know whether there is any situation where one would like to continue instead with the presolved matrix instead of throwing that away?

If not i'll merge the PR in. It is working fine for me on my problems too (ie. i don't experience any drawbacks).

coroa avatar Mar 11 '25 17:03 coroa

yes, feel free to merge @coroa

FabianHofmann avatar Mar 11 '25 20:03 FabianHofmann

@come-bissuel , are you still around and can answer the question i had above?

Do you know whether there is any situation where one would like to continue instead with the presolved matrix instead of throwing that away?

coroa avatar Mar 18 '25 13:03 coroa

Hello, sorry for my lack of answer, I thought the answer of @FabianHofmann was enough :). I don't think anyone would like to use the matrix in its presolved state, especially since we are in a function dealing with getting the solution. Anyway, if someone wants to use the presolved matrix, it will still be possible to do that before my postsolving addition.

come-bissuel avatar Mar 19 '25 08:03 come-bissuel

Hello, any news on this merge request ? Thank you !

come-bissuel avatar Oct 15 '25 05:10 come-bissuel