Clp  1.17.8
List of all members
ClpQuadraticObjective Class Reference

Quadratic Objective Class. More...

#include <ClpQuadraticObjective.hpp>

+ Inheritance diagram for ClpQuadraticObjective:
+ Collaboration diagram for ClpQuadraticObjective:

Public Member Functions

Stuff
virtual double * gradient (const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
 Returns gradient. More...
 
virtual double reducedGradient (ClpSimplex *model, double *region, bool useFeasibleCosts)
 Resize objective. More...
 
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 maximum theta. More...
 
virtual double objectiveValue (const ClpSimplex *model, const double *solution) const
 Return objective value (without any ClpModel offset) (model may be NULL) More...
 
virtual void resize (int newNumberColumns)
 Resize objective. More...
 
virtual void deleteSome (int numberToDelete, const int *which)
 Delete columns in objective. More...
 
virtual void reallyScale (const double *columnScale)
 Scale objective. More...
 
virtual int markNonlinear (char *which)
 Given a zeroed array sets nonlinear columns to 1. More...
 
Constructors and destructors
 ClpQuadraticObjective ()
 Default Constructor. More...
 
 ClpQuadraticObjective (const double *linearObjective, int numberColumns, const CoinBigIndex *start, const int *column, const double *element, int numberExtendedColumns_=-1)
 Constructor from objective. More...
 
 ClpQuadraticObjective (const ClpQuadraticObjective &rhs, int type=0)
 Copy constructor . More...
 
 ClpQuadraticObjective (const ClpQuadraticObjective &rhs, int numberColumns, const int *whichColumns)
 Subset constructor. More...
 
ClpQuadraticObjectiveoperator= (const ClpQuadraticObjective &rhs)
 Assignment operator. More...
 
virtual ~ClpQuadraticObjective ()
 Destructor. More...
 
virtual ClpObjectiveclone () const
 Clone. More...
 
virtual ClpObjectivesubsetClone (int numberColumns, const int *whichColumns) const
 Subset clone. More...
 
void loadQuadraticObjective (const int numberColumns, const CoinBigIndex *start, const int *column, const double *element, int numberExtendedColumns=-1)
 Load up quadratic objective. More...
 
void loadQuadraticObjective (const CoinPackedMatrix &matrix)
 
void deleteQuadraticObjective ()
 Get rid of quadratic objective. More...
 
Gets and sets
CoinPackedMatrix * quadraticObjective () const
 Quadratic objective. More...
 
double * linearObjective () const
 Linear objective. More...
 
int numberExtendedColumns () const
 Length of linear objective which could be bigger. More...
 
int numberColumns () const
 Number of columns in quadratic objective. More...
 
bool fullMatrix () const
 If a full or half matrix. More...
 
- Public Member Functions inherited from ClpObjective
virtual void newXValues ()
 Say we have new primal solution - so may need to recompute. More...
 
 ClpObjective ()
 Default Constructor. More...
 
 ClpObjective (const ClpObjective &)
 Copy constructor. More...
 
ClpObjectiveoperator= (const ClpObjective &rhs)
 Assignment operator. More...
 
virtual ~ClpObjective ()
 Destructor. More...
 
int type () const
 Returns type (above 63 is extra information) More...
 
void setType (int value)
 Sets type (above 63 is extra information) More...
 
int activated () const
 Whether activated. More...
 
void setActivated (int value)
 Set whether activated. More...
 
double nonlinearOffset () const
 Objective offset. More...
 

Private Attributes

Private member data

Quadratic objective

CoinPackedMatrix * quadraticObjective_
 
double * objective_
 Objective. More...
 
double * gradient_
 Gradient. More...
 
int numberColumns_
 Useful to have number of columns about. More...
 
int numberExtendedColumns_
 Also length of linear objective which could be bigger. More...
 
bool fullMatrix_
 True if full symmetric matrix, false if half. More...
 

Additional Inherited Members

- Protected Attributes inherited from ClpObjective
double offset_
 Value of non-linear part of objective. More...
 
int type_
 Type of objective - linear is 1. More...
 
int activated_
 Whether activated. More...
 

Detailed Description

Quadratic Objective Class.

Definition at line 18 of file ClpQuadraticObjective.hpp.

Constructor & Destructor Documentation

◆ ClpQuadraticObjective() [1/4]

ClpQuadraticObjective::ClpQuadraticObjective ( )

Default Constructor.

◆ ClpQuadraticObjective() [2/4]

ClpQuadraticObjective::ClpQuadraticObjective ( const double *  linearObjective,
int  numberColumns,
const CoinBigIndex *  start,
const int *  column,
const double *  element,
int  numberExtendedColumns_ = -1 
)

Constructor from objective.

◆ ClpQuadraticObjective() [3/4]

ClpQuadraticObjective::ClpQuadraticObjective ( const ClpQuadraticObjective rhs,
int  type = 0 
)

Copy constructor .

If type is -1 then make sure half symmetric, if +1 then make sure full

◆ ClpQuadraticObjective() [4/4]

ClpQuadraticObjective::ClpQuadraticObjective ( const ClpQuadraticObjective rhs,
int  numberColumns,
const int *  whichColumns 
)

Subset constructor.

Duplicates are allowed and order is as given.

◆ ~ClpQuadraticObjective()

virtual ClpQuadraticObjective::~ClpQuadraticObjective ( )
virtual

Destructor.

Member Function Documentation

◆ gradient()

virtual double* ClpQuadraticObjective::gradient ( const ClpSimplex model,
const double *  solution,
double &  offset,
bool  refresh,
int  includeLinear = 2 
)
virtual

Returns gradient.

If Quadratic then solution may be NULL, also returns an offset (to be added to current one) If refresh is false then uses last solution Uses model for scaling includeLinear 0 - no, 1 as is, 2 as feasible

Implements ClpObjective.

◆ reducedGradient()

virtual double ClpQuadraticObjective::reducedGradient ( ClpSimplex model,
double *  region,
bool  useFeasibleCosts 
)
virtual

Resize objective.

Returns reduced gradient.Returns an offset (to be added to current one).

Implements ClpObjective.

◆ stepLength()

virtual double ClpQuadraticObjective::stepLength ( ClpSimplex model,
const double *  solution,
const double *  change,
double  maximumTheta,
double &  currentObj,
double &  predictedObj,
double &  thetaObj 
)
virtual

Returns step length which gives minimum of objective for solution + theta * change vector up to maximum theta.

arrays are numberColumns+numberRows Also sets current objective, predicted and at maximumTheta

Implements ClpObjective.

◆ objectiveValue()

virtual double ClpQuadraticObjective::objectiveValue ( const ClpSimplex model,
const double *  solution 
) const
virtual

Return objective value (without any ClpModel offset) (model may be NULL)

Implements ClpObjective.

◆ resize()

virtual void ClpQuadraticObjective::resize ( int  newNumberColumns)
virtual

Resize objective.

Implements ClpObjective.

◆ deleteSome()

virtual void ClpQuadraticObjective::deleteSome ( int  numberToDelete,
const int *  which 
)
virtual

Delete columns in objective.

Implements ClpObjective.

◆ reallyScale()

virtual void ClpQuadraticObjective::reallyScale ( const double *  columnScale)
virtual

Scale objective.

Implements ClpObjective.

◆ markNonlinear()

virtual int ClpQuadraticObjective::markNonlinear ( char *  which)
virtual

Given a zeroed array sets nonlinear columns to 1.

Returns number of nonlinear columns

Reimplemented from ClpObjective.

◆ operator=()

ClpQuadraticObjective& ClpQuadraticObjective::operator= ( const ClpQuadraticObjective rhs)

Assignment operator.

◆ clone()

virtual ClpObjective* ClpQuadraticObjective::clone ( ) const
virtual

Clone.

Implements ClpObjective.

◆ subsetClone()

virtual ClpObjective* ClpQuadraticObjective::subsetClone ( int  numberColumns,
const int *  whichColumns 
) const
virtual

Subset clone.

Duplicates are allowed and order is as given.

Reimplemented from ClpObjective.

◆ loadQuadraticObjective() [1/2]

void ClpQuadraticObjective::loadQuadraticObjective ( const int  numberColumns,
const CoinBigIndex *  start,
const int *  column,
const double *  element,
int  numberExtendedColumns = -1 
)

Load up quadratic objective.

This is stored as a CoinPackedMatrix

◆ loadQuadraticObjective() [2/2]

void ClpQuadraticObjective::loadQuadraticObjective ( const CoinPackedMatrix &  matrix)

◆ deleteQuadraticObjective()

void ClpQuadraticObjective::deleteQuadraticObjective ( )

Get rid of quadratic objective.

◆ quadraticObjective()

CoinPackedMatrix* ClpQuadraticObjective::quadraticObjective ( ) const
inline

Quadratic objective.

Definition at line 113 of file ClpQuadraticObjective.hpp.

◆ linearObjective()

double* ClpQuadraticObjective::linearObjective ( ) const
inline

Linear objective.

Definition at line 118 of file ClpQuadraticObjective.hpp.

◆ numberExtendedColumns()

int ClpQuadraticObjective::numberExtendedColumns ( ) const
inline

Length of linear objective which could be bigger.

Definition at line 123 of file ClpQuadraticObjective.hpp.

◆ numberColumns()

int ClpQuadraticObjective::numberColumns ( ) const
inline

Number of columns in quadratic objective.

Definition at line 128 of file ClpQuadraticObjective.hpp.

◆ fullMatrix()

bool ClpQuadraticObjective::fullMatrix ( ) const
inline

If a full or half matrix.

Definition at line 133 of file ClpQuadraticObjective.hpp.

Member Data Documentation

◆ quadraticObjective_

CoinPackedMatrix* ClpQuadraticObjective::quadraticObjective_
private

Definition at line 144 of file ClpQuadraticObjective.hpp.

◆ objective_

double* ClpQuadraticObjective::objective_
private

Objective.

Definition at line 146 of file ClpQuadraticObjective.hpp.

◆ gradient_

double* ClpQuadraticObjective::gradient_
private

Gradient.

Definition at line 148 of file ClpQuadraticObjective.hpp.

◆ numberColumns_

int ClpQuadraticObjective::numberColumns_
private

Useful to have number of columns about.

Definition at line 150 of file ClpQuadraticObjective.hpp.

◆ numberExtendedColumns_

int ClpQuadraticObjective::numberExtendedColumns_
private

Also length of linear objective which could be bigger.

Definition at line 152 of file ClpQuadraticObjective.hpp.

◆ fullMatrix_

bool ClpQuadraticObjective::fullMatrix_
private

True if full symmetric matrix, false if half.

Definition at line 154 of file ClpQuadraticObjective.hpp.


The documentation for this class was generated from the following file: