You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of this issue is to track things that we could consider changing if we release MathOptInterface v2.0. To be clear for readers, we currently have no plans to release MOI v2. This issue is just to make a note of things so we don't forget them.
Even if we do release MOI v2, we might not implement every item on this list. They're just up for discussion at some point in the process.
[Major] Make all variables belong to a set
We currently have add_variable and add_constrained_variable, and it's complicated to work out how to add a variable when copying to a new solver. Every variable should have a domain, defaulting to x in Reals(1), to distinguish constrained variables from variable-in-set constraints.
This should also help #1993, because a solver might support an attribute for variable-in-set but not constrained-variable (or vice versa).
It would also help #1402 because we'd know the set of each variable when writing a CBF file.
[Major] Remove the 0.5 in QuadraticFunction
The 0.5 factor in ScalarQuadraticFunction and VectorQuadraticFunction is a pain. It makes manually constructing functions error-prone, and writing interfaces is a guess/check of do I need a 2 or a 0.5 factor in front of the diagonals. If Vector{ScalarQuadraticTerm} was literally just a list of terms and not a sparse representation of Q, then we could shift the complexity into the solvers who would know whether they needed the factor.
Currently different constraint types are allowed to use same index values, which means we don't know the order in which constraints were added. Having a unique non-decreasing index would allow us to copy constraints by creation order , or by groups of similar constraints.
[Minor] Remove NLPBlock
We should entirely remove NLPBlock and use ScalarNonlinearFunction instead.
but this can't be true unless each scalar function has an equivalent vector function. Currently, new scalar functions will trigger a method error for this operate(vcat, ...):
The purpose of this issue is to track things that we could consider changing if we release MathOptInterface v2.0. To be clear for readers, we currently have no plans to release MOI v2. This issue is just to make a note of things so we don't forget them.
Even if we do release MOI v2, we might not implement every item on this list. They're just up for discussion at some point in the process.
[Major] Make all variables belong to a set
We currently have
add_variable
andadd_constrained_variable
, and it's complicated to work out how to add a variable when copying to a new solver. Every variable should have a domain, defaulting tox in Reals(1)
, to distinguish constrained variables from variable-in-set constraints.This should also help #1993, because a solver might support an attribute for variable-in-set but not constrained-variable (or vice versa).
It would also help #1402 because we'd know the set of each variable when writing a CBF file.
[Major] Remove the 0.5 in QuadraticFunction
The
0.5
factor in ScalarQuadraticFunction and VectorQuadraticFunction is a pain. It makes manually constructing functions error-prone, and writing interfaces is a guess/check of do I need a 2 or a 0.5 factor in front of the diagonals. IfVector{ScalarQuadraticTerm}
was literally just a list of terms and not a sparse representation ofQ
, then we could shift the complexity into the solvers who would know whether they needed the factor.Examples of bugs because of this: #2182
[Major] reconsider function structure
x-ref #863
[Major] reconsider vector funnctions
As discussed on today's (2023-06-15) nonlinear call, why not just make
The only special case are
VectorAffineFunction
andVectorQuadraticFunction
, and their structure doesn't add much at present, besides complexity.[Major] make all indices unique and non-decreasing
x-ref #2236
Currently different constraint types are allowed to use same index values, which means we don't know the order in which constraints were added. Having a unique non-decreasing index would allow us to copy constraints by creation order , or by groups of similar constraints.
[Minor] Remove NLPBlock
We should entirely remove NLPBlock and use ScalarNonlinearFunction instead.
[Minor] Restrict supports for bridges
Bridges are too permissive: #2179 (comment).
For example,
VectorizeBridge
supports any scalar function:MathOptInterface.jl/src/Bridges/Constraint/bridges/vectorize.jl
Lines 59 to 65 in a189a89
but this can't be true unless each scalar function has an equivalent vector function. Currently, new scalar functions will trigger a method error for this
operate(vcat, ...)
:MathOptInterface.jl/src/Bridges/Constraint/bridges/vectorize.jl
Lines 82 to 83 in a189a89
[Minor] Remove this method
MathOptInterface.jl/src/constraints.jl
Lines 215 to 222 in 494933f
[Minor] Rename
Utilities.operate!
toUtilities.operate!!
x-ref #2207
[Minor] remove various deprecated methods
MathOptInterface.jl/src/Utilities/operate.jl
Lines 1413 to 1434 in 95036fb
MathOptInterface.jl/src/Utilities/operate.jl
Lines 1574 to 1592 in 95036fb
MathOptInterface.jl/src/Utilities/functions.jl
Lines 2260 to 2285 in 95036fb
[Minor] Change substitute_variables
#2250
[Minor] Fix default values of attributes
get
for attributes likeTimeLimitSec
could return the solver's default if unset. Thenothing
business is confusing.[Minor] Fix test naming
Fix inconsistent naming of tests like
_infeasible_
or_INFEASIBLE_
The text was updated successfully, but these errors were encountered: