00001 #ifndef NLPSLACKLINSYS
00002 #define NLPSLACKLINSYS
00003
00004 #include "NlpLinsys.hh"
00005
00006 class PrimalDualSystem;
00007 typedef Handle<PrimalDualSystem> PrimalDualSystemHandle;
00008
00009 class IotrVector;
00010 typedef Handle<IotrVector> IotrVectorHandle;
00011
00012 class ElementGather;
00013 typedef Handle<ElementGather> ElementGatherHandle;
00014
00015 class ElementTransfer;
00016 typedef Handle<ElementTransfer> ElementTransferHandle;
00017
00018 class NlpSlack;
00019 typedef Handle<NlpSlack> NlpSlackHandle;
00020
00026 class NlpSlackLinsys : public NlpLinsys {
00027 protected:
00028 PrimalDualSystemHandle mPdSystem;
00029
00030 ElementGatherHandle mXXinX, mTinX, mUinX;
00031 ElementGatherHandle mYYinY, mGGinG, mTinG, UinG;
00032 ElementGatherHandle mLinLt, mTinLt;
00033 ElementGatherHandle mPinPu, mUinPu;
00034
00035 ElementTransferHandle mYtoLt, mYtoPu;
00036 IotrVectorHandle mDt, mDtgInv, mDu, mDugInv;
00037
00038 int mMc;
00039
00040
00041 IotrVectorHandle mXX, mT, mU, mYY, mGG, mLt, mPu;
00042
00043 void splitComponents( IotrVector & x, IotrVector & y,
00044 IotrVector & g, IotrVector & l,
00045 IotrVector & p,
00046 IotrVector & xx,
00047 IotrVector & t, IotrVector & u,
00048 IotrVector & yy, IotrVector & gg,
00049 IotrVector & lt, IotrVector & lu );
00050 public:
00051 NlpSlackLinsys( ElementGather * aXXinX, ElementGather * aTinX,
00052 ElementGather * aUinX,
00053 ElementGather * aYYinCC,
00054 ElementGather * aYYinY, ElementGather * aTinY,
00055 ElementGather * aUinY,
00056 ElementGather * aGGinG, ElementGather * aTinG,
00057 ElementGather * aUinG,
00058 ElementGather * aXXlowI, ElementGather * aXXuppI,
00059 NlpSlack * nlp );
00060
00061 virtual void factor( NlpGrads & grads,
00062 NlpHessian & hessian,
00063 NlpLinsysDiag & diag );
00064
00065 virtual void newtonStep( NlpLinsysSol & step, NlpGrads & grads );
00066
00067 virtual int isConvex();
00068
00069 virtual NlpLinsysDiag * newDiagonal();
00070 virtual NlpLinsysSol * newSolutionVector();
00071 };
00072
00073
00074 typedef Handle<NlpSlackLinsys> NlpSlackLinsysHandle;
00075
00076 #endif