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

Advance routines #121

Closed
wants to merge 3 commits into from
Closed

Advance routines #121

wants to merge 3 commits into from

Conversation

Thuener
Copy link

@Thuener Thuener commented Mar 29, 2018

Add routines of Gurobi to get information from tableau

src/grb_advroutines.jl Outdated Show resolved Hide resolved
val::Ptr{Cdouble}
end

function get_tableaurow_grb(model::Model, cidx::Integer)
Copy link
Member

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.

Copy link
Author

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?

Copy link
Member

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

Copy link
Author

Choose a reason for hiding this comment

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

c_api_abinvrowi?

Copy link
Member

@odow odow left a 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)
Copy link
Member

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
Copy link
Member

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.

Copy link
Author

@Thuener Thuener Jun 24, 2019

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
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

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

c_api_getbasishead

@odow odow added the Wrapper: C API Issue is specific to low-level C API label Aug 16, 2019
@lausilvag lausilvag mentioned this pull request Jun 10, 2020
@odow odow closed this in #346 Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Wrapper: C API Issue is specific to low-level C API
Development

Successfully merging this pull request may close these issues.

None yet

4 participants