-
Notifications
You must be signed in to change notification settings - Fork 87
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
Parametrize GenericModel with objective/variable sub-model #1521
Conversation
Not sure why ci didn't start? Ah actions are down: https://www.githubstatus.com |
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.
See the test failures.
Actually I should be able to handle this. |
fcadb67
to
021e9f2
Compare
That type printing is now pretty terrible... |
It shouldn't be an issue thanks to JuliaLang/julia#36107. |
With the added export, you now have on Julia v1.6: julia> Model
ERROR: UndefVarError: Model not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:26
[2] top-level scope
@ REPL[3]:1
julia> Base.show(IOContext(stdout, :compact => true), MathOptInterface.Utilities.Model)
Model{T} where T
julia> Base.show(MathOptInterface.Utilities.Model)
MathOptInterface.Utilities.Model{T} where T
julia> print(MathOptInterface.Utilities.Model)
MathOptInterface.Utilities.Model{T} where T
julia> MathOptInterface.Utilities.Model
MathOptInterface.Utilities.Model{T} where T (alias for MathOptInterface.Utilities.GenericModel{T, MathOptInterface.Utilities.ObjectiveFunctionContainer{T}, MathOptInterface.Utilities.SingleVariableConstraints{T}, MathOptInterface.Utilities.ModelFunctionConstraints{T}} where T)
julia> using MathOptInterface.Utilities
julia> Model
Model{T} where T (alias for MathOptInterface.Utilities.GenericModel{T, MathOptInterface.Utilities.ObjectiveFunctionContainer{T}, MathOptInterface.Utilities.SingleVariableConstraints{T}, MathOptInterface.Utilities.ModelFunctionConstraints{T}} where T) |
My main issue is that it's going to cause issues with JuMP's printing of a model. Perhaps we could modify the printing on the JuMP-side though. |
Closes #1261
Closes #1502
Closes #1470