File Exchange

image thumbnail

LCP / MCP solver (Newton-based)

version (2.79 KB) by Yuval
Solve the Linear Complementarity Problem.


Updated 04 Aug 2008

View License

x = LCP(M,q) solves the LCP

x >= 0
Mx + q >= 0
x'(Mx + q) = 0

x = LCP(M,q,l,u) solves the generalized LCP (a.k.a MCP)

l < x < u => Mx + q = 0
x = u => Mx + q < 0
l = x => Mx + q > 0

x = LCP(M,q,l,u,x0,display) allows the optional initial value 'x0' and
a binary flag 'display' which controls the display of iteration data.

Comments and Ratings (3)

Sara s

This does not seem to work?? Considering a simple one-dimensional system with M=1 and q=1 return x=1 and Mx+q=2 (complementarity condition not satisfied) while it should be x=0 and Mx+q=1. I've played with the tolerances without success...



MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux