UndefVarError: _pass_variable_names_to_solver not defined - Xpress solver in Julia

Good evening,

I am building an optimization model, in which I want to pass the names of the variables and constranits to the solver, so an IIS can be built afterwards if the problem turns out to be infeasible. I am using the Xpress solver, the JuMP math library and programming in Julia through VS Code.

After declaring the optimization model, I try to run the function _pass_variable_names_to_solve from the C API, but so far have been unable to make it run.

using MathOptInterface
using JuMP
using Xpress
Xpress._pass_variable_names_to_solver(backend(optimizer))

I keep getting the following error, does anybody know how to overcome these limitations?

ERROR: UndefVarError: _pass_variable_names_to_solver not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:31
[2] top-level scope
@ REPL[85]:1

Hi there!

Where did you see to call that function?

Xpress.jl doesn’t support passing names to the C API, and that function does not exist.

Hello again,

Thank you for your response, I found this function in the MOI (MathOptInterface) library and believed I could use it in this particular case.

Also, when do you believe that Xpress will be able to pass names to the C API, if it will at any time?

I found this function in the MOI (MathOptInterface) library and believed I could use it in this particular case.

In general, functions beginning with _ are private and not intended for use outside of the package.

Also, when do you believe that Xpress will be able to pass names to the C API, if it will at any time?

I think there was some performance issue, or problem with duplicate names that meant it was really hard to match up the names that JuMP supports and the names that Xpress supports. @joaquimg is the Xpress guru, so he might know.

@odow is correct.
There are two issues:

  • performance
  • duplicate names

Is there and specific use case or MWE?

Also, are you in the latest version locally?