-
Notifications
You must be signed in to change notification settings - Fork 8
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
Refactoring #17
Refactoring #17
Conversation
ChalmetRecursion(m, yt_1, yt_2, ys_1, ys_2, varArray, rhs_z1, rhs_z2, ϵ, verbose ; kwargs...) | ||
end | ||
|
||
return nothing |
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.
Example of added return nothing
# MIT License | ||
# Copyright (c) 2017: Xavier Gandibleux, Anthony Przybylski, Gauthier Soleilhac, and contributors. | ||
|
||
function solve_dicho(m::JuMP.Model; round_results::Bool=false, verbose, kwargs...) |
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.
round_results
is a keyword argument here instead of an argument, same for verbose.
|
||
if method in keys(methods) | ||
solve_function = methods[method] | ||
solve_function(m; verbose=verbose, relaxation=relax, kwargs...) |
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.
step
and round_result
are passed through kwargs
, so dispatch is not necessary anymore. This permits to reduce the "cost" of adding new methods by just extending the Dict
.
Proposed changes:
return nothing
when no return statement was provided;verbose
,step
,round_results
as keyword arguments in order to avoid having to sort the arguments in thevSolve
function;vSolve
, replace the if/elseif conditions by a dict to functions.Tests pass locally, with JuMP 0.23 and 1.1.1 (this closes #16)