ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
math
quadp
inc
TQpProbBase.h
Go to the documentation of this file.
1
// @(#)root/quadp:$Id$
2
// Author: Eddy Offermann May 2004
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
/*************************************************************************
13
* Parts of this file are copied from the OOQP distribution and *
14
* are subject to the following license: *
15
* *
16
* COPYRIGHT 2001 UNIVERSITY OF CHICAGO *
17
* *
18
* The copyright holder hereby grants you royalty-free rights to use, *
19
* reproduce, prepare derivative works, and to redistribute this software*
20
* to others, provided that any changes are clearly documented. This *
21
* software was authored by: *
22
* *
23
* E. MICHAEL GERTZ gertz@mcs.anl.gov *
24
* Mathematics and Computer Science Division *
25
* Argonne National Laboratory *
26
* 9700 S. Cass Avenue *
27
* Argonne, IL 60439-4844 *
28
* *
29
* STEPHEN J. WRIGHT swright@cs.wisc.edu *
30
* Computer Sciences Department *
31
* University of Wisconsin *
32
* 1210 West Dayton Street *
33
* Madison, WI 53706 FAX: (608)262-9777 *
34
* *
35
* Any questions or comments may be directed to one of the authors. *
36
* *
37
* ARGONNE NATIONAL LABORATORY (ANL), WITH FACILITIES IN THE STATES OF *
38
* ILLINOIS AND IDAHO, IS OWNED BY THE UNITED STATES GOVERNMENT, AND *
39
* OPERATED BY THE UNIVERSITY OF CHICAGO UNDER PROVISION OF A CONTRACT *
40
* WITH THE DEPARTMENT OF ENERGY. *
41
*************************************************************************/
42
43
#ifndef ROOT_TQpProbBase
44
#define ROOT_TQpProbBase
45
46
#ifndef ROOT_TError
47
#include "
TError.h
"
48
#endif
49
50
#ifndef ROOT_TQpVar
51
#include "
TQpVar.h
"
52
#endif
53
#ifndef ROOT_TQpDataBase
54
#include "
TQpDataBase.h
"
55
#endif
56
#ifndef ROOT_TQpLinSolverBase
57
#include "
TQpLinSolverBase.h
"
58
#endif
59
#ifndef ROOT_TQpResidual
60
#include "
TQpResidual.h
"
61
#endif
62
63
#ifndef ROOT_TMatrixD
64
#include "
TMatrixD.h
"
65
#endif
66
67
///////////////////////////////////////////////////////////////////////////
68
// //
69
// default general problem formulation: //
70
// //
71
// minimize c' x + ( 1/2 ) x' * Q x ; //
72
// subject to A x = b ; //
73
// clo <= C x <= cup ; //
74
// xlo <= x <= xup ; //
75
// //
76
// The general linear equality constraints must have either an upper //
77
// or lower bound, but need not have both bounds. The variables may have//
78
// no bounds; an upper bound; a lower bound or both an upper and lower //
79
// bound. //
80
// //
81
// However, for many (possibly most) QP's, the matrices in the //
82
// formulation have structure that may be exploited to solve the //
83
// problem more efficiently. This abstract problem formulation contains //
84
// a setup such that one can derive and add special formulations . //
85
// The optimality conditions of the simple QP defined above are //
86
// follows: //
87
// //
88
// rQ = c + Q * x - A' * y - C' * z = 0 //
89
// rA = A * x - b = 0 //
90
// rC = C * x - s - d = 0 //
91
// r3 = S * z = 0 //
92
// s, z >= 0 //
93
// //
94
// Where rQ, rA, rC and r3 newly defined quantities known as residual //
95
// vectors and x, y, z and s are variables of used in solution of the //
96
// QPs. //
97
// //
98
///////////////////////////////////////////////////////////////////////////
99
100
class
TQpLinSolverBase
;
101
class
TQpProbBase
:
public
TObject
102
{
103
104
public
:
105
Int_t
fNx
;
// number of elements in x
106
Int_t
fMy
;
// number of rows in A and b
107
Int_t
fMz
;
// number of rows in C
108
109
TQpProbBase
();
110
TQpProbBase
(
Int_t
nx
,
Int_t
my,
Int_t
mz);
111
TQpProbBase
(
const
TQpProbBase
&another);
112
113
virtual
~TQpProbBase
() {}
114
115
virtual
TQpDataBase
*
MakeData
(
TVectorD
&
c
,
116
TMatrixDBase
&Q_in,
117
TVectorD
&xlo,
TVectorD
&ixlo,
118
TVectorD
&xup,
TVectorD
&ixup,
119
TMatrixDBase
&A_in,
TVectorD
&bA,
120
TMatrixDBase
&C_in,
121
TVectorD
&clo,
TVectorD
&iclo,
122
TVectorD
&cup,
TVectorD
&icup) = 0;
123
virtual
TQpResidual
*
MakeResiduals
(
const
TQpDataBase
*data) = 0;
124
virtual
TQpVar
*
MakeVariables
(
const
TQpDataBase
*data) = 0;
125
virtual
TQpLinSolverBase
*
MakeLinSys
(
const
TQpDataBase
*data) = 0;
126
127
virtual
void
JoinRHS
(
TVectorD
&rhs_in,
TVectorD
&rhs1_in,
TVectorD
&rhs2_in,
TVectorD
&rhs3_in) = 0;
128
virtual
void
SeparateVars
(
TVectorD
&x_in,
TVectorD
&y_in,
TVectorD
&z_in,
TVectorD
&vars_in) = 0;
129
130
TQpProbBase
&
operator=
(
const
TQpProbBase
&source);
131
132
ClassDef
(
TQpProbBase
,1)
// Qp problem formulation base class
133
};
134
#endif
nx
const int nx
Definition:
kalman.C:16
TQpDataBase
Definition:
TQpDataBase.h:66
TQpProbBase
Definition:
TQpProbBase.h:101
TQpProbBase::MakeVariables
virtual TQpVar * MakeVariables(const TQpDataBase *data)=0
TQpResidual
Definition:
TQpResidual.h:69
TVectorT< Double_t >
TQpProbBase::~TQpProbBase
virtual ~TQpProbBase()
Definition:
TQpProbBase.h:113
TQpDataBase.h
Int_t
int Int_t
Definition:
RtypesCore.h:41
TQpProbBase::MakeResiduals
virtual TQpResidual * MakeResiduals(const TQpDataBase *data)=0
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TQpProbBase::fNx
Int_t fNx
Definition:
TQpProbBase.h:105
TQpProbBase::fMz
Int_t fMz
Definition:
TQpProbBase.h:107
TQpVar.h
TQpProbBase::SeparateVars
virtual void SeparateVars(TVectorD &x_in, TVectorD &y_in, TVectorD &z_in, TVectorD &vars_in)=0
TQpLinSolverBase
Definition:
TQpLinSolverBase.h:78
TError.h
TQpLinSolverBase.h
TQpProbBase::MakeLinSys
virtual TQpLinSolverBase * MakeLinSys(const TQpDataBase *data)=0
TMatrixTBase
Definition:
TMatrixDBasefwd.h:27
TQpProbBase::JoinRHS
virtual void JoinRHS(TVectorD &rhs_in, TVectorD &rhs1_in, TVectorD &rhs2_in, TVectorD &rhs3_in)=0
TQpProbBase::fMy
Int_t fMy
Definition:
TQpProbBase.h:106
TQpProbBase::TQpProbBase
TQpProbBase()
TObject
Mother of all ROOT objects.
Definition:
TObject.h:58
TMatrixD.h
TQpVar
Definition:
TQpVar.h:65
sample_config.c
tuple c
Definition:
sample_config.py:3
TQpProbBase::MakeData
virtual TQpDataBase * MakeData(TVectorD &c, TMatrixDBase &Q_in, TVectorD &xlo, TVectorD &ixlo, TVectorD &xup, TVectorD &ixup, TMatrixDBase &A_in, TVectorD &bA, TMatrixDBase &C_in, TVectorD &clo, TVectorD &iclo, TVectorD &cup, TVectorD &icup)=0
TQpResidual.h
TQpProbBase::operator=
TQpProbBase & operator=(const TQpProbBase &source)
Assignment operator.
Definition:
TQpProbBase.cxx:94