Skip to content

Commit

Permalink
Update complementarity.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Aug 17, 2023
1 parent 9fbb890 commit 924b8dd
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docs/src/tutorials/nonlinear/complementarity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,36 @@

# # Mixed complementarity problems

# This tutorial is a collection of examples of small mixed-complementarity
# programs.
# This tutorial is a collection of mixed complementarity programs.

# This tutorial uses the following packages:

using JuMP
import PATHSolver
import Test #src

# ## Background

# A mixed complementarity problem has the form:
# ```math
# \begin{align}
# \;\;\text{s.t.} & F_i(x) \perp x_i & i = 1 \ldots n \\
# & l_i \le x_i \le u_i & i = 1 \ldots n.
# \end{align}
# ```
# where the ``\perp`` constraint enforces the following relations:
#
# - If ``l_i < x_i < u_i``, then ``F_i(x) == 0``
# - If ``l_i == x_i``, then ``F_i(x) \ge 0``
# - If ``x_i == u_i``, then ``F_i(x) \le 0``

# You may have seen a complementarity problem written as
# ``0 \le F(x) \perp x \ge 0``. This is a special case of a mixed
# complementarity problem in which ``l_i = 0`` and ``u_i = \infty``.

# Importantly, a mixed complementarity problem does not have an objective, and
# no other constraint types are present.

# ## Linear complementarity

# Form a mixed complementarity problem using the perp symbol `⟂` (type
Expand Down

0 comments on commit 924b8dd

Please sign in to comment.