Skip to content

[DNMY] Add MOI wrapper for CCOpt#63

Open
frapac wants to merge 1 commit into
masterfrom
fp/moi_interface
Open

[DNMY] Add MOI wrapper for CCOpt#63
frapac wants to merge 1 commit into
masterfrom
fp/moi_interface

Conversation

@frapac
Copy link
Copy Markdown
Member

@frapac frapac commented Apr 30, 2026

With this PR, we can solve a JuMP model with complementarity constraints using CCOpt:

using JuMP
using CCOpt
using MathOptComplements
using NLPModelsJuMP

function fletcher_leyffer_ex2_model()
    model = Model()
    @variable(model, z[1:2] >= 0)
    @objective(model, Min, z[1] + z[2])
    @constraint(model, z[2]^2 >= 1)
    @constraint(model, [z[1], z[2]]  MOI.Complements(2))
    return model
end


model = fletcher_leyffer_ex2_model()
MathOptComplements.Bridges.add_all_bridges(model)
set_optimizer(model, CCOpt.Optimizer)
JuMP.optimize!(model)

The MOI wrapper is developed as a package extension. It requires MathOptComplements to reformulate automatically the mixed-complementarity constraints in MOI as strict complementarity.

cc @blegat

@frapac frapac requested a review from apozharski April 30, 2026 10:01
@frapac frapac changed the title Add MOI wrapper for CCOpt [DNMY] Add MOI wrapper for CCOpt Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant