PIPS-NLP
|
#include <NlpGenVars.h>
Public Member Functions | |
NlpGenVars () | |
NlpGenVars (OoqpVector *x_in, OoqpVector *s_in, OoqpVector *y_in, OoqpVector *z_in, OoqpVector *v_in, OoqpVector *gamma_in, OoqpVector *w_in, OoqpVector *phi_in, OoqpVector *t_in, OoqpVector *lambda_in, OoqpVector *u_in, OoqpVector *pi_in, OoqpVector *ixlow_in, OoqpVector *ixupp_in, OoqpVector *iclow_in, OoqpVector *icupp_in) | |
NlpGenVars (LinearAlgebraPackage *la, int nx_, int my_, int mz_, OoqpVector *ixlow, OoqpVector *ixupp, OoqpVector *iclow, OoqpVector *icupp) | |
virtual | ~NlpGenVars () |
virtual double | mu () |
virtual double | mustep (Variables *step_in, double alpha) |
virtual void | saxpy (Variables *b, double alpha) |
virtual void | negate () |
virtual double | stepbound (Variables *b) |
virtual double | findBlocking (Variables *step, double &primalValue, double &primalStep, double &dualValue, double &dualStep, int &firstOrSecond) |
virtual void | findBlockingPriDual (Variables *step, double &primalValue, double &primalStep, double &dualValue, double &dualStep, int &firstOrSecond, double tau, double &alphaPri, double &alphaDual) |
virtual void | interiorPoint (double alpha, double beta) |
virtual void | shiftBoundVariables (double alpha, double beta) |
virtual int | isInteriorPoint () |
virtual double | violation () |
virtual void | print () |
virtual void | printSolution (MpsReader *reader, NlpGenData *prob, int &iErr) |
virtual void | unscaleSolution (NlpGenData *data) |
virtual void | unscaleBounds (NlpGenData *data) |
virtual int | validNonZeroPattern () |
virtual void | copy (Variables *b) |
virtual double | onenorm () |
virtual double | infnorm () |
virtual void | copyDualPri0 (Variables *b) |
virtual void | setPriZero () |
virtual void | setZero () |
virtual void | interiorPointPriX (double alpha) |
virtual void | interiorPointPriS (double alpha) |
virtual void | interiorBoundSlack (double alpha) |
virtual void | interiorBoundSlackDual (double alpha) |
virtual void | interiorPointDualY (double alpha) |
virtual void | interiorPointDualZ (double alpha) |
virtual double | stepMax_Pri (Variables *b_in, const double tau) |
virtual double | stepMax_BoundDual (Variables *b_in, const double tau) |
virtual void | takeStep (Variables *step_in, const double alphaPri, const double alphaDual, const double alphaNu, const int onlyPrimal=0) |
virtual void | SetSlackFromMaxXorY (OoqpVector *v_out, OoqpVector *x_in, OoqpVector *y_in) |
virtual void | takePrimalStep (Variables *step_in, const double alphaPri, double alphaSlack=-1) |
virtual void | takeDualStep (Variables *step_in, const double alphaPri, double alphaSlackDual=-1) |
virtual void | updateSlackAndDual (OoqpVector *tempx, OoqpVector *temps, const double k_sigma, const double mu) |
virtual double | primal_XS_InfNorm (bool XSonly=true) |
virtual double | dual_YZ_InfNorm (bool YZonly=true) |
virtual void | push_variables (OoqpVector *vec, OoqpVector *vec_slackLB, OoqpVector *vec_slackUB, OoqpVector *vec_Lb, OoqpVector *vec_Ub, OoqpVector *vec_Temp, const double k_1, const double k_2, const int ifX) |
virtual void | getErrScaling (double s_max, double &scal_comm, double &scal_dualerr) |
virtual double | computeDD () |
virtual double | computeXSDD (Variables *step_in) |
virtual void | mergeNTstep (Variables *Nstep, Variables *Tstep, Variables *Curr_Iter, Residuals *res_in) |
![]() | |
virtual | ~Variables () |
Public Attributes | |
long long | nx |
long long | nxupp |
long long | nxlow |
long long | my |
long long | mz |
long long | mcupp |
long long | mclow |
OoqpVectorHandle | ixlow |
OoqpVectorHandle | ixupp |
OoqpVectorHandle | icupp |
OoqpVectorHandle | iclow |
int | nSlack |
int | nxLOri |
int | nxUOri |
int | nsLOri |
int | nsUOri |
OoqpVectorHandle | x |
OoqpVectorHandle | s |
OoqpVectorHandle | y |
OoqpVectorHandle | z |
OoqpVectorHandle | v |
OoqpVectorHandle | gamma |
OoqpVectorHandle | w |
OoqpVectorHandle | phi |
OoqpVectorHandle | t |
OoqpVectorHandle | lambda |
OoqpVectorHandle | u |
OoqpVectorHandle | pi |
OoqpVectorHandle | PiLx |
OoqpVectorHandle | PiUx |
OoqpVectorHandle | PiLs |
OoqpVectorHandle | PiUs |
![]() | |
long long | nComplementaryVariables |
Variables for the general NLP formulation.
|
inline |
NlpGenVars::NlpGenVars | ( | OoqpVector * | x_in, |
OoqpVector * | s_in, | ||
OoqpVector * | y_in, | ||
OoqpVector * | z_in, | ||
OoqpVector * | v_in, | ||
OoqpVector * | gamma_in, | ||
OoqpVector * | w_in, | ||
OoqpVector * | phi_in, | ||
OoqpVector * | t_in, | ||
OoqpVector * | lambda_in, | ||
OoqpVector * | u_in, | ||
OoqpVector * | pi_in, | ||
OoqpVector * | ixlow_in, | ||
OoqpVector * | ixupp_in, | ||
OoqpVector * | iclow_in, | ||
OoqpVector * | icupp_in | ||
) |
constructor in which the data and variable pointers are set to point to the given arguments
NlpGenVars::NlpGenVars | ( | LinearAlgebraPackage * | la, |
int | nx_, | ||
int | my_, | ||
int | mz_, | ||
OoqpVector * | ixlow, | ||
OoqpVector * | ixupp, | ||
OoqpVector * | iclow, | ||
OoqpVector * | icupp | ||
) |
constructor that creates variables objects of specified dimensions.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
copy the variables this->copyFrom(b)
Implements Variables.
|
virtual |
copy dual variables
|
virtual |
|
virtual |
Performs the same function as stepbound, and supplies additional information about which component of the nonnegative variables is responsible for restricting alpha. In terms of the abstract formulation, the components have the following meanings.
primalValue | the value of the blocking component of the primal variables (u,t,v,w). |
primalStep | the corresponding value of the blocking component of the primal step variables (b->u,b->t,b->v,b->w). |
dualValue | the value of the blocking component of the dual variables (lambda,pi,phi,gamma). |
dualStep | the corresponding value of the blocking component of the dual step variables (b->lambda,b->pi,b->phi,b->gamma). |
firstOrSecond | 1 if the primal step is blocking, 2 if the dual step is block, 0 if no step is blocking. |
Implements Variables.
|
virtual |
|
virtual |
|
virtual |
compute the inf-norm of the variables
Implements Variables.
|
virtual |
|
virtual |
|
virtual |
sets components of (u,t,v,w) to alpha and of (lambda,pi,phi,gamma) to beta
Implements Variables.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
check whether this is an interior point. Useful as a sanity check.
|
virtual |
Implements Variables.
|
virtual |
computes mu = (t'lambda +u'pi + v'gamma + w'phi)/(mclow+mcupp+nxlow+nxupp)
Implements Variables.
|
virtual |
compute the complementarity gap resulting from a step of length "alpha" along direction "step"
Implements Variables.
|
virtual |
negate the value of all the variables in this structure
Implements Variables.
|
virtual |
compute the 1-norm of the variables
Implements Variables.
|
virtual |
|
virtual |
print the variables
Reimplemented from Variables.
|
virtual |
|
virtual |
|
virtual |
given variables b, compute a <- a + alpha b, where a are the variables in this class
Implements Variables.
|
virtual |
|
virtual |
|
virtual |
set all componetn to zero
Implements Variables.
|
virtual |
add alpha to components of (u,t,v,w) and beta to components of (lambda,pi,phi,gamma)
Implements Variables.
|
virtual |
calculate the largest alpha in (0,1] such that the nonnegative variables stay nonnegative in the given search direction. In the general NLP problem formulation, this is the largest value of alpha such that (t,u,v,w,lambda,pi,phi,gamma) + alpha * (b->t,b->u,b->v,b->w,b->lambda,b->pi,b->phi,b->gamma) >= 0.
Implements Variables.
|
virtual |
|
virtual |
compute max step size by bound-frac rule, split pri and dual steps
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
The amount by which the current variables violate the non-negativity constraints.
Implements Variables.
OoqpVectorHandle NlpGenVars::gamma |
OoqpVectorHandle NlpGenVars::iclow |
OoqpVectorHandle NlpGenVars::icupp |
OoqpVectorHandle NlpGenVars::ixlow |
OoqpVectorHandle NlpGenVars::ixupp |
OoqpVectorHandle NlpGenVars::lambda |
long long NlpGenVars::mclow |
long long NlpGenVars::mcupp |
long long NlpGenVars::my |
long long NlpGenVars::mz |
int NlpGenVars::nSlack |
int NlpGenVars::nsLOri |
int NlpGenVars::nsUOri |
long long NlpGenVars::nx |
int NlpGenVars::nxLOri |
long long NlpGenVars::nxlow |
int NlpGenVars::nxUOri |
long long NlpGenVars::nxupp |
OoqpVectorHandle NlpGenVars::phi |
OoqpVectorHandle NlpGenVars::pi |
OoqpVectorHandle NlpGenVars::PiLs |
OoqpVectorHandle NlpGenVars::PiLx |
OoqpVectorHandle NlpGenVars::PiUs |
OoqpVectorHandle NlpGenVars::PiUx |
OoqpVectorHandle NlpGenVars::s |
OoqpVectorHandle NlpGenVars::t |
OoqpVectorHandle NlpGenVars::u |
OoqpVectorHandle NlpGenVars::v |
OoqpVectorHandle NlpGenVars::w |
OoqpVectorHandle NlpGenVars::x |
OoqpVectorHandle NlpGenVars::y |
OoqpVectorHandle NlpGenVars::z |