provides a modeling interface for mixed complementarity problems (MCP) and math programs with equilibrium problems (MPEC) via JuMP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples first test passing v0.7 Oct 20, 2018
src # @exportall JuMP Oct 20, 2018
test first test passing v0.7 Oct 20, 2018
.gitignore don't sync path.opt Aug 21, 2016
.travis.yml travis update Oct 20, 2018
LICENSE.md Complementarity.jl generated files. Apr 27, 2016
MCP.md MCP.md update Aug 9, 2018
MPEC.md doc update Aug 29, 2016
README.md Update README.md May 1, 2018
REQUIRE mpec test passing Oct 20, 2018
appveyor.yml Update appveyor.yml Oct 21, 2018

README.md

Complementarity.jl

Complementarity Complementarity Complementarity

Build Status Build status Coverage Status

This package provides modeling language for (1) mixed complementarity problems (MCP) and (2) mathematical programs with equilibrium problems (MPEC).

NOTE @complmentarity for MCP and @complements for MPEC.

Mixed Complementarity Problems (MCP)

MCP Documentation

F(x) ⟂ lb ≤ x ≤ ub

A very simple example:

(x+2) x = 0,  x ≥ 0,   x+2 ≥ 0
using Complementarity, JuMP
m = MCPModel()
@variable(m, x >= 0)
@mapping(m, F, x+2)
@complementarity(m, F, x)
status = solveMCP(m)
@show getvalue(x)

Mathematical Programs with Equilibrium Constraints (MPEC)

MPEC Documentation

min  f(x)
s.t. g(x) ≤ 0
     F(x) ⟂ lb ≤ x ≤ ub

A very simple example:

min  x^3
s.t. (x+2) x = 0,  x ≥ 0,   x+2 ≥ 0
using JuMP, Ipopt, Complementarity
m = Model(solver=IpoptSolver())
@variable(m, x>=0)
@NLobjective(m, Min, x^3)
@complements(m, 0 <= x+2,   x >= 0)
solve(m)
@show getvalue(x)

Installation

Pkg.add("Complementarity")

This will also install a few other packages.