|
Clp
1.17.6
|
Constraint Abstract Base Class. More...
#include <ClpConstraint.hpp>
Inheritance diagram for ClpConstraint:Public Member Functions | |
Stuff | |
| virtual int | gradient (const ClpSimplex *model, const double *solution, double *gradient, double &functionValue, double &offset, bool useScaling=false, bool refresh=true) const =0 |
| Fills gradient. More... | |
| virtual double | functionValue (const ClpSimplex *model, const double *solution, bool useScaling=false, bool refresh=true) const |
| Constraint function value. More... | |
| virtual void | resize (int newNumberColumns)=0 |
| Resize constraint. More... | |
| virtual void | deleteSome (int numberToDelete, const int *which)=0 |
| Delete columns in constraint. More... | |
| virtual void | reallyScale (const double *columnScale)=0 |
| Scale constraint. More... | |
| virtual int | markNonlinear (char *which) const =0 |
| Given a zeroed array sets nonlinear columns to 1. More... | |
| virtual int | markNonzero (char *which) const =0 |
| Given a zeroed array sets possible nonzero coefficients to 1. More... | |
Constructors and destructors | |
| ClpConstraint () | |
| Default Constructor. More... | |
| ClpConstraint (const ClpConstraint &) | |
| Copy constructor. More... | |
| ClpConstraint & | operator= (const ClpConstraint &rhs) |
| Assignment operator. More... | |
| virtual | ~ClpConstraint () |
| Destructor. More... | |
| virtual ClpConstraint * | clone () const =0 |
| Clone. More... | |
Other | |
| int | type () |
| Returns type, 0 linear, 1 nonlinear. More... | |
| int | rowNumber () const |
| Row number (-1 is objective) More... | |
| virtual int | numberCoefficients () const =0 |
| Number of possible coefficients in gradient. More... | |
| double | functionValue () const |
| Stored constraint function value. More... | |
| double | offset () const |
| Constraint offset. More... | |
| virtual void | newXValues () |
| Say we have new primal solution - so may need to recompute. More... | |
Protected Attributes | |
Protected member data | |
| double * | lastGradient_ |
| Gradient at last evaluation. More... | |
| double | functionValue_ |
| Value of non-linear part of constraint. More... | |
| double | offset_ |
| Value of offset for constraint. More... | |
| int | type_ |
| Type of constraint - linear is 1. More... | |
| int | rowNumber_ |
| Row number (-1 is objective) More... | |
Constraint Abstract Base Class.
Abstract Base Class for describing a constraint or objective function
Definition at line 18 of file ClpConstraint.hpp.
| ClpConstraint::ClpConstraint | ( | ) |
Default Constructor.
| ClpConstraint::ClpConstraint | ( | const ClpConstraint & | ) |
Copy constructor.
|
virtual |
Destructor.
|
pure virtual |
Fills gradient.
If Linear then solution may be NULL, also returns true value of function and offset so we can use x not deltaX in constraint If refresh is false then uses last solution Uses model for scaling Returns non-zero if gradient undefined at current solution
Implemented in ClpConstraintLinear, and ClpConstraintQuadratic.
|
virtual |
Constraint function value.
|
pure virtual |
Resize constraint.
Implemented in ClpConstraintLinear, and ClpConstraintQuadratic.
|
pure virtual |
Delete columns in constraint.
Implemented in ClpConstraintLinear, and ClpConstraintQuadratic.
|
pure virtual |
Scale constraint.
Implemented in ClpConstraintLinear, and ClpConstraintQuadratic.
|
pure virtual |
Given a zeroed array sets nonlinear columns to 1.
Returns number of nonlinear columns
Implemented in ClpConstraintLinear, and ClpConstraintQuadratic.
|
pure virtual |
Given a zeroed array sets possible nonzero coefficients to 1.
Returns number of nonzeros
Implemented in ClpConstraintLinear, and ClpConstraintQuadratic.
| ClpConstraint& ClpConstraint::operator= | ( | const ClpConstraint & | rhs | ) |
Assignment operator.
|
pure virtual |
Clone.
Implemented in ClpConstraintQuadratic, and ClpConstraintLinear.
|
inline |
Returns type, 0 linear, 1 nonlinear.
Definition at line 80 of file ClpConstraint.hpp.
|
inline |
Row number (-1 is objective)
Definition at line 85 of file ClpConstraint.hpp.
|
pure virtual |
Number of possible coefficients in gradient.
Implemented in ClpConstraintQuadratic, and ClpConstraintLinear.
|
inline |
Stored constraint function value.
Definition at line 94 of file ClpConstraint.hpp.
|
inline |
Constraint offset.
Definition at line 100 of file ClpConstraint.hpp.
|
inlinevirtual |
Say we have new primal solution - so may need to recompute.
Definition at line 105 of file ClpConstraint.hpp.
|
mutableprotected |
Gradient at last evaluation.
Definition at line 114 of file ClpConstraint.hpp.
|
mutableprotected |
Value of non-linear part of constraint.
Definition at line 116 of file ClpConstraint.hpp.
|
mutableprotected |
Value of offset for constraint.
Definition at line 118 of file ClpConstraint.hpp.
|
protected |
Type of constraint - linear is 1.
Definition at line 120 of file ClpConstraint.hpp.
|
protected |
Row number (-1 is objective)
Definition at line 122 of file ClpConstraint.hpp.
1.8.5