Darwin
1.10(beta)
|
Solves equality constrained linear programs with positivity constraints via the log-barrier method. More...
Public Member Functions | |
drwnLPSolver (const VectorXd &c, const MatrixXd &A, const VectorXd &b) | |
construct a problem ![]() | |
drwnLPSolver (const VectorXd &c, const MatrixXd &A, const VectorXd &b, const VectorXd &lb, const VectorXd &ub) | |
construct a problem ![]() | |
~drwnLPSolver () | |
destructor | |
void | initialize (const VectorXd &x) |
initialization of a feasible point | |
double | solve () |
solve and return objective (solution can be obtained from solution function) More... | |
const VectorXd & | solution () const |
return the current estimate of the solution | |
int | size () const |
return the number of dimensions of the state space | |
double | operator[] (unsigned i) const |
access the i-th dimension of the current solution | |
Static Public Attributes | |
static double | t0 = 1.0e-3 |
initial barrier function multiplier | |
static double | mu = 10.0 |
barrier function multiplier update | |
static double | eps = 1.0e-6 |
stopping tolerance | |
static unsigned | maxiters = 1000 |
maximum number of newton steps per iteration | |
static double | alpha = 0.01 |
line search stopping criterion in (0, 1/2) | |
static double | beta = 0.5 |
line search backtracking parameter in (0, 1) | |
Protected Member Functions | |
bool | isUnbounded (unsigned i) const |
returns true if the i-th variable is unbounded | |
bool | isWithinBounds (const VectorXd &x) const |
returns true if a point is strictly within the lower and upper bounds | |
double | barrierFunction (const VectorXd &x) const |
computes the barrier function for a given assignment | |
Protected Attributes | |
VectorXd | _c |
linear term in the objective function | |
MatrixXd | _A |
linear equality constraint matrix | |
VectorXd | _b |
linear equality constraint vector | |
VectorXd | _lb |
lower bound for each variable (-DRWN_DBL_MAX for unbounded below) | |
VectorXd | _ub |
upped bound for each variable (DRWN_DBL_MAX for unbounded above) | |
VectorXd | _x |
current estimate of solution | |
Solves equality constrained linear programs with positivity constraints via the log-barrier method.
Solves linear programs of the form:
or, more generally,
General inequality constraints of the form can be handled by introducing slack variables, e.g.,
with
.
The following code snippet shows an example of solving the problem .
See:
double drwnLPSolver::solve | ( | ) |