Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get node id in callback #402

Closed
ZacharieALES opened this issue May 9, 2022 · 2 comments
Closed

Unable to get node id in callback #402

ZacharieALES opened this issue May 9, 2022 · 2 comments

Comments

@ZacharieALES
Copy link

I try to get the id of the current node using:

valueP = Ref{Cdouble}()
ret = CPXcallbackgetinfodbl(cb_data, CPXCALLBACKINFO_NODEUID, valueP)
@show valueP[], ret

This displays very low values of "valueP" (ex: 6*10^-10) and the value "ret" is always 1003.

Do I do something wrong?

@joaquimg
Copy link
Member

joaquimg commented May 9, 2022

According to https://www.ibm.com/docs/en/icos/12.10.0?topic=manual-cpxcallbackinfo
CPXCALLBACKINFO_NODEUID is a long and not a double.
You would need something like: CPXcallbackgetinfolong

(haven't tested)

@odow
Copy link
Member

odow commented May 9, 2022

Presumably something like:

valueP = Ref{Clong}()
ret = CPXcallbackgetinfolong(cb_data, CPXCALLBACKINFO_NODEUID, valueP)
@show valueP[], ret

I'm going to close this issue because it isn't a bug in CPLEX.jl.

If you have a follow-up question, please post on the community forum: https://discourse.julialang.org/c/domain/opt/13
There are more people who read the questions, and it may help someone else in future with a similar question.

@odow odow closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants