Loading...
Searching...
No Matches
ClpQuadraticObjective Class Reference

Quadratic Objective Class. More...

`#include <ClpQuadraticObjective.hpp>`

Inheritance diagram for ClpQuadraticObjective:
[legend]
Collaboration diagram for ClpQuadraticObjective:
[legend]

## Public Member Functions

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

## Private Attributes

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

## Additional Inherited Members

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

## 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:

- Clp/src/ClpQuadraticObjective.hpp