Cgl 0.59.7

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClpQuadraticObjective.hpp
Go to the documentation of this file.
1 /* $Id: ClpQuadraticObjective.hpp 1665 2011-01-04 17:55:54Z lou $ */
2 // Copyright (C) 2003, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef ClpQuadraticObjective_H
7 #define ClpQuadraticObjective_H
8
9 #include "ClpObjective.hpp"
10 #include "CoinPackedMatrix.hpp"
11
12 //#############################################################################
13
18 class ClpQuadraticObjective : public ClpObjective {
19
20 public:
21
23
24
31 virtual double * gradient(const ClpSimplex * model,
32 const double * solution, double & offset, bool refresh,
33 int includeLinear = 2);
35
37 virtual double reducedGradient(ClpSimplex * model, double * region,
38 bool useFeasibleCosts);
45 virtual double stepLength(ClpSimplex * model,
46 const double * solution,
47 const double * change,
48 double maximumTheta,
49 double & currentObj,
50 double & predictedObj,
51 double & thetaObj);
53 virtual double objectiveValue(const ClpSimplex * model, const double * solution) const ;
54 virtual void resize(int newNumberColumns) ;
56 virtual void deleteSome(int numberToDelete, const int * which) ;
58 virtual void reallyScale(const double * columnScale) ;
62 virtual int markNonlinear(char * which);
63
65
66
68
69 ClpQuadraticObjective();
71
73 ClpQuadraticObjective(const double * linearObjective, int numberColumns,
74 const CoinBigIndex * start,
75 const int * column, const double * element,
76 int numberExtendedColumns_ = -1);
77
82 ClpQuadraticObjective(const ClpQuadraticObjective & rhs, int type = 0);
86 ClpQuadraticObjective (const ClpQuadraticObjective &rhs, int numberColumns,
87 const int * whichColumns) ;
88
90 ClpQuadraticObjective & operator=(const ClpQuadraticObjective& rhs);
91
93 virtual ~ClpQuadraticObjective ();
94
96 virtual ClpObjective * clone() const;
100 virtual ClpObjective * subsetClone (int numberColumns,
101 const int * whichColumns) const;
102
104 void loadQuadraticObjective(const int numberColumns,
105 const CoinBigIndex * start,
106 const int * column, const double * element,
107 int numberExtendedColumns = -1);
108 void loadQuadraticObjective ( const CoinPackedMatrix& matrix);
110 void deleteQuadraticObjective();
112
114 inline CoinPackedMatrix * quadraticObjective() const {
116 return quadraticObjective_;
117 }
119 inline double * linearObjective() const {
120 return objective_;
121 }
123 inline int numberExtendedColumns() const {
124 return numberExtendedColumns_;
125 }
127 inline int numberColumns() const {
128 return numberColumns_;
129 }
131 inline bool fullMatrix() const {
132 return fullMatrix_;
133 }
135
136 //---------------------------------------------------------------------------
137
138 private:
141 CoinPackedMatrix * quadraticObjective_;
143 double * objective_;
145 double * gradient_;
147 int numberColumns_;
149 int numberExtendedColumns_;
151 bool fullMatrix_;
153 };
154
155 #endif
ClpQuadraticObjective::clone
virtual ClpObjective * clone() const
Clone.
ClpQuadraticObjective::resize
virtual void resize(int newNumberColumns)
Resize objective.
ClpQuadraticObjective::gradient
virtual double * gradient(const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
Returns gradient.
ClpQuadraticObjective::objective_
double * objective_
Objective.
Definition: ClpQuadraticObjective.hpp:143
ClpQuadraticObjective
Quadratic Objective Class.
Definition: ClpQuadraticObjective.hpp:18
ClpQuadraticObjective::subsetClone
virtual ClpObjective * subsetClone(int numberColumns, const int *whichColumns) const
Subset clone.
ClpQuadraticObjective::objectiveValue
virtual double objectiveValue(const ClpSimplex *model, const double *solution) const
Return objective value (without any ClpModel offset) (model may be NULL)
ClpQuadraticObjective::reallyScale
virtual void reallyScale(const double *columnScale)
Scale objective.
ClpQuadraticObjective::deleteQuadraticObjective
void deleteQuadraticObjective()
Get rid of quadratic objective.
ClpQuadraticObjective::numberColumns
int numberColumns() const
Number of columns in quadratic objective.
Definition: ClpQuadraticObjective.hpp:127
ClpObjective
Objective Abstract Base Class.
Definition: ClpObjective.hpp:19
ClpQuadraticObjective::operator=
ClpQuadraticObjective & operator=(const ClpQuadraticObjective &rhs)
Assignment operator.
ClpQuadraticObjective::stepLength
virtual double stepLength(ClpSimplex *model, const double *solution, const double *change, double maximumTheta, double &currentObj, double &predictedObj, double &thetaObj)
Returns step length which gives minimum of objective for solution + theta * change vector up to maxim...
ClpQuadraticObjective::~ClpQuadraticObjective
virtual ~ClpQuadraticObjective()
Destructor.
ClpQuadraticObjective::numberColumns_
int numberColumns_
Useful to have number of columns about.
Definition: ClpQuadraticObjective.hpp:147
ClpQuadraticObjective::numberExtendedColumns
int numberExtendedColumns() const
Length of linear objective which could be bigger.
Definition: ClpQuadraticObjective.hpp:123
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
ClpObjective::type
int type() const
Returns type (above 63 is extra information)
Definition: ClpObjective.hpp:98
ClpQuadraticObjective::loadQuadraticObjective
void loadQuadraticObjective(const int numberColumns, const CoinBigIndex *start, const int *column, const double *element, int numberExtendedColumns=-1)
Load up quadratic objective.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
ClpObjective.hpp
ClpQuadraticObjective::fullMatrix
bool fullMatrix() const
If a full or half matrix.
Definition: ClpQuadraticObjective.hpp:131
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:105
ClpQuadraticObjective::fullMatrix_
bool fullMatrix_
True if full symmetric matrix, false if half.
Definition: ClpQuadraticObjective.hpp:151
ClpQuadraticObjective::reducedGradient
virtual double reducedGradient(ClpSimplex *model, double *region, bool useFeasibleCosts)
Resize objective.
ClpQuadraticObjective::ClpQuadraticObjective
ClpQuadraticObjective()
Default Constructor.
ClpQuadraticObjective::markNonlinear
virtual int markNonlinear(char *which)
Given a zeroed array sets nonlinear columns to 1.
ClpQuadraticObjective::quadraticObjective_
CoinPackedMatrix * quadraticObjective_
Definition: ClpQuadraticObjective.hpp:141
ClpQuadraticObjective::gradient_
double * gradient_
Gradient.
Definition: ClpQuadraticObjective.hpp:145
ClpQuadraticObjective::deleteSome
virtual void deleteSome(int numberToDelete, const int *which)
Delete columns in objective.
ClpQuadraticObjective::quadraticObjective
CoinPackedMatrix * quadraticObjective() const
Quadratic objective.
Definition: ClpQuadraticObjective.hpp:115
ClpQuadraticObjective::numberExtendedColumns_
int numberExtendedColumns_
Also length of linear objective which could be bigger.
Definition: ClpQuadraticObjective.hpp:149
CoinPackedMatrix.hpp
ClpQuadraticObjective::linearObjective
double * linearObjective() const
Linear objective.
Definition: ClpQuadraticObjective.hpp:119