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

Enable LP subproblem in julia/runtests.jl #77

Merged
merged 7 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
Commits
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
30 changes: 15 additions & 15 deletions .github/julia/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import Uno_jll
Create a new `AmplNLWriter.Optimizer` object that uses Uno as the backing
solver.
"""
function Optimizer()
options = String["logger=INFO"]
function Optimizer(options = String["logger=INFO"])
odow marked this conversation as resolved.
Show resolved Hide resolved
return AmplNLWriter.Optimizer(Uno_jll.amplexe, options)
end

Optimizer_LP() = Optimizer(["logger=INFO", "subproblem=LP"])
odow marked this conversation as resolved.
Show resolved Hide resolved
odow marked this conversation as resolved.
Show resolved Hide resolved

# This testset runs https://github.com/jump-dev/MINLPTests.jl
@testset "MINLPTests" begin
primal_target = Dict(
Expand All @@ -34,23 +35,22 @@ end
# This function tests (potentially) non-convex nonlinear programs. The tests
# are meant to be "easy" in the sense that most NLP solvers can find the
# same global minimum, but a test failure can sometimes be allowed.
MINLPTests.test_nlp_expr(
Optimizer;
exclude = [
# Remove once https://github.com/cvanaret/Uno/issues/39 is fixed
"005_010",
# Okay to exclude forever: AmplNLWriter does not support
# user-defined functions.
"006_010",
# Remove once https://github.com/cvanaret/Uno/issues/38 is fixed
"007_010",
],
primal_target = primal_target,
)
exclude = [
# Remove once https://github.com/cvanaret/Uno/issues/39 is fixed
"005_010",
# Okay to exclude forever: AmplNLWriter does not support
# user-defined functions.
"006_010",
# Remove once https://github.com/cvanaret/Uno/issues/38 is fixed
"007_010",
]
MINLPTests.test_nlp_expr(Optimizer; exclude, primal_target)
MINLPTests.test_nlp_expr(Optimizer_LP; exclude, primal_target)
# This function tests convex nonlinear programs. Test failures here should
# never be allowed, because even local NLP solvers should find the global
# optimum.
MINLPTests.test_nlp_cvx_expr(Optimizer; primal_target)
MINLPTests.test_nlp_cvx_expr(Optimizer_LP; primal_target)
end

# This testset runs the full gamut of MOI.Test.runtests. There are a number of
Expand Down
Loading