Parametrize GenericModel with objective/variable sub-model#1521
Merged
Conversation
Member
|
Not sure why ci didn't start? Ah actions are down: https://www.githubstatus.com |
Member
|
Actually I should be able to handle this. |
fcadb67 to
021e9f2
Compare
Member
|
That type printing is now pretty terrible... |
Member
Author
It shouldn't be an issue thanks to JuliaLang/julia#36107. |
Member
Author
|
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) |
Member
|
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. |
odow
approved these changes
Aug 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1261
Closes #1502
Closes #1470