-
Notifications
You must be signed in to change notification settings - Fork 25
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
WIP : MOI wrapper (based on LQOI) #27
Merged
Merged
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b9c81fe
MOI interface through LQOI (Partially implemented)
IssamT 0a07fdb
more impl.
IssamT 553b9ea
Finished first impl and fixed tests.
IssamT adf7810
updated to use CSR struct
IssamT 35b982c
minor updates. more tests
IssamT da2ad75
a few fixes
IssamT 9d84bcc
using copy!
IssamT 1c60f52
removed some commented out code
IssamT d4042f0
minor modifs
IssamT 5dfb617
some fixes
IssamT a79e3fd
exculded test linear11
IssamT b86374b
removed the LQOI version upperbound
IssamT a89e1c3
limited LQOI to 2.0 inclusive
IssamT ea529ee
Tidy up. Remove unneeded docstrings, fix a few functions, enable
odow 9aca0f6
Handle infeasiblity certificates and other matters:
odow 07d4e91
Minor re-org
odow 3728aaf
Remove unneeded code
odow 0c8fc6d
Exclude linear11 test
odow 6957e3c
Merge pull request #1 from JuliaOpt/moi
IssamT af551f7
minor updates
IssamT 575aff7
renaming ClpOptimizer --> Clp.Optimizer
IssamT 4848bbe
update requires
IssamT 8806d61
enabled a test, added 0.7 to travis
IssamT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
julia 0.6 | ||
Cbc | ||
MathProgBase 0.5 0.8 | ||
LinQuadOptInterface 0.1 0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,9 @@ export | |
resize, | ||
delete_rows, | ||
add_rows, | ||
add_row, | ||
delete_columns, | ||
add_column, | ||
add_columns, | ||
chg_row_lower, | ||
chg_row_upper, | ||
|
@@ -418,12 +420,36 @@ function add_rows(model::ClpModel, number::Integer, row_lower::Vector{Float64}, | |
@clp_ccall addRows Void (Ptr{Void}, Int32, Ptr{Float64}, Ptr{Float64}, Ptr{Int32}, Ptr{Int32}, Ptr{Float64}) model.p number row_lower row_upper row_starts columns elements | ||
end | ||
|
||
#This function exists in cpp but not c interface | ||
function add_row(model::ClpModel, number_in_row::Integer, columns::Vector{Int32}, elements::Vector{Float64}, | ||
row_lower::Float64, row_upper::Float64) | ||
row_starts_vector = Vector{Int32}(2) | ||
row_starts_vector[1] = 0 | ||
row_starts_vector[2] = number_in_row | ||
row_upper_vector = [row_upper] | ||
row_lower_vector = [row_lower] | ||
add_rows(model, 1, row_lower_vector, row_upper_vector, row_starts_vector, columns, elements) | ||
end | ||
|
||
# Delete columns. | ||
function delete_columns(model::ClpModel, which::Vector{Int32}) | ||
_jl__check_model(model) | ||
@clp_ccall deleteColumns Void (Ptr{Void},Int32,Ptr{Int32}) model.p length(which) which | ||
end | ||
|
||
#This function exists in cpp but not c interface | ||
function add_column(model::ClpModel, number_in_column::Integer, rows::Vector{Int32}, | ||
elements::Vector{Float64}, column_lower::Float64, | ||
column_upper::Float64, objective::Float64) | ||
_column_starts = Vector{Int32}(2) | ||
_column_starts[1] = 0 | ||
_column_starts[2] = number_in_column | ||
_column_upper = [column_upper] | ||
_column_lower = [column_lower] | ||
_objective = [objective] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto here, or at least no underscore variable names |
||
add_columns(model, 1, _column_lower, _column_upper, _objective, _column_starts, rows, elements) | ||
end | ||
|
||
# Add columns. | ||
function add_columns(model::ClpModel, number::Integer, column_lower::Vector{Float64}, | ||
column_upper::Vector{Float64}, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Isn't it just as simple to go
add_rows(model, 1, [row_lower], [row_upper], [0, number_in_row], columns, elements)