#include <ClpAmplObjective.hpp>
Inheritance diagram for ClpAmplObjective:
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) |
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 ¤tObj, 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) |
Returns gradient. | |
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. | |
virtual void | newXValues () |
Say we have new primal solution - so may need to recompute. | |
Constructors and destructors | |
ClpAmplObjective () | |
Default Constructor. | |
ClpAmplObjective (void *amplInfo) | |
Constructor from ampl info. | |
ClpAmplObjective (const ClpAmplObjective &rhs) | |
Copy constructor . | |
ClpAmplObjective & | operator= (const ClpAmplObjective &rhs) |
Assignment operator. | |
virtual | ~ClpAmplObjective () |
Destructor. | |
virtual ClpObjective * | clone () const |
Clone. | |
Gets and sets | |
double * | linearObjective () const |
Linear objective. | |
Private Attributes | |
Private member data | |
Saved offset | |
double | offset_ |
Value of non-linear part of objective. | |
void * | amplObjective_ |
Ampl info. | |
double * | objective_ |
Objective. | |
double * | gradient_ |
Gradient. |
Definition at line 15 of file ClpAmplObjective.hpp.
ClpAmplObjective::ClpAmplObjective | ( | ) |
Default Constructor.
ClpAmplObjective::ClpAmplObjective | ( | void * | amplInfo | ) |
Constructor from ampl info.
ClpAmplObjective::ClpAmplObjective | ( | const ClpAmplObjective & | rhs | ) |
Copy constructor .
virtual ClpAmplObjective::~ClpAmplObjective | ( | ) | [virtual] |
Destructor.
virtual double* ClpAmplObjective::gradient | ( | const ClpSimplex * | model, | |
const double * | solution, | |||
double & | offset, | |||
bool | refresh, | |||
int | includeLinear = 2 | |||
) | [virtual] |
Returns gradient.
If Ampl 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.
virtual double ClpAmplObjective::reducedGradient | ( | ClpSimplex * | model, | |
double * | region, | |||
bool | useFeasibleCosts | |||
) | [virtual] |
virtual double ClpAmplObjective::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.
virtual double ClpAmplObjective::objectiveValue | ( | const ClpSimplex * | model, | |
const double * | solution | |||
) | const [virtual] |
virtual void ClpAmplObjective::resize | ( | int | newNumberColumns | ) | [virtual] |
Returns gradient.
If Ampl 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.
virtual void ClpAmplObjective::deleteSome | ( | int | numberToDelete, | |
const int * | which | |||
) | [virtual] |
virtual void ClpAmplObjective::reallyScale | ( | const double * | columnScale | ) | [virtual] |
virtual int ClpAmplObjective::markNonlinear | ( | char * | which | ) | [virtual] |
Given a zeroed array sets nonlinear columns to 1.
Returns number of nonlinear columns
Reimplemented from ClpObjective.
virtual void ClpAmplObjective::newXValues | ( | ) | [virtual] |
ClpAmplObjective& ClpAmplObjective::operator= | ( | const ClpAmplObjective & | rhs | ) |
Assignment operator.
virtual ClpObjective* ClpAmplObjective::clone | ( | ) | const [virtual] |
double* ClpAmplObjective::linearObjective | ( | ) | const |
Linear objective.
double ClpAmplObjective::offset_ [private] |
Value of non-linear part of objective.
Reimplemented from ClpObjective.
Definition at line 99 of file ClpAmplObjective.hpp.
void* ClpAmplObjective::amplObjective_ [private] |
double* ClpAmplObjective::objective_ [private] |
double* ClpAmplObjective::gradient_ [private] |