|
|
|||
Warning, file /include/root/TQpProbBase.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // @(#)root/quadp:$Id$ 0002 // Author: Eddy Offermann May 2004 0003 0004 /************************************************************************* 0005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 0006 * All rights reserved. * 0007 * * 0008 * For the licensing terms see $ROOTSYS/LICENSE. * 0009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0010 *************************************************************************/ 0011 0012 /************************************************************************* 0013 * Parts of this file are copied from the OOQP distribution and * 0014 * are subject to the following license: * 0015 * * 0016 * COPYRIGHT 2001 UNIVERSITY OF CHICAGO * 0017 * * 0018 * The copyright holder hereby grants you royalty-free rights to use, * 0019 * reproduce, prepare derivative works, and to redistribute this software* 0020 * to others, provided that any changes are clearly documented. This * 0021 * software was authored by: * 0022 * * 0023 * E. MICHAEL GERTZ gertz@mcs.anl.gov * 0024 * Mathematics and Computer Science Division * 0025 * Argonne National Laboratory * 0026 * 9700 S. Cass Avenue * 0027 * Argonne, IL 60439-4844 * 0028 * * 0029 * STEPHEN J. WRIGHT swright@cs.wisc.edu * 0030 * Computer Sciences Department * 0031 * University of Wisconsin * 0032 * 1210 West Dayton Street * 0033 * Madison, WI 53706 FAX: (608)262-9777 * 0034 * * 0035 * Any questions or comments may be directed to one of the authors. * 0036 * * 0037 * ARGONNE NATIONAL LABORATORY (ANL), WITH FACILITIES IN THE STATES OF * 0038 * ILLINOIS AND IDAHO, IS OWNED BY THE UNITED STATES GOVERNMENT, AND * 0039 * OPERATED BY THE UNIVERSITY OF CHICAGO UNDER PROVISION OF A CONTRACT * 0040 * WITH THE DEPARTMENT OF ENERGY. * 0041 *************************************************************************/ 0042 0043 #ifndef ROOT_TQpProbBase 0044 #define ROOT_TQpProbBase 0045 0046 #include "TError.h" 0047 0048 #include "TQpVar.h" 0049 #include "TQpDataBase.h" 0050 #include "TQpResidual.h" 0051 0052 #include "TMatrixD.h" 0053 0054 /////////////////////////////////////////////////////////////////////////// 0055 // // 0056 // default general problem formulation: // 0057 // // 0058 // minimize c' x + ( 1/2 ) x' * Q x ; // 0059 // subject to A x = b ; // 0060 // clo <= C x <= cup ; // 0061 // xlo <= x <= xup ; // 0062 // // 0063 // The general linear equality constraints must have either an upper // 0064 // or lower bound, but need not have both bounds. The variables may have// 0065 // no bounds; an upper bound; a lower bound or both an upper and lower // 0066 // bound. // 0067 // // 0068 // However, for many (possibly most) QP's, the matrices in the // 0069 // formulation have structure that may be exploited to solve the // 0070 // problem more efficiently. This abstract problem formulation contains // 0071 // a setup such that one can derive and add special formulations . // 0072 // The optimality conditions of the simple QP defined above are // 0073 // follows: // 0074 // // 0075 // rQ = c + Q * x - A' * y - C' * z = 0 // 0076 // rA = A * x - b = 0 // 0077 // rC = C * x - s - d = 0 // 0078 // r3 = S * z = 0 // 0079 // s, z >= 0 // 0080 // // 0081 // Where rQ, rA, rC and r3 newly defined quantities known as residual // 0082 // vectors and x, y, z and s are variables of used in solution of the // 0083 // QPs. // 0084 // // 0085 /////////////////////////////////////////////////////////////////////////// 0086 0087 class TQpLinSolverBase; 0088 class TQpProbBase : public TObject 0089 { 0090 0091 public: 0092 Int_t fNx; // number of elements in x 0093 Int_t fMy; // number of rows in A and b 0094 Int_t fMz; // number of rows in C 0095 0096 TQpProbBase(); 0097 TQpProbBase(Int_t nx,Int_t my,Int_t mz); 0098 TQpProbBase(const TQpProbBase &another); 0099 0100 ~TQpProbBase() override {} 0101 0102 virtual TQpDataBase *MakeData (TVectorD &c, 0103 TMatrixDBase &Q_in, 0104 TVectorD &xlo, TVectorD &ixlo, 0105 TVectorD &xup, TVectorD &ixup, 0106 TMatrixDBase &A_in,TVectorD &bA, 0107 TMatrixDBase &C_in, 0108 TVectorD &clo, TVectorD &iclo, 0109 TVectorD &cup, TVectorD &icup) = 0; 0110 virtual TQpResidual *MakeResiduals(const TQpDataBase *data) = 0; 0111 virtual TQpVar *MakeVariables(const TQpDataBase *data) = 0; 0112 virtual TQpLinSolverBase *MakeLinSys (const TQpDataBase *data) = 0; 0113 0114 virtual void JoinRHS (TVectorD &rhs_in,TVectorD &rhs1_in,TVectorD &rhs2_in,TVectorD &rhs3_in) = 0; 0115 virtual void SeparateVars(TVectorD &x_in,TVectorD &y_in,TVectorD &z_in,TVectorD &vars_in) = 0; 0116 0117 TQpProbBase &operator= (const TQpProbBase &source); 0118 0119 ClassDefOverride(TQpProbBase,1) // Qp problem formulation base class 0120 }; 0121 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|