% CPLEXLP - linear programming by the simplex method.
% Package written in C-language.
% Sparsity is preserved.
%
% CPLEXLP solves a linear program on the form
%
%       min  c'x
%       s.t  Ax | b
%            l <= x <= u
%
% where | is any of =, <= , >=.
%
% Calling syntax: [obj,x,lambda,status,cstat,it] = cplexlp(c,A,b,l,u,le,ge,opts)
%
% where 'le' ('ge') are indices corresponding to equations 
% with <=  ( >= ) and can be omitted.
% 'opts' is a structure that contains option pairs, eg struct('lpmethod',4)
%
% valid options are currently, lpmethod, itlim, preind, output
%   the first three are standard cplex options, the latter switches
%   output on/off
%
% If 'l','u' are omitted, x is assumed non-negative.
%
% On exit 'status' has the following interpretation:
%
%                 1 optimal solution found
%                 2 problem unbounded
%                 3 problem infeasible
%                 4 problem infeasible or unbounded
%                 9 problem non-optimal, singularities in Phase II
%                10 problem non-optimal, singularities in Phase I
%
% 'cstat' tells the status of the columns:
%
%                  cstat[i] = 0   variable at lower bound
%                  cstat[i] = 1   variable is basic
%                  cstat[i] = 2   variable at upper bound
%                  cstat[i] = 3   variable free and non-basic
%
% 'it' is the total number of iterations.
%
