Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members
ClpConstraintAmpl Class Reference

Ampl Constraint Class. More...

#include <ClpConstraintAmpl.hpp>

+ Inheritance diagram for ClpConstraintAmpl:
+ Collaboration diagram for ClpConstraintAmpl:

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
 Fills gradient. More...
 
virtual void resize (int newNumberColumns)
 Resize constraint. More...
 
virtual void deleteSome (int numberToDelete, const int *which)
 Delete columns in constraint. More...
 
virtual void reallyScale (const double *columnScale)
 Scale constraint. More...
 
virtual int markNonlinear (char *which) const
 Given a zeroed array sets nonampl columns to 1. More...
 
virtual int markNonzero (char *which) const
 Given a zeroed array sets possible nonzero coefficients to 1. More...
 
virtual void newXValues ()
 Say we have new primal solution - so may need to recompute. More...
 
Constructors and destructors
 ClpConstraintAmpl ()
 Default Constructor. More...
 
 ClpConstraintAmpl (int row, void *amplInfo)
 Constructor from ampl. More...
 
 ClpConstraintAmpl (const ClpConstraintAmpl &rhs)
 Copy constructor . More...
 
ClpConstraintAmploperator= (const ClpConstraintAmpl &rhs)
 Assignment operator. More...
 
virtual ~ClpConstraintAmpl ()
 Destructor. More...
 
virtual ClpConstraint * clone () const
 Clone. More...
 
Gets and sets
virtual int numberCoefficients () const
 Number of coefficients. More...
 
const int * column () const
 Columns. More...
 
const double * coefficient () const
 Coefficients. More...
 

Private Attributes

Private member data

Ampl info

void * amplInfo_
 
int * column_
 Column. More...
 
double * coefficient_
 Coefficients. More...
 
int numberCoefficients_
 Number of coefficients in gradient. More...
 

Detailed Description

Ampl Constraint Class.

Definition at line 17 of file ClpConstraintAmpl.hpp.

Constructor & Destructor Documentation

◆ ClpConstraintAmpl() [1/3]

ClpConstraintAmpl::ClpConstraintAmpl ( )

Default Constructor.

◆ ClpConstraintAmpl() [2/3]

ClpConstraintAmpl::ClpConstraintAmpl ( int  row,
void *  amplInfo 
)

Constructor from ampl.

◆ ClpConstraintAmpl() [3/3]

ClpConstraintAmpl::ClpConstraintAmpl ( const ClpConstraintAmpl rhs)

Copy constructor .

◆ ~ClpConstraintAmpl()

virtual ClpConstraintAmpl::~ClpConstraintAmpl ( )
virtual

Destructor.

Member Function Documentation

◆ gradient()

virtual int ClpConstraintAmpl::gradient ( const ClpSimplex *  model,
const double *  solution,
double *  gradient,
double &  functionValue,
double &  offset,
bool  useScaling = false,
bool  refresh = true 
) const
virtual

Fills gradient.

If Ampl 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 udefined at current solution

◆ resize()

virtual void ClpConstraintAmpl::resize ( int  newNumberColumns)
virtual

Resize constraint.

◆ deleteSome()

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

Delete columns in constraint.

◆ reallyScale()

virtual void ClpConstraintAmpl::reallyScale ( const double *  columnScale)
virtual

Scale constraint.

◆ markNonlinear()

virtual int ClpConstraintAmpl::markNonlinear ( char *  which) const
virtual

Given a zeroed array sets nonampl columns to 1.

Returns number of nonampl columns

◆ markNonzero()

virtual int ClpConstraintAmpl::markNonzero ( char *  which) const
virtual

Given a zeroed array sets possible nonzero coefficients to 1.

Returns number of nonzeros

◆ newXValues()

virtual void ClpConstraintAmpl::newXValues ( )
virtual

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

◆ operator=()

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

Assignment operator.

◆ clone()

virtual ClpConstraint* ClpConstraintAmpl::clone ( ) const
virtual

Clone.

◆ numberCoefficients()

virtual int ClpConstraintAmpl::numberCoefficients ( ) const
virtual

Number of coefficients.

◆ column()

const int* ClpConstraintAmpl::column ( ) const
inline

Columns.

Definition at line 80 of file ClpConstraintAmpl.hpp.

◆ coefficient()

const double* ClpConstraintAmpl::coefficient ( ) const
inline

Coefficients.

Definition at line 85 of file ClpConstraintAmpl.hpp.

Member Data Documentation

◆ amplInfo_

void* ClpConstraintAmpl::amplInfo_
private

Definition at line 96 of file ClpConstraintAmpl.hpp.

◆ column_

int* ClpConstraintAmpl::column_
private

Column.

Definition at line 98 of file ClpConstraintAmpl.hpp.

◆ coefficient_

double* ClpConstraintAmpl::coefficient_
private

Coefficients.

Definition at line 100 of file ClpConstraintAmpl.hpp.

◆ numberCoefficients_

int ClpConstraintAmpl::numberCoefficients_
private

Number of coefficients in gradient.

Definition at line 102 of file ClpConstraintAmpl.hpp.


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