-
Notifications
You must be signed in to change notification settings - Fork 82
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
Advance routines #121
Advance routines #121
Conversation
val::Ptr{Cdouble} | ||
end | ||
|
||
function get_tableaurow_grb(model::Model, cidx::Integer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's best for this function to have a name that matches the function being wrapped. See e.g., https://github.com/JuliaOpt/Gurobi.jl/blob/93b4d3e37c3d8ed2ec37b59d207504537e85e173/src/grb_quad.jl#L4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BinvRowi is a strange name for a function in Julia. The other problem is that this name is misleading, this is not actually the row from B^-1 is the row from A B^-1. http://www.gurobi.com/documentation/7.5/refman/c_grbbinvrowi.html
Should I call it ABinv_row?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about c_api_binvrowi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c_api_abinvrowi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Thuener any interest in finishing this?
val::Ptr{Cdouble} | ||
end | ||
|
||
function get_tableaurow_grb(model::Model, cidx::Integer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about c_api_binvrowi
idx, val = get_tableaurow_grb(model, cidx) | ||
row[idx] = val | ||
return nothing | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer not to have these helper functions in Gurobi.jl. They don't get tested and lead to multiple ways to do the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer to remove get_tableaurow! and get_tableaurow and leave get_tableaurow_grb as it is?
idx, val = get_tableaurow_grb(model, cidx) | ||
BinvA[cidx, idx] = val | ||
return nothing | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
spv = zeros(len) | ||
get_tableaurow!(spv, model, cidx) | ||
return spv | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
return spv | ||
end | ||
|
||
function get_basisidx(model::Model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c_api_getbasishead
Add routines of Gurobi to get information from tableau