Loading...
Searching...
No Matches
ClpLinearObjective Class Reference

Linear Objective Class. More...

`#include <ClpLinearObjective.hpp>`

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

## Public Member Functions

Stuff
virtual double * | gradient (const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)
| Returns objective coefficients.
virtual double | reducedGradient (ClpSimplex *model, double *region, bool useFeasibleCosts)
| Returns reduced gradient.Returns an offset (to be added to current one).
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.
Constructors and destructors
| ClpLinearObjective ()
| Default Constructor.
| ClpLinearObjective (const double *objective, int numberColumns)
| Constructor from objective.
| ClpLinearObjective (const ClpLinearObjective &)
| Copy constructor.
| ClpLinearObjective (const ClpLinearObjective &rhs, int numberColumns, const int *whichColumns)
| Subset constructor.
ClpLinearObjective & | operator= (const ClpLinearObjective &rhs)
| Assignment operator.
virtual | ~ClpLinearObjective ()
| Destructor.
virtual ClpObjective * | clone () const
| Clone.
virtual ClpObjective * | subsetClone (int numberColumns, const int *whichColumns) const
| Subset clone.
Public Member Functions inherited from ClpObjective
virtual int | markNonlinear (char *which)
| Given a zeroed array sets nonlinear columns to 1.
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
Objective
double * | objective_
int | numberColumns_
| number of columns

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

Linear Objective Class.

Definition at line 17 of file ClpLinearObjective.hpp.

## Constructor & Destructor Documentation

## ClpLinearObjective() [1/4]

ClpLinearObjective::ClpLinearObjective | ( |  | ) |

Default Constructor.

## ClpLinearObjective() [2/4]

ClpLinearObjective::ClpLinearObjective | ( | const double * | objective,
|  | int | numberColumns )

Constructor from objective.

## ClpLinearObjective() [3/4]

ClpLinearObjective::ClpLinearObjective | ( | const ClpLinearObjective & |  | ) |

Copy constructor.

## ClpLinearObjective() [4/4]

ClpLinearObjective::ClpLinearObjective | ( | const ClpLinearObjective & | rhs,
|  | int | numberColumns,
|  | const int * | whichColumns )

Subset constructor.

Duplicates are allowed and order is as given.

## ~ClpLinearObjective()

virtual ClpLinearObjective::~ClpLinearObjective | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## gradient()

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

virtual

Returns objective coefficients.

Offset is always set to 0.0. All other parameters unused.

Implements ClpObjective.

## reducedGradient()

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

virtual

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

Implements ClpObjective.

## stepLength()

virtual double ClpLinearObjective::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 ClpLinearObjective::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 ClpLinearObjective::resize | ( | int | newNumberColumns | ) |

virtual

Resize objective.

Implements ClpObjective.

## deleteSome()

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

virtual

Delete columns in objective.

Implements ClpObjective.

## reallyScale()

virtual void ClpLinearObjective::reallyScale | ( | const double * | columnScale | ) |

virtual

Scale objective.

Implements ClpObjective.

## operator=()

ClpLinearObjective & ClpLinearObjective::operator= | ( | const ClpLinearObjective & | rhs | ) |

Assignment operator.

## clone()

virtual ClpObjective * ClpLinearObjective::clone | ( |  | ) | const

virtual

Clone.

Implements ClpObjective.

## subsetClone()

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

virtual

Subset clone.

Duplicates are allowed and order is as given.

Reimplemented from ClpObjective.

## Member Data Documentation

## objective_

double* ClpLinearObjective::objective_

private

Definition at line 95 of file ClpLinearObjective.hpp.

## numberColumns_

int ClpLinearObjective::numberColumns_

private

number of columns

Definition at line 97 of file ClpLinearObjective.hpp.

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

- Clp/src/ClpLinearObjective.hpp