Clp  1.17.8
List of all members
AbcNonLinearCost Class Reference

#include <AbcNonLinearCost.hpp>

+ Collaboration diagram for AbcNonLinearCost:

Public Member Functions

Constructors, destructor
 AbcNonLinearCost ()
 Default constructor. More...
 
 AbcNonLinearCost (AbcSimplex *model)
 Constructor from simplex. More...
 
 ~AbcNonLinearCost ()
 Destructor. More...
 
 AbcNonLinearCost (const AbcNonLinearCost &)
 
AbcNonLinearCostoperator= (const AbcNonLinearCost &)
 
Actual work in primal
void checkInfeasibilities (double oldTolerance=0.0)
 Changes infeasible costs and computes number and cost of infeas Puts all non-basic (non free) variables to bounds and all free variables to zero if oldTolerance is non-zero. More...
 
void checkInfeasibilities (int numberInArray, const int *index)
 Changes infeasible costs for each variable The indices are row indices and need converting to sequences. More...
 
void checkChanged (int numberInArray, CoinIndexedVector *update)
 Puts back correct infeasible costs for each variable The input indices are row indices and need converting to sequences for costs. More...
 
void goThru (int numberInArray, double multiplier, const int *index, const double *work, double *rhs)
 Goes through one bound for each variable. More...
 
void goBack (int numberInArray, const int *index, double *rhs)
 Takes off last iteration (i.e. More...
 
void goBackAll (const CoinIndexedVector *update)
 Puts back correct infeasible costs for each variable The input indices are row indices and need converting to sequences for costs. More...
 
void zapCosts ()
 Temporary zeroing of feasible costs. More...
 
void refreshCosts (const double *columnCosts)
 Refreshes costs always makes row costs zero. More...
 
void feasibleBounds ()
 Puts feasible bounds into lower and upper. More...
 
void refresh ()
 Refresh - assuming regions OK. More...
 
void refreshFromPerturbed (double tolerance)
 Refresh - from original. More...
 
double setOne (int sequence, double solutionValue)
 Sets bounds and cost for one variable Returns change in cost May need to be inline for speed. More...
 
double setOneBasic (int iRow, double solutionValue)
 Sets bounds and cost for one variable Returns change in cost May need to be inline for speed. More...
 
int setOneOutgoing (int sequence, double &solutionValue)
 Sets bounds and cost for outgoing variable may change value Returns direction. More...
 
double nearest (int iRow, double solutionValue)
 Returns nearest bound. More...
 
double changeInCost (int, double alpha) const
 Returns change in cost - one down if alpha >0.0, up if <0.0 Value is current - new. More...
 
double changeUpInCost (int) const
 
double changeDownInCost (int) const
 
double changeInCost (int iRow, double alpha, double &rhs)
 This also updates next bound. More...
 
Gets and sets
int numberInfeasibilities () const
 Number of infeasibilities. More...
 
double changeInCost () const
 Change in cost. More...
 
double feasibleCost () const
 Feasible cost. More...
 
double feasibleReportCost () const
 Feasible cost with offset and direction (i.e. for reporting) More...
 
double sumInfeasibilities () const
 Sum of infeasibilities. More...
 
double largestInfeasibility () const
 Largest infeasibility. More...
 
double averageTheta () const
 Average theta. More...
 
void setAverageTheta (double value)
 
void setChangeInCost (double value)
 
Private functions to deal with infeasible regions
unsigned char * statusArray () const
 
int getCurrentStatus (int sequence)
 
void validate ()
 For debug. More...
 

Private Attributes

Data members
double changeCost_
 Change in cost because of infeasibilities. More...
 
double feasibleCost_
 Feasible cost. More...
 
double infeasibilityWeight_
 Current infeasibility weight. More...
 
double largestInfeasibility_
 Largest infeasibility. More...
 
double sumInfeasibilities_
 Sum of infeasibilities. More...
 
double averageTheta_
 Average theta - kept here as only for primal. More...
 
int numberRows_
 Number of rows (mainly for checking and copy) More...
 
int numberColumns_
 Number of columns (mainly for checking and copy) More...
 
AbcSimplexmodel_
 Model. More...
 
int numberInfeasibilities_
 Number of infeasibilities found. More...
 
unsigned char * status_
 Contains status at beginning and current. More...
 
double * bound_
 Bound which has been replaced in lower_ or upper_. More...
 
double * cost_
 Feasible cost array. More...
 

Detailed Description

Definition at line 71 of file AbcNonLinearCost.hpp.

Constructor & Destructor Documentation

◆ AbcNonLinearCost() [1/3]

AbcNonLinearCost::AbcNonLinearCost ( )

Default constructor.

◆ AbcNonLinearCost() [2/3]

AbcNonLinearCost::AbcNonLinearCost ( AbcSimplex model)

Constructor from simplex.

This will just set up wasteful arrays for linear, but later may do dual analysis and even finding duplicate columns .

◆ ~AbcNonLinearCost()

AbcNonLinearCost::~AbcNonLinearCost ( )

Destructor.

◆ AbcNonLinearCost() [3/3]

AbcNonLinearCost::AbcNonLinearCost ( const AbcNonLinearCost )

Member Function Documentation

◆ operator=()

AbcNonLinearCost& AbcNonLinearCost::operator= ( const AbcNonLinearCost )

◆ checkInfeasibilities() [1/2]

void AbcNonLinearCost::checkInfeasibilities ( double  oldTolerance = 0.0)

Changes infeasible costs and computes number and cost of infeas Puts all non-basic (non free) variables to bounds and all free variables to zero if oldTolerance is non-zero.

  • but does not move those <= oldTolerance away

◆ checkInfeasibilities() [2/2]

void AbcNonLinearCost::checkInfeasibilities ( int  numberInArray,
const int *  index 
)

Changes infeasible costs for each variable The indices are row indices and need converting to sequences.

◆ checkChanged()

void AbcNonLinearCost::checkChanged ( int  numberInArray,
CoinIndexedVector *  update 
)

Puts back correct infeasible costs for each variable The input indices are row indices and need converting to sequences for costs.

On input array is empty (but indices exist). On exit just changed costs will be stored as normal CoinIndexedVector

◆ goThru()

void AbcNonLinearCost::goThru ( int  numberInArray,
double  multiplier,
const int *  index,
const double *  work,
double *  rhs 
)

Goes through one bound for each variable.

If multiplier*work[iRow]>0 goes down, otherwise up. The indices are row indices and need converting to sequences Temporary offsets may be set Rhs entries are increased

◆ goBack()

void AbcNonLinearCost::goBack ( int  numberInArray,
const int *  index,
double *  rhs 
)

Takes off last iteration (i.e.

offsets closer to 0)

◆ goBackAll()

void AbcNonLinearCost::goBackAll ( const CoinIndexedVector *  update)

Puts back correct infeasible costs for each variable The input indices are row indices and need converting to sequences for costs.

At the end of this all temporary offsets are zero

◆ zapCosts()

void AbcNonLinearCost::zapCosts ( )

Temporary zeroing of feasible costs.

◆ refreshCosts()

void AbcNonLinearCost::refreshCosts ( const double *  columnCosts)

Refreshes costs always makes row costs zero.

◆ feasibleBounds()

void AbcNonLinearCost::feasibleBounds ( )

Puts feasible bounds into lower and upper.

◆ refresh()

void AbcNonLinearCost::refresh ( )

Refresh - assuming regions OK.

◆ refreshFromPerturbed()

void AbcNonLinearCost::refreshFromPerturbed ( double  tolerance)

Refresh - from original.

◆ setOne()

double AbcNonLinearCost::setOne ( int  sequence,
double  solutionValue 
)

Sets bounds and cost for one variable Returns change in cost May need to be inline for speed.

◆ setOneBasic()

double AbcNonLinearCost::setOneBasic ( int  iRow,
double  solutionValue 
)

Sets bounds and cost for one variable Returns change in cost May need to be inline for speed.

◆ setOneOutgoing()

int AbcNonLinearCost::setOneOutgoing ( int  sequence,
double &  solutionValue 
)

Sets bounds and cost for outgoing variable may change value Returns direction.

◆ nearest()

double AbcNonLinearCost::nearest ( int  iRow,
double  solutionValue 
)

Returns nearest bound.

◆ changeInCost() [1/3]

double AbcNonLinearCost::changeInCost ( int  ,
double  alpha 
) const
inline

Returns change in cost - one down if alpha >0.0, up if <0.0 Value is current - new.

Definition at line 155 of file AbcNonLinearCost.hpp.

◆ changeUpInCost()

double AbcNonLinearCost::changeUpInCost ( int  ) const
inline

Definition at line 159 of file AbcNonLinearCost.hpp.

◆ changeDownInCost()

double AbcNonLinearCost::changeDownInCost ( int  ) const
inline

Definition at line 163 of file AbcNonLinearCost.hpp.

◆ changeInCost() [2/3]

double AbcNonLinearCost::changeInCost ( int  iRow,
double  alpha,
double &  rhs 
)
inline

This also updates next bound.

Definition at line 168 of file AbcNonLinearCost.hpp.

◆ numberInfeasibilities()

int AbcNonLinearCost::numberInfeasibilities ( ) const
inline

Number of infeasibilities.

Definition at line 207 of file AbcNonLinearCost.hpp.

◆ changeInCost() [3/3]

double AbcNonLinearCost::changeInCost ( ) const
inline

Change in cost.

Definition at line 212 of file AbcNonLinearCost.hpp.

◆ feasibleCost()

double AbcNonLinearCost::feasibleCost ( ) const
inline

Feasible cost.

Definition at line 217 of file AbcNonLinearCost.hpp.

◆ feasibleReportCost()

double AbcNonLinearCost::feasibleReportCost ( ) const

Feasible cost with offset and direction (i.e. for reporting)

◆ sumInfeasibilities()

double AbcNonLinearCost::sumInfeasibilities ( ) const
inline

Sum of infeasibilities.

Definition at line 224 of file AbcNonLinearCost.hpp.

◆ largestInfeasibility()

double AbcNonLinearCost::largestInfeasibility ( ) const
inline

Largest infeasibility.

Definition at line 229 of file AbcNonLinearCost.hpp.

◆ averageTheta()

double AbcNonLinearCost::averageTheta ( ) const
inline

Average theta.

Definition at line 234 of file AbcNonLinearCost.hpp.

◆ setAverageTheta()

void AbcNonLinearCost::setAverageTheta ( double  value)
inline

Definition at line 238 of file AbcNonLinearCost.hpp.

◆ setChangeInCost()

void AbcNonLinearCost::setChangeInCost ( double  value)
inline

Definition at line 242 of file AbcNonLinearCost.hpp.

◆ statusArray()

unsigned char* AbcNonLinearCost::statusArray ( ) const
inline

Definition at line 248 of file AbcNonLinearCost.hpp.

◆ getCurrentStatus()

int AbcNonLinearCost::getCurrentStatus ( int  sequence)
inline

Definition at line 252 of file AbcNonLinearCost.hpp.

◆ validate()

void AbcNonLinearCost::validate ( )

For debug.

Member Data Documentation

◆ changeCost_

double AbcNonLinearCost::changeCost_
private

Change in cost because of infeasibilities.

Definition at line 264 of file AbcNonLinearCost.hpp.

◆ feasibleCost_

double AbcNonLinearCost::feasibleCost_
private

Feasible cost.

Definition at line 266 of file AbcNonLinearCost.hpp.

◆ infeasibilityWeight_

double AbcNonLinearCost::infeasibilityWeight_
private

Current infeasibility weight.

Definition at line 268 of file AbcNonLinearCost.hpp.

◆ largestInfeasibility_

double AbcNonLinearCost::largestInfeasibility_
private

Largest infeasibility.

Definition at line 270 of file AbcNonLinearCost.hpp.

◆ sumInfeasibilities_

double AbcNonLinearCost::sumInfeasibilities_
private

Sum of infeasibilities.

Definition at line 272 of file AbcNonLinearCost.hpp.

◆ averageTheta_

double AbcNonLinearCost::averageTheta_
private

Average theta - kept here as only for primal.

Definition at line 274 of file AbcNonLinearCost.hpp.

◆ numberRows_

int AbcNonLinearCost::numberRows_
private

Number of rows (mainly for checking and copy)

Definition at line 276 of file AbcNonLinearCost.hpp.

◆ numberColumns_

int AbcNonLinearCost::numberColumns_
private

Number of columns (mainly for checking and copy)

Definition at line 278 of file AbcNonLinearCost.hpp.

◆ model_

AbcSimplex* AbcNonLinearCost::model_
private

Model.

Definition at line 280 of file AbcNonLinearCost.hpp.

◆ numberInfeasibilities_

int AbcNonLinearCost::numberInfeasibilities_
private

Number of infeasibilities found.

Definition at line 282 of file AbcNonLinearCost.hpp.

◆ status_

unsigned char* AbcNonLinearCost::status_
private

Contains status at beginning and current.

Definition at line 285 of file AbcNonLinearCost.hpp.

◆ bound_

double* AbcNonLinearCost::bound_
private

Bound which has been replaced in lower_ or upper_.

Definition at line 287 of file AbcNonLinearCost.hpp.

◆ cost_

double* AbcNonLinearCost::cost_
private

Feasible cost array.

Definition at line 289 of file AbcNonLinearCost.hpp.


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