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

Indicator constraint support #709

Merged
merged 35 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
049e4cb
first draft indicator cons
matbesancon Apr 11, 2019
a550983
fixed docstring
matbesancon Apr 11, 2019
d17ba8e
fixed LessThan
matbesancon Apr 11, 2019
3bce12e
fix import
matbesancon Apr 11, 2019
2ca54d9
last SmallerThan
matbesancon Apr 12, 2019
c3c2fa6
copy correct impl
matbesancon Apr 12, 2019
6e57763
generic vec
matbesancon Apr 12, 2019
9db213a
Revert "generic vec"
matbesancon Apr 12, 2019
9c0e8b6
changed dim and doc
matbesancon Apr 12, 2019
255c409
ActiveCond type parameter
matbesancon Apr 13, 2019
d741b61
enums + constraint
matbesancon Apr 14, 2019
232d5bf
capital enum values
matbesancon Apr 15, 2019
f940ea8
relax type constraint on S
matbesancon Apr 16, 2019
6ce7a65
latex escaping, naming
matbesancon Apr 17, 2019
18e9168
explicit set name
matbesancon Apr 18, 2019
8621773
test 1 indicator
matbesancon Apr 18, 2019
c10e1b9
penalized version
matbesancon Apr 18, 2019
e7bb25b
add reference, fixed doc, tests
matbesancon Apr 19, 2019
4d889be
Merge branch 'master' into indicator-cons
matbesancon Apr 19, 2019
ab42f21
fix test formatting and errors
matbesancon Apr 23, 2019
8da75e0
fix conflict
matbesancon Apr 23, 2019
d15fd9a
test in main, example usage
matbesancon Apr 23, 2019
4bc4d9e
split tests
matbesancon Apr 23, 2019
24af034
fix test 2
matbesancon Apr 23, 2019
f60c3c8
added test
matbesancon Apr 23, 2019
1560400
remove unsupported tests, names
matbesancon Apr 24, 2019
74836af
test passing
matbesancon Apr 24, 2019
e89d734
fix support
matbesancon Apr 24, 2019
d9565d6
fix style
matbesancon Apr 24, 2019
3c0155e
copy implementation and test
matbesancon Apr 24, 2019
c7f926e
fix comments, added test for ACTIVE_ON_ZERO
matbesancon Apr 25, 2019
9d85fee
test support indicator
matbesancon Apr 25, 2019
82d3d56
explicit comment
matbesancon Apr 25, 2019
01f8690
fix conflict
matbesancon Apr 28, 2019
caeb4c4
add mutable test
matbesancon Apr 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Test/intlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function knapsacktest(model::MOI.ModelLike, config::TestConfig)
end
end

function indicator_test1(model::MOI.ModelLike, config::TestConfig)
function indicator1_test(model::MOI.ModelLike, config::TestConfig)
atol = config.atol
rtol = config.rtol
# linear problem with indicator constraint
Expand Down Expand Up @@ -433,7 +433,7 @@ function indicator_test1(model::MOI.ModelLike, config::TestConfig)
end
end

function indicator_test2(model::MOI.ModelLike, config::TestConfig)
function indicator2_test(model::MOI.ModelLike, config::TestConfig)
atol = config.atol
rtol = config.rtol
# linear problem with indicator constraint
Expand Down Expand Up @@ -509,8 +509,8 @@ const intlineartests = Dict("knapsack" => knapsacktest,
"int1" => int1test,
"int2" => int2test,
"int3" => int3test,
"indicator_cons1" => indicator_test1,
"indicator_cons2" => indicator_test2,
"indicator1" => indicator1_test,
"indicator2" => indicator2_test,
)

@moitestset intlinear
4 changes: 2 additions & 2 deletions test/Test/intlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
MOIU.set_mock_optimize!(mock,
(mock::MOIU.MockOptimizer) -> MOIU.mock_optimize!(mock, [1.25, 8.75, 0., 1.])
)
MOIT.indicator_test1(mock, config)
# MOIT.indicator1_test(mock, config)
matbesancon marked this conversation as resolved.
Show resolved Hide resolved
MOIU.set_mock_optimize!(mock,
(mock::MOIU.MockOptimizer) -> MOIU.mock_optimize!(mock, [2.0, 8.0, 1., 0.])
)
MOIT.indicator_test2(mock, config)
# MOIT.indicator2_test(mock, config)
end