Go to the documentation of this file.
6 #ifndef ClpConstraint_H
7 #define ClpConstraint_H
31 const double *solution,
35 bool useScaling =
false,
36 bool refresh =
true)
const = 0;
39 const double *solution,
40 bool useScaling =
false,
41 bool refresh =
true)
const;
43 virtual void resize(
int newNumberColumns) = 0;
45 virtual void deleteSome(
int numberToDelete,
const int *which) = 0;
47 virtual void reallyScale(
const double *columnScale) = 0;
This solves LPs using the simplex method.
ClpConstraint & operator=(const ClpConstraint &rhs)
Assignment operator.
int rowNumber_
Row number (-1 is objective)
virtual void reallyScale(const double *columnScale)=0
Scale constraint.
double functionValue() const
Stored constraint function value.
int type()
Returns type, 0 linear, 1 nonlinear.
virtual int numberCoefficients() const =0
Number of possible coefficients in gradient.
virtual void newXValues()
Say we have new primal solution - so may need to recompute.
int rowNumber() const
Row number (-1 is objective)
Constraint Abstract Base Class.
virtual int markNonlinear(char *which) const =0
Given a zeroed array sets nonlinear columns to 1.
double offset() const
Constraint offset.
int type_
Type of constraint - linear is 1.
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.
virtual ~ClpConstraint()
Destructor.
virtual void deleteSome(int numberToDelete, const int *which)=0
Delete columns in constraint.
ClpConstraint()
Default Constructor.
virtual int markNonzero(char *which) const =0
Given a zeroed array sets possible nonzero coefficients to 1.
double functionValue_
Value of non-linear part of constraint.
virtual ClpConstraint * clone() const =0
Clone.
double * lastGradient_
Gradient at last evaluation.
virtual void resize(int newNumberColumns)=0
Resize constraint.
double offset_
Value of offset for constraint.