Closed a24hori closed 1 year ago
You can solve nonlinear MCP if you provide the function and Jacobian directly:
An upcoming version of JuMP will support nonlinear complementarity problems: https://github.com/chkwon/PATHSolver.jl/pull/82
I appreciate your reply. I am a beginner of julia and JuMP, so I am confused some expressions in JuMP. I have one important question to use JuMP.
In the example shown in README, you demonstrate solving the LCP Mx+q \perp x>= 0; however, the standard form of the LCP also has the nonnegative constraint of Mx+q, i.e., Mx+q>=0. Is this automatically added in the model?
A complementarity problem in JuMP depends only on the bounds of the x
variable:
https://jump.dev/JuMP.jl/stable/moi/reference/standard_form/#MathOptInterface.Complements
For Mx+q ⟂ x>= 0
, If x = 0
then Mx+q >= 0
, and if x > 0
, then Mx+q == 0
.
JuMP is not like Pyomo or AMPL, where you can put inequalities on the function as well as the variable.
My guess is that @a24hori is just confused by reading the complementarity constraint in the form Mx+q ⟂ x>= 0
, while the form used elsewhere is 0<=Mx+q ⟂ x>= 0
. If I understand it correctly, then indeed, the nonnegativity condition on Mx+q is automatically introduced anyway.
The original PATH solver enables to solve a nonlinear CP by running pathmcp(...).