Ampl Objective Class. More...
#include <ClpAmplObjective.hpp>
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 ¤tObj, 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) |
Returns gradient. 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... | |
virtual void | newXValues () |
Say we have new primal solution - so may need to recompute. More... | |
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 ¤tObj, 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) |
Returns gradient. 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... | |
virtual void | newXValues () |
Say we have new primal solution - so may need to recompute. More... | |
Constructors and destructors | |
ClpAmplObjective () | |
Default Constructor. More... | |
ClpAmplObjective (void *amplInfo) | |
Constructor from ampl info. More... | |
ClpAmplObjective (const ClpAmplObjective &rhs) | |
Copy constructor . More... | |
ClpAmplObjective & | operator= (const ClpAmplObjective &rhs) |
Assignment operator. More... | |
virtual | ~ClpAmplObjective () |
Destructor. More... | |
virtual ClpObjective * | clone () const |
Clone. More... | |
ClpAmplObjective () | |
Default Constructor. More... | |
ClpAmplObjective (void *amplInfo) | |
Constructor from ampl info. More... | |
ClpAmplObjective (const ClpAmplObjective &rhs) | |
Copy constructor . More... | |
ClpAmplObjective & | operator= (const ClpAmplObjective &rhs) |
Assignment operator. More... | |
virtual | ~ClpAmplObjective () |
Destructor. More... | |
virtual ClpObjective * | clone () const |
Clone. More... | |
Gets and sets | |
double * | linearObjective () const |
Linear objective. More... | |
double * | linearObjective () const |
Linear objective. More... | |
Private Attributes | |
Private member data | |
Saved offset | |
double | offset_ |
Ampl info. More... | |
void * | amplObjective_ |
Ampl info. More... | |
double * | objective_ |
Objective. More... | |
double * | gradient_ |
Gradient. More... | |
Ampl Objective Class.
Definition at line 16 of file ClpAmplObjective.hpp.
ClpAmplObjective::ClpAmplObjective | ( | ) |
Default Constructor.
ClpAmplObjective::ClpAmplObjective | ( | void * | amplInfo) |
Constructor from ampl info.
ClpAmplObjective::ClpAmplObjective | ( | const ClpAmplObjective & | rhs) |
Copy constructor .
|
virtual |
Destructor.
ClpAmplObjective::ClpAmplObjective | ( | ) |
Default Constructor.
ClpAmplObjective::ClpAmplObjective | ( | void * | amplInfo) |
Constructor from ampl info.
ClpAmplObjective::ClpAmplObjective | ( | const ClpAmplObjective & | rhs) |
Copy constructor .
|
virtual |
Destructor.
|
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
|
virtual |
Resize objective.
Returns reduced gradient.Returns an offset (to be added to current one).
|
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
|
virtual |
Return objective value (without any ClpModel offset) (model may be NULL)
|
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
|
virtual |
Delete columns in objective.
|
virtual |
Scale objective.
|
virtual |
Given a zeroed array sets nonlinear columns to 1.
Returns number of nonlinear columns
|
virtual |
Say we have new primal solution - so may need to recompute.
ClpAmplObjective& ClpAmplObjective::operator= | ( | const ClpAmplObjective & | rhs) |
Assignment operator.
|
virtual |
Clone.
double* ClpAmplObjective::linearObjective | ( | ) | const |
Linear objective.
|
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
|
virtual |
Resize objective.
Returns reduced gradient.Returns an offset (to be added to current one).
|
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
|
virtual |
Return objective value (without any ClpModel offset) (model may be NULL)
|
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
|
virtual |
Delete columns in objective.
|
virtual |
Scale objective.
|
virtual |
Given a zeroed array sets nonlinear columns to 1.
Returns number of nonlinear columns
|
virtual |
Say we have new primal solution - so may need to recompute.
ClpAmplObjective& ClpAmplObjective::operator= | ( | const ClpAmplObjective & | rhs) |
Assignment operator.
|
virtual |
Clone.
double* ClpAmplObjective::linearObjective | ( | ) | const |
Linear objective.
|
private |
Ampl info.
Definition at line 100 of file ClpAmplObjective.hpp.
|
private |
Ampl info.
Definition at line 102 of file ClpAmplObjective.hpp.
|
private |
Objective.
Definition at line 104 of file ClpAmplObjective.hpp.
|
private |
Gradient.
Definition at line 106 of file ClpAmplObjective.hpp.