Clp  1.17.8
List of all members
ClpObjective Class Referenceabstract

Objective Abstract Base Class. More...

#include <ClpObjective.hpp>

+ Inheritance diagram for ClpObjective:

Public Member Functions

Stuff
virtual double * gradient (const ClpSimplex *model, const double *solution, double &offset, bool refresh, int includeLinear=2)=0
 Returns gradient. More...
 
virtual double reducedGradient (ClpSimplex *model, double *region, bool useFeasibleCosts)=0
 Returns reduced gradient.Returns an offset (to be added to current one). More...
 
virtual double stepLength (ClpSimplex *model, const double *solution, const double *change, double maximumTheta, double &currentObj, double &predictedObj, double &thetaObj)=0
 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 =0
 Return objective value (without any ClpModel offset) (model may be NULL) More...
 
virtual void resize (int newNumberColumns)=0
 Resize objective. More...
 
virtual void deleteSome (int numberToDelete, const int *which)=0
 Delete columns in objective. More...
 
virtual void reallyScale (const double *columnScale)=0
 Scale objective. More...
 
virtual int markNonlinear (char *which)
 Given a zeroed array sets nonlinear columns to 1. More...
 
virtual void newXValues ()
 Say we have new primal solution - so may need to recompute. More...
 
Constructors and destructors
 ClpObjective ()
 Default Constructor. More...
 
 ClpObjective (const ClpObjective &)
 Copy constructor. More...
 
ClpObjectiveoperator= (const ClpObjective &rhs)
 Assignment operator. More...
 
virtual ~ClpObjective ()
 Destructor. More...
 
virtual ClpObjectiveclone () const =0
 Clone. More...
 
virtual ClpObjectivesubsetClone (int numberColumns, const int *whichColumns) const
 Subset clone. More...
 
Other
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...
 

Protected Attributes

Protected member data
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

Objective Abstract Base Class.

Abstract Base Class for describing an objective function

Definition at line 18 of file ClpObjective.hpp.

Constructor & Destructor Documentation

◆ ClpObjective() [1/2]

ClpObjective::ClpObjective ( )

Default Constructor.

◆ ClpObjective() [2/2]

ClpObjective::ClpObjective ( const ClpObjective )

Copy constructor.

◆ ~ClpObjective()

virtual ClpObjective::~ClpObjective ( )
virtual

Destructor.

Member Function Documentation

◆ gradient()

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

Returns gradient.

If Linear 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

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ reducedGradient()

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

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

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ stepLength()

virtual double ClpObjective::stepLength ( ClpSimplex model,
const double *  solution,
const double *  change,
double  maximumTheta,
double &  currentObj,
double &  predictedObj,
double &  thetaObj 
)
pure 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

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ objectiveValue()

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

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

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ resize()

virtual void ClpObjective::resize ( int  newNumberColumns)
pure virtual

Resize objective.

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ deleteSome()

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

Delete columns in objective.

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ reallyScale()

virtual void ClpObjective::reallyScale ( const double *  columnScale)
pure virtual

Scale objective.

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ markNonlinear()

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

Given a zeroed array sets nonlinear columns to 1.

Returns number of nonlinear columns

Reimplemented in ClpQuadraticObjective.

◆ newXValues()

virtual void ClpObjective::newXValues ( )
inlinevirtual

Say we have new primal solution - so may need to recompute.

Definition at line 67 of file ClpObjective.hpp.

◆ operator=()

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

Assignment operator.

◆ clone()

virtual ClpObjective* ClpObjective::clone ( ) const
pure virtual

Clone.

Implemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ subsetClone()

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

Subset clone.

Duplicates are allowed and order is as given. Derived classes need not provide this as it may not always make sense

Reimplemented in ClpQuadraticObjective, and ClpLinearObjective.

◆ type()

int ClpObjective::type ( ) const
inline

Returns type (above 63 is extra information)

Definition at line 98 of file ClpObjective.hpp.

◆ setType()

void ClpObjective::setType ( int  value)
inline

Sets type (above 63 is extra information)

Definition at line 103 of file ClpObjective.hpp.

◆ activated()

int ClpObjective::activated ( ) const
inline

Whether activated.

Definition at line 108 of file ClpObjective.hpp.

◆ setActivated()

void ClpObjective::setActivated ( int  value)
inline

Set whether activated.

Definition at line 113 of file ClpObjective.hpp.

◆ nonlinearOffset()

double ClpObjective::nonlinearOffset ( ) const
inline

Objective offset.

Definition at line 119 of file ClpObjective.hpp.

Member Data Documentation

◆ offset_

double ClpObjective::offset_
protected

Value of non-linear part of objective.

Definition at line 131 of file ClpObjective.hpp.

◆ type_

int ClpObjective::type_
protected

Type of objective - linear is 1.

Definition at line 133 of file ClpObjective.hpp.

◆ activated_

int ClpObjective::activated_
protected

Whether activated.

Definition at line 135 of file ClpObjective.hpp.


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