We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The NREL folks suggest adding a method:
Model(::Nothing; kwargs...) = Model(; kwargs...)
so that they can create models if the user doesn't pass an optimizer (e.g., it remains the default nothing).
nothing
The alternative is them writing
model = optimizer === nothing ? Model(; kwargs...) : Model(optimizer; kwargs...)
cc @kdheepak, @jd-lara
The text was updated successfully, but these errors were encountered:
The alternative is
m = Model() if !isnothing(optimizer) set_optimizer(m, optimizer) end
I'm not seeing a big issue with that version. This is a slippery slope if we start adding Nothing versions of all JuMP methods that take objects.
Nothing
Sorry, something went wrong.
This is a slippery slope if we start adding Nothing versions of all JuMP methods that take objects.
Agreed.
They will continue to implement a work-around down-stream.
For future readers, SDDP.jl implements a similar solution: https://github.com/odow/SDDP.jl/blob/ff628f52afb01f52e7b64aa9a915cbead48f39f7/src/user_interface.jl#L458-L476
No branches or pull requests
The NREL folks suggest adding a method:
so that they can create models if the user doesn't pass an optimizer (e.g., it remains the default
nothing
).The alternative is them writing
cc @kdheepak, @jd-lara
The text was updated successfully, but these errors were encountered: