项目作者: chkwon

项目描述 :
provides a modeling interface for mixed complementarity problems (MCP) and math programs with equilibrium problems (MPEC) via JuMP
高级语言: Julia
项目地址: git://github.com/chkwon/Complementarity.jl.git
创建时间: 2016-04-27T03:18:00Z
项目社区:https://github.com/chkwon/Complementarity.jl

开源协议:Other

下载


Complementarity.jl

Build Status
codecov

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)

NOTE: Differences between PATHSolver.jl and Complementarity.jl:

  • PATHSolver.jl provides a wrapper for the C API of the PATH solver.
  • PATHSolver.jl also enables JuMP for solving MCP, but limited to linear problems.
  • Complementarity.jl provides a JuMP extension for solving MCP, both linear and nonlinear, using the C API wrapper in PATHSolver.jl.

MCP Documentation

  1. F(x) lb x ub

A very simple example:

  1. (x+2) x = 0, x 0, x+2 0
  1. using Complementarity, JuMP
  2. m = MCPModel()
  3. @variable(m, x >= 0)
  4. @mapping(m, F, x+2)
  5. @complementarity(m, F, x)
  6. status = solveMCP(m)
  7. @show result_value(x)

Mathematical Programs with Equilibrium Constraints (MPEC)

NOTE: For solving MPEC, JuMP.jl v0.21 has started supporting complementarity constraints. At this moment, GAMS.jl and KNITRO support complementarity constraints.

MPEC Documentation

  1. min f(x)
  2. s.t. g(x) 0
  3. F(x) lb x ub

A very simple example:

  1. min x^3
  2. s.t. (x+2) x = 0, x 0, x+2 0
  1. using JuMP, Ipopt, Complementarity
  2. m = Model(Ipopt.Optimizer)
  3. @variable(m, x>=0)
  4. @NLobjective(m, Min, x^3)
  5. @complements(m, 0 <= x+2, x >= 0)
  6. solve(m)
  7. @show getvalue(x)

Installation

  1. Pkg.add("Complementarity")

This will also install a few other packages.