Skip to content

Conversation

@trulsf
Copy link

@trulsf trulsf commented Jan 14, 2025

This PR addresses the problems referred to in #274. This will allow more recent versions of Xpress to use correct algorithms based on internal analysis (which is needed e.g. to solve non-convex quadratic problems with the nonlinear solver). It also replaces some deprecated calls with the recommended solutions for the most recent versions of Xpress.

elseif is_mip(model)
@checked Lib.XPRSmipoptimize(model.inner, model.solve_method)

version = getversion()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolutely zero overhead?
Xpress sometimes is impressively slow for very simple things.

If no we could run this on initialization and save in a const.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@btime Xpress.getversion()
  715.517 ns (11 allocations: 1.64 KiB)
v"44.1.1"

Does not seem to be a significant overhead.


# XPRSgetnlpsol and XPRSgetmippsol are deprecated as of version 44.01
# XPRSgetsolution is also recommended instead of XPRSgetlpsol also after solving LPs
if version >= v"44.01"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you very careful selecting this and the other version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecations are given with version in xpress.h. For example

XPRS_EXPORT
xprs_deprecated("since 44.00")
int XPRS_CC XPRSgetnlpsol(XPRSprob prob, double x[], double slack[], double duals[], double djs[]);

As for the introduction of XPRSoptimize, I have checked that it is present in v41 (Xpress 9.0) and not in v40 (Xpress 8.14.x).

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants