A Julia package for solving Mathematical Programs with Complementarity Constraints (MPCCs). For details check out the implementation paper.
To install CCOpt, simply proceed to
pkg> add https://github.com/MadNLP/CCOpt.jlCCOpt takes as input a nonlinear program formulated with NLPModels. Taking a nlp as input, a MPCC is defined as
using CCOpt
mpcc = CCOpt.MPCCModelVarVar(nlp, ind_x1, ind_x2)with ind_x1 (resp. ind_x2) the indices of the variables appearing in the left-hand complementarity
(resp. right-hand complementarity).
Once specified, you can solve the MPCC problem implemented in mpcc using the relaxation method as
solver = CCOpt.RelaxationSolver(mpcc)
stats = CCOpt.solve_homotopy!(solver)All the results (primal and dual solutions, objective, etc.) are stored in stats.
Alternatively, you can solve mpcc using the penalty method as
solver = CCOpt.PenaltySolver(mpcc)
stats = CCOpt.solve_homotopy!(solver)If you use CCOpt.jl in your work, please cite:
@article{Pozharskiy2026,
title={CCOpt: an Open-Source Solver for Large-Scale Mathematical Programs with Complementarity Constraints},
author={Pozharskiy, Anton and Pacaud, Fran{\c{c}}ois and Diehl, Moritz and Nurkanovi{\'c}, Armin},
journal={arXiv preprint arXiv:2604.18726},
year={2026}
}