-
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
Add VectorNonlinearFunction #2201
Conversation
Marking this as blocked by #2203 |
One thing to consider: struct VectorFunction{F} <: MOI.AbstractVectorFunction
elements::Vector{F}
end
const VectorOfVariables = VectorFunction{VariableIndex}
const VectorNonlinearFunction = VectorFunction{Any} It could simplify because we then don't have to implement const VectorPolynomialFunction = Vector{ScalarPolynomialFunction} and get a working vector polynomial function in one line ! One might indeed wonder why we need to define our own vector type when Julia already has One could even define an |
This is an interesting suggestion. We'd need backward compat for |
This is not fun. I think I'm going to revert the |
The tests seem to pass except for some printing issues though |
The tests don't cover the code enough. If you try running the tests with Clp/SCS etc lots of things break. |
This is still blocked by the |
efecede
to
233a93b
Compare
Okay. One massive source of confusion for me had been failures with SCS. Which were because the bridge in SCS was wrong: jump-dev/SCS.jl#277. It used to do this: julia> MOI.Bridges.print_active_bridges(model, MOI.VectorNonlinearFunction, MOI.PositiveSemidefiniteConeTriangle)
* Unsupported constraint: MOI.GenericVectorFunction{Any}-in-MOI.PositiveSemidefiniteConeTriangle
| bridged by:
| SCS.ScaledPSDConeBridge{Float64, G} where G
| may introduce:
| * Supported constraint: MOI.VectorAffineFunction{Float64}-in-SCS.ScaledPSDCone So no wonder lots of weird unrelated things broke. But I only dug deep enough once I figured out it wasn't a method error with the various operate methods. |
So I was looking into
|
Yes, I think every row should be an SNF. The difference of
Maybe it should use |
Should MathOptInterface.jl/src/Utilities/functions.jl Lines 2110 to 2120 in 5afc08b
Ditto with MathOptInterface.jl/src/Utilities/functions.jl Lines 2044 to 2057 in 5afc08b
|
I don't think it has to be a copy. |
PATHSolver.jl and MultiObjectiveAlgorithms.jl are both passing tests with this branch, so I don't think we're far away. Just need https://github.com/jump-dev/MathOptInterface.jl/actions/runs/5383997349 to finish. |
I'll take a look over the weekend |
Co-authored-by: Miles Lubin <[email protected]>
Resurrecting
VectorNonlinearFunction
from the depths of #2059.There are two main motivating problems for this:
VectorNonlinearFunction-in-Complements
constrains for nonlinear complementarity problemsObjectiveFunction{VectorNonlinearFunction}
for nonlinear multi-objective problemsDocumentation
https://jump.dev/MathOptInterface.jl/previews/PR2201/reference/standard_form/#MathOptInterface.VectorNonlinearFunction
I also removed this from #2059 because there we a lot of issues with the bridges, but I have a better handle on what to do now, and we can easily run
solver-tests
to catch the culprits.https://github.com/jump-dev/MathOptInterface.jl/actions/runs/5218217869