Clp  1.17.8
Public Types | Friends | List of all members
AbcSimplex Class Reference

#include <AbcSimplex.hpp>

+ Inheritance diagram for AbcSimplex:
+ Collaboration diagram for AbcSimplex:

Public Types

enum  Status {
  atLowerBound = 0x00, atUpperBound = 0x01, isFree = 0x04, superBasic = 0x05,
  basic = 0x06, isFixed = 0x07
}
 enums for status of various sorts. More...
 
enum  FakeBound { noFake = 0x00, lowerFake = 0x01, upperFake = 0x02, bothFake = 0x03 }
 
- Public Types inherited from ClpSimplex
enum  Status {
  isFree = 0x00, basic = 0x01, atUpperBound = 0x02, atLowerBound = 0x03,
  superBasic = 0x04, isFixed = 0x05
}
 enums for status of various sorts. More...
 
enum  FakeBound { noFake = 0x00, lowerFake = 0x01, upperFake = 0x02, bothFake = 0x03 }
 

Public Member Functions

Constructors and destructor and copy
 AbcSimplex (bool emptyMessages=false)
 Default constructor. More...
 
 AbcSimplex (const AbcSimplex &rhs)
 Copy constructor. More...
 
 AbcSimplex (const ClpSimplex &rhs)
 Copy constructor from model. More...
 
 AbcSimplex (const ClpSimplex *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true, bool fixOthers=false)
 Subproblem constructor. More...
 
 AbcSimplex (const AbcSimplex *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true, bool fixOthers=false)
 Subproblem constructor. More...
 
 AbcSimplex (AbcSimplex *wholeModel, int numberColumns, const int *whichColumns)
 This constructor modifies original AbcSimplex and stores original stuff in created AbcSimplex. More...
 
void originalModel (AbcSimplex *miniModel)
 This copies back stuff from miniModel and then deletes miniModel. More...
 
 AbcSimplex (const ClpSimplex *clpSimplex)
 This constructor copies from ClpSimplex. More...
 
void putBackSolution (ClpSimplex *simplex)
 Put back solution into ClpSimplex. More...
 
void makeBaseModel ()
 Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 but give a bit extra if bigger needed. More...
 
void deleteBaseModel ()
 Switch off base model. More...
 
AbcSimplexbaseModel () const
 See if we have base model. More...
 
void setToBaseModel (AbcSimplex *model=NULL)
 Reset to base model (just size and arrays needed) If model NULL use internal copy. More...
 
AbcSimplexoperator= (const AbcSimplex &rhs)
 Assignment operator. This copies the data. More...
 
 ~AbcSimplex ()
 Destructor. More...
 
Functions most useful to user
int dual ()
 Dual algorithm - see AbcSimplexDual.hpp for method. More...
 
int doAbcDual ()
 
int primal (int ifValuesPass)
 Primal algorithm - see AbcSimplexPrimal.hpp for method. More...
 
int doAbcPrimal (int ifValuesPass)
 
CoinWarmStartBasis * getBasis () const
 Returns a basis (to be deleted by user) More...
 
void setFactorization (AbcSimplexFactorization &factorization)
 Passes in factorization. More...
 
AbcSimplexFactorizationswapFactorization (AbcSimplexFactorization *factorization)
 Swaps factorization. More...
 
AbcSimplexFactorizationgetEmptyFactorization ()
 Gets clean and emptyish factorization. More...
 
int tightenPrimalBounds ()
 Tightens primal bounds to make dual faster. More...
 
void setDualRowPivotAlgorithm (AbcDualRowPivot &choice)
 Sets row pivot choice algorithm in dual. More...
 
void setPrimalColumnPivotAlgorithm (AbcPrimalColumnPivot &choice)
 Sets column pivot choice algorithm in primal. More...
 
void defaultFactorizationFrequency ()
 If user left factorization frequency then compute. More...
 
most useful gets and sets
AbcSimplexFactorizationfactorization () const
 factorization More...
 
int factorizationFrequency () const
 Factorization frequency. More...
 
void setFactorizationFrequency (int value)
 
int maximumAbcNumberRows () const
 Maximum rows. More...
 
int maximumNumberTotal () const
 Maximum Total. More...
 
int maximumTotal () const
 
bool isObjectiveLimitTestValid () const
 Return true if the objective limit test can be relied upon. More...
 
int numberTotal () const
 Number of variables (includes spare rows) More...
 
int numberTotalWithoutFixed () const
 Number of variables without fixed to zero (includes spare rows) More...
 
CoinPartitionedVector * usefulArray (int index)
 Useful arrays (0,1,2,3,4,5,6,7) More...
 
CoinPartitionedVector * usefulArray (int index) const
 
double clpObjectiveValue () const
 Objective value. More...
 
int * pivotVariable () const
 Basic variables pivoting on which rows may be same as toExternal but may be as at invert. More...
 
int stateOfProblem () const
 State of problem. More...
 
void setStateOfProblem (int value)
 State of problem. More...
 
double * scaleFromExternal () const
 Points from external to internal. More...
 
double * scaleToExternal () const
 Scale from primal internal to external (in external order) Or other way for dual. More...
 
double * rowScale2 () const
 corresponds to rowScale etc More...
 
double * inverseRowScale2 () const
 
double * inverseColumnScale2 () const
 
double * columnScale2 () const
 
int arrayForDualColumn () const
 
double upperTheta () const
 upper theta from dual column More...
 
int arrayForReplaceColumn () const
 
int arrayForFlipBounds () const
 
int arrayForFlipRhs () const
 
int arrayForBtran () const
 
int arrayForFtran () const
 
int arrayForTableauRow () const
 
double valueIncomingDual () const
 value of incoming variable (in Dual) More...
 
const double * getColSolution () const
 Get pointer to array[getNumCols()] of primal solution vector. More...
 
const double * getRowPrice () const
 Get pointer to array[getNumRows()] of dual prices. More...
 
const double * getReducedCost () const
 Get a pointer to array[getNumCols()] of reduced costs. More...
 
const double * getRowActivity () const
 Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector. More...
 
Functions less likely to be useful to casual user
int getSolution ()
 Given an existing factorization computes and checks primal and dual solutions. More...
 
void setClpSimplexObjectiveValue ()
 Sets objectiveValue_ from rawObjectiveValue_. More...
 
void setupDualValuesPass (const double *fakeDuals, const double *fakePrimals, int type)
 Sets dual values pass djs using unscaled duals type 1 - values pass type 2 - just use as infeasibility weights type 3 - as 2 but crash. More...
 
double minimizationObjectiveValue () const
 Gets objective value with all offsets but as for minimization. More...
 
double currentDualTolerance () const
 Current dualTolerance (will end up as dualTolerance_) More...
 
void setCurrentDualTolerance (double value)
 
AbcNonLinearCostabcNonLinearCost () const
 Return pointer to details of costs. More...
 
double * perturbationSaved () const
 Perturbation (fixed) - is just scaled random numbers. More...
 
double acceptablePivot () const
 Acceptable pivot for this iteration. More...
 
int ordinaryVariables () const
 Set to 1 if no free or super basic. More...
 
int numberOrdinary () const
 Number of ordinary (lo/up) in tableau row. More...
 
void setNumberOrdinary (int number)
 Set number of ordinary (lo/up) in tableau row. More...
 
double currentDualBound () const
 Current dualBound (will end up as dualBound_) More...
 
AbcDualRowPivotdualRowPivot () const
 dual row pivot choice More...
 
AbcPrimalColumnPivotprimalColumnPivot () const
 primal column pivot choice More...
 
AbcMatrixabcMatrix () const
 Abc Matrix. More...
 
int internalFactorize (int solveType)
 Factorizes using current basis. More...
 
void permuteIn ()
 Permutes in from ClpModel data - assumes scale factors done and AbcMatrix exists but is in original order (including slacks) More...
 
void permuteBasis ()
 deals with new basis and puts in abcPivotVariable_ More...
 
void permuteOut (int whatsWanted)
 Permutes out - bit settings same as stateOfProblem. More...
 
ClpDataSave saveData ()
 Save data. More...
 
void restoreData (ClpDataSave saved)
 Restore data. More...
 
void cleanStatus (bool valuesPass=false)
 Clean up status - make sure no superbasic etc. More...
 
int computeDuals (double *givenDjs, CoinIndexedVector *array1, CoinIndexedVector *array2)
 Computes duals from scratch. More...
 
int computePrimals (CoinIndexedVector *array1, CoinIndexedVector *array2)
 Computes primals from scratch. Returns number of refinements. More...
 
void computeObjective ()
 Computes nonbasic cost and total cost. More...
 
void setMultipleSequenceIn (int sequenceIn[4])
 set multiple sequence in More...
 
void unpack (CoinIndexedVector &rowArray) const
 Unpacks one column of the matrix into indexed array Uses sequenceIn_. More...
 
void unpack (CoinIndexedVector &rowArray, int sequence) const
 Unpacks one column of the matrix into indexed array. More...
 
int housekeeping ()
 This does basis housekeeping and does values for in/out variables. More...
 
void checkPrimalSolution (bool justBasic)
 This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Primal) More...
 
void checkDualSolution ()
 This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Dual) More...
 
void checkDualSolutionPlusFake ()
 This sets largest infeasibility and most infeasible and sum and number of infeasibilities AND sumFakeInfeasibilites_ (Dual) More...
 
void checkBothSolutions ()
 This sets sum and number of infeasibilities (Dual and Primal) More...
 
int gutsOfSolution (int type)
 Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements) More...
 
int gutsOfPrimalSolution (int type)
 Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements) More...
 
void saveGoodStatus ()
 Saves good status etc. More...
 
void restoreGoodStatus (int type)
 Restores previous good status and says trouble. More...
 
void refreshCosts ()
 After modifying first copy refreshes second copy and marks as updated. More...
 
void refreshLower (unsigned int type=~(ROW_LOWER_SAME|COLUMN_UPPER_SAME))
 
void refreshUpper (unsigned int type=~(ROW_LOWER_SAME|COLUMN_LOWER_SAME))
 
void setupPointers (int maxRows, int maxColumns)
 Sets up all extra pointers. More...
 
void copyFromSaved (int type=31)
 Copies all saved versions to working versions and may do something for perturbation. More...
 
void fillPerturbation (int start, int number)
 fills in perturbationSaved_ from start with 0.5+random More...
 
void checkArrays (int ignoreEmpty=0) const
 For debug - prints summary of arrays which are out of kilter. More...
 
void checkDjs (int type=1) const
 For debug - summarizes dj situation (1 recomputes duals first, 2 checks duals as well) More...
 
void checkSolutionBasic () const
 For debug - checks solutionBasic. More...
 
void checkMoveBack (bool checkDuals)
 For debug - moves solution back to external and computes stuff (always checks djs) More...
 
void setValuesPassAction (double incomingInfeasibility, double allowedInfeasibility)
 For advanced use. More...
 
int cleanFactorization (int ifValuesPass)
 Get a clean factorization - i.e. More...
 
void moveStatusToClp (ClpSimplex *clpModel)
 Move status and solution to ClpSimplex. More...
 
void moveStatusFromClp (ClpSimplex *clpModel)
 Move status and solution from ClpSimplex. More...
 
protected methods
int gutsOfSolution (double *givenDuals, const double *givenPrimals, bool valuesPass=false)
 May change basis and then returns number changed. More...
 
void gutsOfDelete (int type)
 Does most of deletion for arrays etc(0 just null arrays, 1 delete first) More...
 
void gutsOfCopy (const AbcSimplex &rhs)
 Does most of copying. More...
 
void gutsOfInitialize (int numberRows, int numberColumns, bool doMore)
 Initializes arrays. More...
 
void gutsOfResize (int numberRows, int numberColumns)
 resizes arrays More...
 
void translate (int type)
 Translates ClpModel to AbcSimplex See DO_ bits in stateOfProblem_ for type e.g. More...
 
void moveToBasic (int which=15)
 Moves basic stuff to basic area. More...
 
public methods
double * solutionRegion () const
 Return region. More...
 
double * djRegion () const
 
double * lowerRegion () const
 
double * upperRegion () const
 
double * costRegion () const
 
double * solutionRegion (int which) const
 Return region. More...
 
double * djRegion (int which) const
 
double * lowerRegion (int which) const
 
double * upperRegion (int which) const
 
double * costRegion (int which) const
 
double * solutionBasic () const
 Return region. More...
 
double * djBasic () const
 
double * lowerBasic () const
 
double * upperBasic () const
 
double * costBasic () const
 
double * abcPerturbation () const
 Perturbation. More...
 
double * fakeDjs () const
 Fake djs. More...
 
unsigned char * internalStatus () const
 
AbcSimplex::Status getInternalStatus (int sequence) const
 
AbcSimplex::Status getInternalColumnStatus (int sequence) const
 
void setInternalStatus (int sequence, AbcSimplex::Status newstatus)
 
void setInternalColumnStatus (int sequence, AbcSimplex::Status newstatus)
 
void setInitialDenseFactorization (bool onOff)
 Normally the first factorization does sparse coding because the factorization could be singular. More...
 
bool initialDenseFactorization () const
 
int sequenceIn () const
 Return sequence In or Out. More...
 
int sequenceOut () const
 
void setSequenceIn (int sequence)
 Set sequenceIn or Out. More...
 
void setSequenceOut (int sequence)
 
int isColumn (int sequence) const
 Returns 1 if sequence indicates column. More...
 
int sequenceWithin (int sequence) const
 Returns sequence number within section. More...
 
int lastPivotRow () const
 Current/last pivot row (set after END of choosing pivot row in dual) More...
 
int firstFree () const
 First Free_. More...
 
int lastFirstFree () const
 Last firstFree_. More...
 
int freeSequenceIn () const
 Free chosen vector. More...
 
double currentAcceptablePivot () const
 Acceptable pivot for this iteration. More...
 
int fakeSuperBasic (int iSequence)
 Returns 1 if fake superbasic 0 if free or true superbasic -1 if was fake but has cleaned itself up (sets status) -2 if wasn't fake. More...
 
double solution (int sequence)
 Return row or column values. More...
 
double & solutionAddress (int sequence)
 Return address of row or column values. More...
 
double reducedCost (int sequence)
 
double & reducedCostAddress (int sequence)
 
double lower (int sequence)
 
double & lowerAddress (int sequence)
 Return address of row or column lower bound. More...
 
double upper (int sequence)
 
double & upperAddress (int sequence)
 Return address of row or column upper bound. More...
 
double cost (int sequence)
 
double & costAddress (int sequence)
 Return address of row or column cost. More...
 
double originalLower (int iSequence) const
 Return original lower bound. More...
 
double originalUpper (int iSequence) const
 Return original lower bound. More...
 
AbcSimplexProgress * abcProgress ()
 For dealing with all issues of cycling etc. More...
 
void clearArraysPublic (int which)
 Clears an array and says available (-1 does all) when no possibility of going parallel. More...
 
int getAvailableArrayPublic () const
 Returns first available empty array (and sets flag) when no possibility of going parallel. More...
 
void clearArrays (int which)
 Clears an array and says available (-1 does all) More...
 
void clearArrays (CoinPartitionedVector *which)
 Clears an array and says available. More...
 
int getAvailableArray () const
 Returns first available empty array (and sets flag) More...
 
void setUsedArray (int which) const
 Say array going to be used. More...
 
void setAvailableArray (int which) const
 Say array going available. More...
 
void swapPrimalStuff ()
 Swaps primal stuff. More...
 
void swapDualStuff (int lastSequenceOut, int lastDirectionOut)
 Swaps dual stuff. More...
 
Changing bounds on variables and constraints
void setObjectiveCoefficient (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
void setObjCoeff (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
void setColumnLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
void setColumnUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. More...
 
void setColumnBounds (int elementIndex, double lower, double upper)
 Set a single column lower and upper bound. More...
 
void setColumnSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of columns simultaneously
The default implementation just invokes setColLower() and setColUpper() over and over again. More...
 
void setColLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
void setColUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. More...
 
void setColBounds (int elementIndex, double newlower, double newupper)
 Set a single column lower and upper bound. More...
 
void setColSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of columns simultaneously
More...
 
void setRowLower (int elementIndex, double elementValue)
 Set a single row lower bound
Use -DBL_MAX for -infinity. More...
 
void setRowUpper (int elementIndex, double elementValue)
 Set a single row upper bound
Use DBL_MAX for infinity. More...
 
void setRowBounds (int elementIndex, double lower, double upper)
 Set a single row lower and upper bound. More...
 
void setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of rows simultaneously
More...
 
void resize (int newNumberRows, int newNumberColumns)
 Resizes rim part of model. More...
 
- Public Member Functions inherited from ClpSimplex
 ClpSimplex (bool emptyMessages=false)
 Default constructor. More...
 
 ClpSimplex (const ClpSimplex &rhs, int scalingMode=-1)
 Copy constructor. More...
 
 ClpSimplex (const ClpModel &rhs, int scalingMode=-1)
 Copy constructor from model. More...
 
 ClpSimplex (const ClpModel *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true, bool fixOthers=false)
 Subproblem constructor. More...
 
 ClpSimplex (const ClpSimplex *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true, bool fixOthers=false)
 Subproblem constructor. More...
 
 ClpSimplex (ClpSimplex *wholeModel, int numberColumns, const int *whichColumns)
 This constructor modifies original ClpSimplex and stores original stuff in created ClpSimplex. More...
 
void originalModel (ClpSimplex *miniModel)
 This copies back stuff from miniModel and then deletes miniModel. More...
 
void setPersistenceFlag (int value)
 Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 but give a bit extra if bigger needed. More...
 
void makeBaseModel ()
 Save a copy of model with certain state - normally without cuts. More...
 
void deleteBaseModel ()
 Switch off base model. More...
 
ClpSimplexbaseModel () const
 See if we have base model. More...
 
void setToBaseModel (ClpSimplex *model=NULL)
 Reset to base model (just size and arrays needed) If model NULL use internal copy. More...
 
ClpSimplexoperator= (const ClpSimplex &rhs)
 Assignment operator. This copies the data. More...
 
 ~ClpSimplex ()
 Destructor. More...
 
void loadProblem (const ClpMatrixBase &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 Loads a problem (the constraints on the rows are given by lower and upper bounds). More...
 
void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 
void loadProblem (const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 Just like the other loadProblem() method except that the matrix is given in a standard column major ordered format (without gaps). More...
 
void loadProblem (const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const int *length, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 This one is for after presolve to save memory. More...
 
int loadProblem (CoinModel &modelObject, bool keepSolution=false)
 This loads a model from a coinModel object - returns number of errors. More...
 
int readMps (const char *filename, bool keepNames=false, bool ignoreErrors=false)
 Read an mps file from the given filename. More...
 
int readGMPL (const char *filename, const char *dataName, bool keepNames=false)
 Read GMPL files from the given filenames. More...
 
int readLp (const char *filename, const double epsilon=1e-5)
 Read file in LP format from file with name filename. More...
 
void writeLp (const char *filename, const char *extension="lp", double epsilon=1e-5, int numberAcross=10, int decimals=5, double objSense=0.0, bool useRowNames=true) const
 Write the problem into an Lp file of the given filename. More...
 
void borrowModel (ClpModel &otherModel)
 Borrow model. More...
 
void borrowModel (ClpSimplex &otherModel)
 
void passInEventHandler (const ClpEventHandler *eventHandler)
 Pass in Event handler (cloned and deleted at end) More...
 
void getbackSolution (const ClpSimplex &smallModel, const int *whichRow, const int *whichColumn)
 Puts solution back into small model. More...
 
int loadNonLinear (void *info, int &numberConstraints, ClpConstraint **&constraints)
 Load nonlinear part of problem from AMPL info Returns 0 if linear 1 if quadratic objective 2 if quadratic constraints 3 if nonlinear objective 4 if nonlinear constraints -1 on failure. More...
 
int initialSolve (ClpSolve &options)
 General solve algorithm which can do presolve. More...
 
int initialSolve ()
 Default initial solve. More...
 
int initialDualSolve ()
 Dual initial solve. More...
 
int initialPrimalSolve ()
 Primal initial solve. More...
 
int initialBarrierSolve ()
 Barrier initial solve. More...
 
int initialBarrierNoCrossSolve ()
 Barrier initial solve, not to be followed by crossover. More...
 
int dual (int ifValuesPass=0, int startFinishOptions=0)
 Dual algorithm - see ClpSimplexDual.hpp for method. More...
 
int dualDebug (int ifValuesPass=0, int startFinishOptions=0)
 
int primal (int ifValuesPass=0, int startFinishOptions=0)
 Primal algorithm - see ClpSimplexPrimal.hpp for method. More...
 
int nonlinearSLP (int numberPasses, double deltaTolerance)
 Solves nonlinear problem using SLP - may be used as crash for other algorithms when number of iterations small. More...
 
int nonlinearSLP (int numberConstraints, ClpConstraint **constraints, int numberPasses, double deltaTolerance)
 Solves problem with nonlinear constraints using SLP - may be used as crash for other algorithms when number of iterations small. More...
 
int barrier (bool crossover=true)
 Solves using barrier (assumes you have good cholesky factor code). More...
 
int reducedGradient (int phase=0)
 Solves non-linear using reduced gradient. More...
 
int solve (CoinStructuredModel *model)
 Solve using structure of model and maybe in parallel. More...
 
int loadProblem (CoinStructuredModel &modelObject, bool originalOrder=true, bool keepSolution=false)
 This loads a model from a CoinStructuredModel object - returns number of errors. More...
 
int cleanup (int cleanupScaling)
 When scaling is on it is possible that the scaled problem is feasible but the unscaled is not. More...
 
int cleanPrimalSolution (double exactMultiple)
 Clean primal solution If you expect solution to only have exact multiples of "exactMultiple" then this tries moving solution values to nearest multiple. More...
 
int dualRanging (int numberCheck, const int *which, double *costIncrease, int *sequenceIncrease, double *costDecrease, int *sequenceDecrease, double *valueIncrease=NULL, double *valueDecrease=NULL)
 Dual ranging. More...
 
int primalRanging (int numberCheck, const int *which, double *valueIncrease, int *sequenceIncrease, double *valueDecrease, int *sequenceDecrease)
 Primal ranging. More...
 
int modifyCoefficientsAndPivot (int number, const int *which, const CoinBigIndex *start, const int *row, const double *newCoefficient, const unsigned char *newStatus=NULL, const double *newLower=NULL, const double *newUpper=NULL, const double *newObjective=NULL)
 Modifies coefficients etc and if necessary pivots in and out. More...
 
int outDuplicateRows (int numberLook, int *whichRows, bool noOverlaps=false, double tolerance=-1.0, double cleanUp=0.0)
 Take out duplicate rows (includes scaled rows and intersections). More...
 
double moveTowardsPrimalFeasible ()
 Try simple crash like techniques to get closer to primal feasibility returns final sum of infeasibilities. More...
 
void removeSuperBasicSlacks (int threshold=0)
 Try simple crash like techniques to remove super basic slacks but only if > threshold. More...
 
ClpSimplexminiPresolve (char *rowType, char *columnType, void **info)
 Mini presolve (faster) Char arrays must be numberRows and numberColumns long on entry second part must be filled in as follows - 0 - possible >0 - take out and do something (depending on value - TBD) -1 row/column can't vanish but can have entries removed/changed -2 don't touch at all on exit <=0 ones will be in presolved problem struct will be created and will be long enough (information on length etc in first entry) user must delete struct. More...
 
void miniPostsolve (const ClpSimplex *presolvedModel, void *info)
 After mini presolve. More...
 
void miniSolve (char *rowType, char *columnType, int algorithm, int startUp)
 mini presolve and solve More...
 
int writeBasis (const char *filename, bool writeValues=false, int formatType=0) const
 Write the basis in MPS format to the specified file. More...
 
int readBasis (const char *filename)
 Read a basis from the given filename, returns -1 on file error, 0 if no values, 1 if values. More...
 
CoinWarmStartBasis * getBasis () const
 Returns a basis (to be deleted by user) More...
 
void setFactorization (ClpFactorization &factorization)
 Passes in factorization. More...
 
ClpFactorizationswapFactorization (ClpFactorization *factorization)
 
void copyFactorization (ClpFactorization &factorization)
 Copies in factorization to existing one. More...
 
int tightenPrimalBounds (double factor=0.0, int doTight=0, bool tightIntegers=false)
 Tightens primal bounds to make dual faster. More...
 
int crash (double gap, int pivot)
 Crash - at present just aimed at dual, returns -2 if dual preferred and crash basis created -1 if dual preferred and all slack basis preferred 0 if basis going in was not all slack 1 if primal preferred and all slack basis preferred 2 if primal preferred and crash basis created. More...
 
void setDualRowPivotAlgorithm (ClpDualRowPivot &choice)
 Sets row pivot choice algorithm in dual. More...
 
void setPrimalColumnPivotAlgorithm (ClpPrimalColumnPivot &choice)
 Sets column pivot choice algorithm in primal. More...
 
void markHotStart (void *&saveStuff)
 Create a hotstart point of the optimization process. More...
 
void solveFromHotStart (void *saveStuff)
 Optimize starting from the hotstart. More...
 
void unmarkHotStart (void *saveStuff)
 Delete the snapshot. More...
 
int strongBranching (int numberVariables, const int *variables, double *newLower, double *newUpper, double **outputSolution, int *outputStatus, int *outputIterations, bool stopOnFirstInfeasible=true, bool alwaysFinish=false, int startFinishOptions=0)
 For strong branching. More...
 
int fathom (void *stuff)
 Fathom - 1 if solution. More...
 
int fathomMany (void *stuff)
 Do up to N deep - returns -1 - no solution nNodes_ valid nodes >= if solution and that node gives solution ClpNode array is 2**N long. More...
 
double doubleCheck ()
 Double checks OK. More...
 
int startFastDual2 (ClpNodeStuff *stuff)
 Starts Fast dual2. More...
 
int fastDual2 (ClpNodeStuff *stuff)
 Like Fast dual. More...
 
void stopFastDual2 (ClpNodeStuff *stuff)
 Stops Fast dual2. More...
 
ClpSimplexfastCrunch (ClpNodeStuff *stuff, int mode)
 Deals with crunch aspects mode 0 - in 1 - out with solution 2 - out without solution returns small model or NULL. More...
 
int pivot ()
 Pivot in a variable and out a variable. More...
 
int primalPivotResult ()
 Pivot in a variable and choose an outgoing one. More...
 
int dualPivotResultPart1 ()
 Pivot out a variable and choose an incoing one. More...
 
int pivotResultPart2 (int algorithm, int state)
 Do actual pivot state is 0 if need tableau column, 1 if in rowArray_[1]. More...
 
int startup (int ifValuesPass, int startFinishOptions=0)
 Common bits of coding for dual and primal. More...
 
void finish (int startFinishOptions=0)
 
bool statusOfProblem (bool initial=false)
 Factorizes and returns true if optimal. More...
 
void defaultFactorizationFrequency ()
 If user left factorization frequency then compute. More...
 
void copyEnabledStuff (const ClpSimplex *rhs)
 Copy across enabled stuff from one solver to another. More...
 
bool primalFeasible () const
 If problem is primal feasible. More...
 
bool dualFeasible () const
 If problem is dual feasible. More...
 
ClpFactorizationfactorization () const
 factorization More...
 
bool sparseFactorization () const
 Sparsity on or off. More...
 
void setSparseFactorization (bool value)
 
int factorizationFrequency () const
 Factorization frequency. More...
 
void setFactorizationFrequency (int value)
 
double dualBound () const
 Dual bound. More...
 
void setDualBound (double value)
 
double infeasibilityCost () const
 Infeasibility cost. More...
 
void setInfeasibilityCost (double value)
 
int perturbation () const
 Amount of print out: 0 - none 1 - just final 2 - just factorizations 3 - as 2 plus a bit more 4 - verbose above that 8,16,32 etc just for selective debug. More...
 
void setPerturbation (int value)
 
int algorithm () const
 Current (or last) algorithm. More...
 
void setAlgorithm (int value)
 Set algorithm. More...
 
bool isObjectiveLimitTestValid () const
 Return true if the objective limit test can be relied upon. More...
 
double sumDualInfeasibilities () const
 Sum of dual infeasibilities. More...
 
void setSumDualInfeasibilities (double value)
 
double sumOfRelaxedDualInfeasibilities () const
 Sum of relaxed dual infeasibilities. More...
 
void setSumOfRelaxedDualInfeasibilities (double value)
 
int numberDualInfeasibilities () const
 Number of dual infeasibilities. More...
 
void setNumberDualInfeasibilities (int value)
 
int numberDualInfeasibilitiesWithoutFree () const
 Number of dual infeasibilities (without free) More...
 
double sumPrimalInfeasibilities () const
 Sum of primal infeasibilities. More...
 
void setSumPrimalInfeasibilities (double value)
 
double sumOfRelaxedPrimalInfeasibilities () const
 Sum of relaxed primal infeasibilities. More...
 
void setSumOfRelaxedPrimalInfeasibilities (double value)
 
int numberPrimalInfeasibilities () const
 Number of primal infeasibilities. More...
 
void setNumberPrimalInfeasibilities (int value)
 
int saveModel (const char *fileName)
 Save model to file, returns 0 if success. More...
 
int restoreModel (const char *fileName)
 Restore model from file, returns 0 if success, deletes current model. More...
 
void checkSolution (int setToBounds=0)
 Just check solution (for external use) - sets sum of infeasibilities etc. More...
 
void checkSolutionInternal ()
 Just check solution (for internal use) - sets sum of infeasibilities etc. More...
 
void checkUnscaledSolution ()
 Check unscaled primal solution but allow for rounding error. More...
 
CoinIndexedVector * rowArray (int index) const
 Useful row length arrays (0,1,2,3,4,5) More...
 
CoinIndexedVector * columnArray (int index) const
 Useful column length arrays (0,1,2,3,4,5) More...
 
double alphaAccuracy () const
 Initial value for alpha accuracy calculation (-1.0 off) More...
 
void setAlphaAccuracy (double value)
 
void setDisasterHandler (ClpDisasterHandler *handler)
 Objective value. More...
 
ClpDisasterHandlerdisasterHandler () const
 Get disaster handler. More...
 
double largeValue () const
 Large bound value (for complementarity etc) More...
 
void setLargeValue (double value)
 
double largestPrimalError () const
 Largest error on Ax-b. More...
 
double largestDualError () const
 Largest error on basic duals. More...
 
void setLargestPrimalError (double value)
 Largest error on Ax-b. More...
 
void setLargestDualError (double value)
 Largest error on basic duals. More...
 
double zeroTolerance () const
 Get zero tolerance. More...
 
void setZeroTolerance (double value)
 Set zero tolerance. More...
 
int * pivotVariable () const
 Basic variables pivoting on which rows. More...
 
bool automaticScaling () const
 If automatic scaling on. More...
 
void setAutomaticScaling (bool onOff)
 
double currentDualTolerance () const
 Current dual tolerance. More...
 
void setCurrentDualTolerance (double value)
 
double currentPrimalTolerance () const
 Current primal tolerance. More...
 
void setCurrentPrimalTolerance (double value)
 
int numberRefinements () const
 How many iterative refinements to do. More...
 
void setNumberRefinements (int value)
 
double alpha () const
 Alpha (pivot element) for use by classes e.g. steepestedge. More...
 
void setAlpha (double value)
 
double dualIn () const
 Reduced cost of last incoming for use by classes e.g. steepestedge. More...
 
void setDualIn (double value)
 Set reduced cost of last incoming to force error. More...
 
int pivotRow () const
 Pivot Row for use by classes e.g. steepestedge. More...
 
void setPivotRow (int value)
 
double valueIncomingDual () const
 value of incoming variable (in Dual) More...
 
double * solutionRegion (int section) const
 Return row or column sections - not as much needed as it once was. More...
 
double * djRegion (int section) const
 
double * lowerRegion (int section) const
 
double * upperRegion (int section) const
 
double * costRegion (int section) const
 
double * solutionRegion () const
 Return region as single array. More...
 
double * djRegion () const
 
double * lowerRegion () const
 
double * upperRegion () const
 
double * costRegion () const
 
Status getStatus (int sequence) const
 
void setStatus (int sequence, Status newstatus)
 
bool startPermanentArrays ()
 Start or reset using maximumRows_ and Columns_ - true if change. More...
 
void setInitialDenseFactorization (bool onOff)
 Normally the first factorization does sparse coding because the factorization could be singular. More...
 
bool initialDenseFactorization () const
 
int sequenceIn () const
 Return sequence In or Out. More...
 
int sequenceOut () const
 
void setSequenceIn (int sequence)
 Set sequenceIn or Out. More...
 
void setSequenceOut (int sequence)
 
int directionIn () const
 Return direction In or Out. More...
 
int directionOut () const
 
void setDirectionIn (int direction)
 Set directionIn or Out. More...
 
void setDirectionOut (int direction)
 
double valueOut () const
 Value of Out variable. More...
 
double lowerOut () const
 Lower of out variable. More...
 
double upperOut () const
 Upper of out variable. More...
 
void setValueOut (double value)
 Set value of out variable. More...
 
double dualOut () const
 Dual value of Out variable. More...
 
void setDualOut (double value)
 Set dual value of out variable. More...
 
void setLowerOut (double value)
 Set lower of out variable. More...
 
void setUpperOut (double value)
 Set upper of out variable. More...
 
void setTheta (double value)
 Set theta of out variable. More...
 
int isColumn (int sequence) const
 Returns 1 if sequence indicates column. More...
 
int sequenceWithin (int sequence) const
 Returns sequence number within section. More...
 
double solution (int sequence)
 Return row or column values. More...
 
double & solutionAddress (int sequence)
 Return address of row or column values. More...
 
double reducedCost (int sequence)
 
double & reducedCostAddress (int sequence)
 
double lower (int sequence)
 
double & lowerAddress (int sequence)
 Return address of row or column lower bound. More...
 
double upper (int sequence)
 
double & upperAddress (int sequence)
 Return address of row or column upper bound. More...
 
double cost (int sequence)
 
double & costAddress (int sequence)
 Return address of row or column cost. More...
 
double originalLower (int iSequence) const
 Return original lower bound. More...
 
double originalUpper (int iSequence) const
 Return original lower bound. More...
 
double theta () const
 Theta (pivot change) More...
 
double lowerIn () const
 Lower Bound on In variable. More...
 
double valueIn () const
 Value of In variable. More...
 
double upperIn () const
 Upper Bound on In variable. More...
 
double bestPossibleImprovement () const
 Best possible improvement using djs (primal) or obj change by flipping bounds to make dual feasible (dual) More...
 
ClpNonLinearCostnonLinearCost () const
 Return pointer to details of costs. More...
 
void setNonLinearCost (ClpNonLinearCost &nonLinearCost)
 Set pointer to details of costs. More...
 
int moreSpecialOptions () const
 Return more special options 1 bit - if presolve says infeasible in ClpSolve return 2 bit - if presolved problem infeasible return 4 bit - keep arrays like upper_ around 8 bit - no free or superBasic variables 16 bit - if checking replaceColumn accuracy before updating 32 bit - say optimal if primal feasible! 64 bit - give up easily in dual (and say infeasible) 128 bit - no objective, 0-1 and in B&B 256 bit - in primal from dual or vice versa 512 bit - alternative use of solveType_ 1024 bit - don't do row copy of factorization 2048 bit - perturb in complete fathoming 4096 bit - try more for complete fathoming 8192 bit - don't even think of using primal if user asks for dual (and vv) 16384 bit - in initialSolve so be more flexible 32768 bit - don't swap algorithms from dual if small infeasibility 65536 bit - perturb in postsolve cleanup (even if < 10000 rows) 131072 bit (*3) initial stateDualColumn 524288 bit - stop when primal feasible 1048576 bit - stop when primal feasible after n-1000000 iterations 2097152 bit - no primal in fastDual2 if feasible 4194304 bit - tolerances have been changed by code 8388608 bit - tolerances are dynamic (at first) 16777216 bit - if factorization kept can still declare optimal at once. More...
 
int vectorMode () const
 Get vector mode. More...
 
void setMoreSpecialOptions (int value)
 Set more special options 1 bit - if presolve says infeasible in ClpSolve return 2 bit - if presolved problem infeasible return 4 bit - keep arrays like upper_ around 8 bit - no free or superBasic variables 16 bit - if checking replaceColumn accuracy before updating 32 bit - say optimal if primal feasible! 64 bit - give up easily in dual (and say infeasible) 128 bit - no objective, 0-1 and in B&B 256 bit - in primal from dual or vice versa 512 bit - alternative use of solveType_ 1024 bit - don't do row copy of factorization 2048 bit - perturb in complete fathoming 4096 bit - try more for complete fathoming 8192 bit - don't even think of using primal if user asks for dual (and vv) 16384 bit - in initialSolve so be more flexible 32768 bit - don't swap algorithms from dual if small infeasibility 65536 bit - perturb in postsolve cleanup (even if < 10000 rows) 131072 bit (*3) initial stateDualColumn 524288 bit - stop when primal feasible 1048576 bit - don't perturb even if long time 2097152 bit - no primal in fastDual2 if feasible 4194304 bit - tolerances have been changed by code 8388608 bit - tolerances are dynamic (at first) 16777216 bit - if factorization kept can still declare optimal at once. More...
 
void setVectorMode (int value)
 Set vector mode. More...
 
void setFakeBound (int sequence, FakeBound fakeBound)
 
FakeBound getFakeBound (int sequence) const
 
void setRowStatus (int sequence, Status newstatus)
 
Status getRowStatus (int sequence) const
 
void setColumnStatus (int sequence, Status newstatus)
 
Status getColumnStatus (int sequence) const
 
void setPivoted (int sequence)
 
void clearPivoted (int sequence)
 
bool pivoted (int sequence) const
 
void setFlagged (int sequence)
 To flag a variable (not inline to allow for column generation) More...
 
void clearFlagged (int sequence)
 
bool flagged (int sequence) const
 
void setActive (int iRow)
 To say row active in primal pivot row choice. More...
 
void clearActive (int iRow)
 
bool active (int iRow) const
 
void setPerturbed (int iSequence)
 To say perturbed. More...
 
void clearPerturbed (int iSequence)
 
bool perturbed (int iSequence) const
 
void createStatus ()
 Set up status array (can be used by OsiClp). More...
 
void allSlackBasis (bool resetSolution=false)
 Sets up all slack basis and resets solution to as it was after initial load or readMps. More...
 
int lastBadIteration () const
 So we know when to be cautious. More...
 
void setLastBadIteration (int value)
 Set so we know when to be cautious. More...
 
int progressFlag () const
 Progress flag - at present 0 bit says artificials out. More...
 
ClpSimplexProgressprogress ()
 For dealing with all issues of cycling etc. More...
 
int forceFactorization () const
 Force re-factorization early value. More...
 
void forceFactorization (int value)
 Force re-factorization early. More...
 
double rawObjectiveValue () const
 Raw objective value (so always minimize in primal) More...
 
void computeObjectiveValue (bool useWorkingSolution=false)
 Compute objective value from solution and put in objectiveValue_. More...
 
double computeInternalObjectiveValue ()
 Compute minimization objective value from internal solution without perturbation. More...
 
double * infeasibilityRay (bool fullRay=false) const
 Infeasibility/unbounded ray (NULL returned if none/wrong) Up to user to use delete [] on these arrays. More...
 
int numberExtraRows () const
 Number of extra rows. More...
 
int maximumBasic () const
 Maximum number of basic variables - can be more than number of rows if GUB. More...
 
int baseIteration () const
 Iteration when we entered dual or primal. More...
 
void generateCpp (FILE *fp, bool defaultFactor=false)
 Create C++ lines to get to current state. More...
 
ClpFactorizationgetEmptyFactorization ()
 Gets clean and emptyish factorization. More...
 
void setEmptyFactorization ()
 May delete or may make clean and emptyish factorization. More...
 
void moveInfo (const ClpSimplex &rhs, bool justStatus=false)
 Move status and solution across. More...
 
void getBInvARow (int row, double *z, double *slack=NULL)
 Get a row of the tableau (slack part in slack if not NULL) More...
 
void getBInvRow (int row, double *z)
 Get a row of the basis inverse. More...
 
void getBInvACol (int col, double *vec)
 Get a column of the tableau. More...
 
void getBInvCol (int col, double *vec)
 Get a column of the basis inverse. More...
 
void getBasics (int *index)
 Get basic indices (order of indices corresponds to the order of elements in a vector retured by getBInvACol() and getBInvCol()). More...
 
void setObjectiveCoefficient (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
void setObjCoeff (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
void setColumnLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
void setColumnUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. More...
 
void setColumnBounds (int elementIndex, double lower, double upper)
 Set a single column lower and upper bound. More...
 
void setColumnSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of columns simultaneously
The default implementation just invokes setColLower() and setColUpper() over and over again. More...
 
void setColLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
void setColUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. More...
 
void setColBounds (int elementIndex, double newlower, double newupper)
 Set a single column lower and upper bound. More...
 
void setColSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of columns simultaneously
More...
 
void setRowLower (int elementIndex, double elementValue)
 Set a single row lower bound
Use -DBL_MAX for -infinity. More...
 
void setRowUpper (int elementIndex, double elementValue)
 Set a single row upper bound
Use DBL_MAX for infinity. More...
 
void setRowBounds (int elementIndex, double lower, double upper)
 Set a single row lower and upper bound. More...
 
void setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of rows simultaneously
More...
 
void resize (int newNumberRows, int newNumberColumns)
 Resizes rim part of model. More...
 
int getSolution (const double *rowActivities, const double *columnActivities)
 Given an existing factorization computes and checks primal and dual solutions. More...
 
int getSolution ()
 Given an existing factorization computes and checks primal and dual solutions. More...
 
int createPiecewiseLinearCosts (const int *starts, const double *lower, const double *gradient)
 Constructs a non linear cost from list of non-linearities (columns only) First lower of each column is taken as real lower Last lower is taken as real upper and cost ignored. More...
 
ClpDualRowPivotdualRowPivot () const
 dual row pivot choice More...
 
ClpPrimalColumnPivotprimalColumnPivot () const
 primal column pivot choice More...
 
bool goodAccuracy () const
 Returns true if model looks OK. More...
 
void returnModel (ClpSimplex &otherModel)
 Return model - updates any scalars. More...
 
int internalFactorize (int solveType)
 Factorizes using current basis. More...
 
ClpDataSave saveData ()
 Save data. More...
 
void restoreData (ClpDataSave saved)
 Restore data. More...
 
void cleanStatus ()
 Clean up status. More...
 
int factorize ()
 Factorizes using current basis. For external use. More...
 
void computeDuals (double *givenDjs)
 Computes duals from scratch. More...
 
void computePrimals (const double *rowActivities, const double *columnActivities)
 Computes primals from scratch. More...
 
void add (double *array, int column, double multiplier) const
 Adds multiple of a column into an array. More...
 
void unpack (CoinIndexedVector *rowArray) const
 Unpacks one column of the matrix into indexed array Uses sequenceIn_ Also applies scaling if needed. More...
 
void unpack (CoinIndexedVector *rowArray, int sequence) const
 Unpacks one column of the matrix into indexed array Slack if sequence>= numberColumns Also applies scaling if needed. More...
 
void unpackPacked (CoinIndexedVector *rowArray)
 Unpacks one column of the matrix into indexed array as packed vector Uses sequenceIn_ Also applies scaling if needed. More...
 
void unpackPacked (CoinIndexedVector *rowArray, int sequence)
 Unpacks one column of the matrix into indexed array as packed vector Slack if sequence>= numberColumns Also applies scaling if needed. More...
 
void setValuesPassAction (double incomingInfeasibility, double allowedInfeasibility)
 For advanced use. More...
 
int cleanFactorization (int ifValuesPass)
 Get a clean factorization - i.e. More...
 
- Public Member Functions inherited from ClpModel
 ClpModel (bool emptyMessages=false)
 Default constructor. More...
 
 ClpModel (const ClpModel &rhs, int scalingMode=-1)
 Copy constructor. More...
 
ClpModeloperator= (const ClpModel &rhs)
 Assignment operator. This copies the data. More...
 
 ClpModel (const ClpModel *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true)
 Subproblem constructor. More...
 
 ~ClpModel ()
 Destructor. More...
 
int numberRows () const
 Number of rows. More...
 
int getNumRows () const
 
int getNumCols () const
 Number of columns. More...
 
int numberColumns () const
 
double primalTolerance () const
 Primal tolerance to use. More...
 
void setPrimalTolerance (double value)
 
double dualTolerance () const
 Dual tolerance to use. More...
 
void setDualTolerance (double value)
 
double primalObjectiveLimit () const
 Primal objective limit. More...
 
void setPrimalObjectiveLimit (double value)
 
double dualObjectiveLimit () const
 Dual objective limit. More...
 
void setDualObjectiveLimit (double value)
 
double objectiveOffset () const
 Objective offset. More...
 
void setObjectiveOffset (double value)
 
double presolveTolerance () const
 Presolve tolerance to use. More...
 
const std::string & problemName () const
 
int numberIterations () const
 Number of iterations. More...
 
int getIterationCount () const
 
void setNumberIterations (int numberIterationsNew)
 
int solveType () const
 Solve type - 1 simplex, 2 simplex interface, 3 Interior. More...
 
void setSolveType (int type)
 
int maximumIterations () const
 Maximum number of iterations. More...
 
void setMaximumIterations (int value)
 
double maximumSeconds () const
 Maximum time in seconds (from when set called) More...
 
void setMaximumSeconds (double value)
 
void setMaximumWallSeconds (double value)
 
bool hitMaximumIterations () const
 Returns true if hit maximum iterations (or time) More...
 
int status () const
 Status of problem: -1 - unknown e.g. More...
 
int problemStatus () const
 
void setProblemStatus (int problemStatusNew)
 Set problem status. More...
 
int secondaryStatus () const
 Secondary status of problem - may get extended 0 - none 1 - primal infeasible because dual limit reached OR (probably primal infeasible but can't prove it - main status was 4) 2 - scaled problem optimal - unscaled problem has primal infeasibilities 3 - scaled problem optimal - unscaled problem has dual infeasibilities 4 - scaled problem optimal - unscaled problem has primal and dual infeasibilities 5 - giving up in primal with flagged variables 6 - failed due to empty problem check 7 - postSolve says not optimal 8 - failed due to bad element check 9 - status was 3 and stopped on time 10 - status was 3 but stopped as primal feasible 11 - status was 1/2 from presolve found infeasible or unbounded 100 up - translation of enum from ClpEventHandler. More...
 
void setSecondaryStatus (int newstatus)
 
bool isAbandoned () const
 Are there a numerical difficulties? More...
 
bool isProvenOptimal () const
 Is optimality proven? More...
 
bool isProvenPrimalInfeasible () const
 Is primal infeasiblity proven? More...
 
bool isProvenDualInfeasible () const
 Is dual infeasiblity proven? More...
 
bool isPrimalObjectiveLimitReached () const
 Is the given primal objective limit reached? More...
 
bool isDualObjectiveLimitReached () const
 Is the given dual objective limit reached? More...
 
bool isIterationLimitReached () const
 Iteration limit reached? More...
 
double optimizationDirection () const
 Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore. More...
 
double getObjSense () const
 
void setOptimizationDirection (double value)
 
double * primalRowSolution () const
 Primal row solution. More...
 
const double * getRowActivity () const
 
double * primalColumnSolution () const
 Primal column solution. More...
 
const double * getColSolution () const
 
void setColSolution (const double *input)
 
double * dualRowSolution () const
 Dual row solution. More...
 
const double * getRowPrice () const
 
double * dualColumnSolution () const
 Reduced costs. More...
 
const double * getReducedCost () const
 
double * rowLower () const
 Row lower. More...
 
const double * getRowLower () const
 
double * rowUpper () const
 Row upper. More...
 
const double * getRowUpper () const
 
void setObjectiveCoefficient (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
void setObjCoeff (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
void setColumnLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
void setColumnUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. More...
 
void setColumnBounds (int elementIndex, double lower, double upper)
 Set a single column lower and upper bound. More...
 
void setColumnSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of columns simultaneously
The default implementation just invokes setColLower() and setColUpper() over and over again. More...
 
void setColLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
void setColUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. More...
 
void setColBounds (int elementIndex, double lower, double upper)
 Set a single column lower and upper bound. More...
 
void setColSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of columns simultaneously
More...
 
void setRowLower (int elementIndex, double elementValue)
 Set a single row lower bound
Use -DBL_MAX for -infinity. More...
 
void setRowUpper (int elementIndex, double elementValue)
 Set a single row upper bound
Use DBL_MAX for infinity. More...
 
void setRowBounds (int elementIndex, double lower, double upper)
 Set a single row lower and upper bound. More...
 
void setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of rows simultaneously
More...
 
const double * rowScale () const
 Scaling. More...
 
const double * columnScale () const
 
const double * inverseRowScale () const
 
const double * inverseColumnScale () const
 
double * mutableRowScale () const
 
double * mutableColumnScale () const
 
double * mutableInverseRowScale () const
 
double * mutableInverseColumnScale () const
 
double * swapRowScale (double *newScale)
 
void setRowScale (double *scale)
 
void setColumnScale (double *scale)
 
double objectiveScale () const
 Scaling of objective. More...
 
void setObjectiveScale (double value)
 
double rhsScale () const
 Scaling of rhs and bounds. More...
 
void setRhsScale (double value)
 
void scaling (int mode=1)
 Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3 auto, 4 auto-but-as-initialSolve-in-bab. More...
 
void unscale ()
 If we constructed a "really" scaled model then this reverses the operation. More...
 
int scalingFlag () const
 Gets scalingFlag. More...
 
double * objective () const
 Objective. More...
 
double * objective (const double *solution, double &offset, bool refresh=true) const
 
const double * getObjCoefficients () const
 
double * rowObjective () const
 Row Objective. More...
 
const double * getRowObjCoefficients () const
 
double * columnLower () const
 Column Lower. More...
 
const double * getColLower () const
 
double * columnUpper () const
 Column Upper. More...
 
const double * getColUpper () const
 
CoinPackedMatrix * matrix () const
 Matrix (if not ClpPackedmatrix be careful about memory leak. More...
 
CoinBigIndex getNumElements () const
 Number of elements in matrix. More...
 
double getSmallElementValue () const
 Small element value - elements less than this set to zero, default is 1.0e-20. More...
 
void setSmallElementValue (double value)
 
ClpMatrixBaserowCopy () const
 Row Matrix. More...
 
void setNewRowCopy (ClpMatrixBase *newCopy)
 Set new row matrix. More...
 
ClpMatrixBaseclpMatrix () const
 Clp Matrix. More...
 
ClpPackedMatrixclpScaledMatrix () const
 Scaled ClpPackedMatrix. More...
 
void setClpScaledMatrix (ClpPackedMatrix *scaledMatrix)
 Sets pointer to scaled ClpPackedMatrix. More...
 
ClpPackedMatrixswapScaledMatrix (ClpPackedMatrix *scaledMatrix)
 Swaps pointer to scaled ClpPackedMatrix. More...
 
void replaceMatrix (ClpMatrixBase *matrix, bool deleteCurrent=false)
 Replace Clp Matrix (current is not deleted unless told to and new is used) So up to user to delete current. More...
 
void replaceMatrix (CoinPackedMatrix *newmatrix, bool deleteCurrent=false)
 Replace Clp Matrix (current is not deleted unless told to and new is used) So up to user to delete current. More...
 
double objectiveValue () const
 Objective value. More...
 
void setObjectiveValue (double value)
 
double getObjValue () const
 
char * integerInformation () const
 Integer information. More...
 
double * infeasibilityRay (bool fullRay=false) const
 Infeasibility/unbounded ray (NULL returned if none/wrong) Up to user to use delete [] on these arrays. More...
 
double * unboundedRay () const
 
double * ray () const
 For advanced users - no need to delete - sign not changed. More...
 
bool rayExists () const
 just test if infeasibility or unbounded Ray exists More...
 
void deleteRay ()
 just delete ray if exists More...
 
const double * internalRay () const
 Access internal ray storage. Users should call infeasibilityRay() or unboundedRay() instead. More...
 
bool statusExists () const
 See if status (i.e. basis) array exists (partly for OsiClp) More...
 
unsigned char * statusArray () const
 Return address of status (i.e. basis) array (char[numberRows+numberColumns]) More...
 
unsigned char * statusCopy () const
 Return copy of status (i.e. More...
 
void copyinStatus (const unsigned char *statusArray)
 Copy in status (basis) vector. More...
 
void setUserPointer (void *pointer)
 User pointer for whatever reason. More...
 
void * getUserPointer () const
 
void setTrustedUserPointer (ClpTrustedData *pointer)
 Trusted user pointer. More...
 
ClpTrustedDatagetTrustedUserPointer () const
 
int whatsChanged () const
 What has changed in model (only for masochistic users) More...
 
void setWhatsChanged (int value)
 
int numberThreads () const
 Number of threads (not really being used) More...
 
void setNumberThreads (int value)
 
void passInMessageHandler (CoinMessageHandler *handler)
 Pass in Message handler (not deleted at end) More...
 
CoinMessageHandler * pushMessageHandler (CoinMessageHandler *handler, bool &oldDefault)
 Pass in Message handler (not deleted at end) and return current. More...
 
void popMessageHandler (CoinMessageHandler *oldHandler, bool oldDefault)
 back to previous message handler More...
 
void newLanguage (CoinMessages::Language language)
 Set language. More...
 
void setLanguage (CoinMessages::Language language)
 
void setDefaultMessageHandler ()
 Overrides message handler with a default one. More...
 
CoinMessageHandler * messageHandler () const
 Return handler. More...
 
CoinMessages messages () const
 Return messages. More...
 
CoinMessages * messagesPointer ()
 Return pointer to messages. More...
 
CoinMessages coinMessages () const
 Return Coin messages. More...
 
CoinMessages * coinMessagesPointer ()
 Return pointer to Coin messages. More...
 
void setLogLevel (int value)
 Amount of print out: 0 - none 1 - just final 2 - just factorizations 3 - as 2 plus a bit more 4 - verbose above that 8,16,32 etc just for selective debug. More...
 
int logLevel () const
 
bool defaultHandler () const
 Return true if default handler. More...
 
void passInEventHandler (const ClpEventHandler *eventHandler)
 Pass in Event handler (cloned and deleted at end) More...
 
ClpEventHandlereventHandler () const
 Event handler. More...
 
CoinThreadRandom * randomNumberGenerator ()
 Thread specific random number generator. More...
 
CoinThreadRandom & mutableRandomNumberGenerator ()
 Thread specific random number generator. More...
 
void setRandomSeed (int value)
 Set seed for thread specific random number generator. More...
 
int lengthNames () const
 length of names (0 means no names0 More...
 
void setLengthNames (int value)
 length of names (0 means no names0 More...
 
const std::vector< std::string > * rowNames () const
 Row names. More...
 
const std::string & rowName (int iRow) const
 
std::string getRowName (int iRow) const
 Return name or Rnnnnnnn. More...
 
const std::vector< std::string > * columnNames () const
 Column names. More...
 
const std::string & columnName (int iColumn) const
 
std::string getColumnName (int iColumn) const
 Return name or Cnnnnnnn. More...
 
ClpObjectiveobjectiveAsObject () const
 Objective methods. More...
 
void setObjective (ClpObjective *objective)
 
void setObjectivePointer (ClpObjective *newobjective)
 
int emptyProblem (int *infeasNumber=NULL, double *infeasSum=NULL, bool printMessage=true)
 Solve a problem with no elements - return status and dual and primal infeasibilites. More...
 
void times (double scalar, const double *x, double *y) const
 Return y + A * x * scalar in y. More...
 
void transposeTimes (double scalar, const double *x, double *y) const
 Return y + x * scalar * A in y. More...
 
bool setIntParam (ClpIntParam key, int value)
 Set an integer parameter. More...
 
bool setDblParam (ClpDblParam key, double value)
 Set an double parameter. More...
 
bool setStrParam (ClpStrParam key, const std::string &value)
 Set an string parameter. More...
 
bool getIntParam (ClpIntParam key, int &value) const
 
bool getDblParam (ClpDblParam key, double &value) const
 
bool getStrParam (ClpStrParam key, std::string &value) const
 
void generateCpp (FILE *fp)
 Create C++ lines to get to current state. More...
 
unsigned int specialOptions () const
 For advanced options 1 - Don't keep changing infeasibility weight 2 - Keep nonLinearCost round solves 4 - Force outgoing variables to exact bound (primal) 8 - Safe to use dense initial factorization 16 -Just use basic variables for operation if column generation 32 -Create ray even in BAB 64 -Treat problem as feasible until last minute (i.e. More...
 
void setSpecialOptions (unsigned int value)
 
bool inCbcBranchAndBound () const
 
void loadProblem (const ClpMatrixBase &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 Loads a problem (the constraints on the rows are given by lower and upper bounds). More...
 
void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 
void loadProblem (const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 Just like the other loadProblem() method except that the matrix is given in a standard column major ordered format (without gaps). More...
 
int loadProblem (CoinModel &modelObject, bool tryPlusMinusOne=false)
 This loads a model from a coinModel object - returns number of errors. More...
 
void loadProblem (const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const int *length, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 This one is for after presolve to save memory. More...
 
void loadQuadraticObjective (const int numberColumns, const CoinBigIndex *start, const int *column, const double *element)
 Load up quadratic objective. More...
 
void loadQuadraticObjective (const CoinPackedMatrix &matrix)
 
void deleteQuadraticObjective ()
 Get rid of quadratic objective. More...
 
void setRowObjective (const double *rowObjective)
 This just loads up a row objective. More...
 
int readMps (const char *filename, bool keepNames=false, bool ignoreErrors=false)
 Read an mps file from the given filename. More...
 
int readGMPL (const char *filename, const char *dataName, bool keepNames=false)
 Read GMPL files from the given filenames. More...
 
void copyInIntegerInformation (const char *information)
 Copy in integer informations. More...
 
void deleteIntegerInformation ()
 Drop integer informations. More...
 
void setContinuous (int index)
 Set the index-th variable to be a continuous variable. More...
 
void setInteger (int index)
 Set the index-th variable to be an integer variable. More...
 
bool isInteger (int index) const
 Return true if the index-th variable is an integer variable. More...
 
void resize (int newNumberRows, int newNumberColumns)
 Resizes rim part of model. More...
 
void deleteRows (int number, const int *which)
 Deletes rows. More...
 
void addRow (int numberInRow, const int *columns, const double *elements, double rowLower=-COIN_DBL_MAX, double rowUpper=COIN_DBL_MAX)
 Add one row. More...
 
void addRows (int number, const double *rowLower, const double *rowUpper, const CoinBigIndex *rowStarts, const int *columns, const double *elements)
 Add rows. More...
 
void addRows (int number, const double *rowLower, const double *rowUpper, const CoinBigIndex *rowStarts, const int *rowLengths, const int *columns, const double *elements)
 Add rows. More...
 
void addRows (int number, const double *rowLower, const double *rowUpper, const CoinPackedVectorBase *const *rows)
 
int addRows (const CoinBuild &buildObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
 Add rows from a build object. More...
 
int addRows (CoinModel &modelObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
 Add rows from a model object. More...
 
void deleteColumns (int number, const int *which)
 Deletes columns. More...
 
void deleteRowsAndColumns (int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
 Deletes rows AND columns (keeps old sizes) More...
 
void addColumn (int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objective=0.0)
 Add one column. More...
 
void addColumns (int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinBigIndex *columnStarts, const int *rows, const double *elements)
 Add columns. More...
 
void addColumns (int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinBigIndex *columnStarts, const int *columnLengths, const int *rows, const double *elements)
 
void addColumns (int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinPackedVectorBase *const *columns)
 
int addColumns (const CoinBuild &buildObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
 Add columns from a build object If tryPlusMinusOne then will try adding as +-1 matrix if no matrix exists. More...
 
int addColumns (CoinModel &modelObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
 Add columns from a model object. More...
 
void modifyCoefficient (int row, int column, double newElement, bool keepZero=false)
 Modify one element of a matrix. More...
 
void chgRowLower (const double *rowLower)
 Change row lower bounds. More...
 
void chgRowUpper (const double *rowUpper)
 Change row upper bounds. More...
 
void chgColumnLower (const double *columnLower)
 Change column lower bounds. More...
 
void chgColumnUpper (const double *columnUpper)
 Change column upper bounds. More...
 
void chgObjCoefficients (const double *objIn)
 Change objective coefficients. More...
 
void borrowModel (ClpModel &otherModel)
 Borrow model. More...
 
void returnModel (ClpModel &otherModel)
 Return model - nulls all arrays so can be deleted safely also updates any scalars. More...
 
void createEmptyMatrix ()
 Create empty ClpPackedMatrix. More...
 
CoinBigIndex cleanMatrix (double threshold=1.0e-20)
 Really clean up matrix (if ClpPackedMatrix). More...
 
void copy (const ClpMatrixBase *from, ClpMatrixBase *&to)
 Copy contents - resizing if necessary - otherwise re-use memory. More...
 
void dropNames ()
 Drops names - makes lengthnames 0 and names empty. More...
 
void copyNames (const std::vector< std::string > &rowNames, const std::vector< std::string > &columnNames)
 Copies in names. More...
 
void copyRowNames (const std::vector< std::string > &rowNames, int first, int last)
 Copies in Row names - modifies names first .. last-1. More...
 
void copyColumnNames (const std::vector< std::string > &columnNames, int first, int last)
 Copies in Column names - modifies names first .. last-1. More...
 
void copyRowNames (const char *const *rowNames, int first, int last)
 Copies in Row names - modifies names first .. last-1. More...
 
void copyColumnNames (const char *const *columnNames, int first, int last)
 Copies in Column names - modifies names first .. last-1. More...
 
void setRowName (int rowIndex, std::string &name)
 Set name of row. More...
 
void setColumnName (int colIndex, std::string &name)
 Set name of col. More...
 
int findNetwork (char *rotate, double fractionNeeded=0.75)
 Find a network subset. More...
 
CoinModel * createCoinModel () const
 This creates a coinModel object. More...
 
int writeMps (const char *filename, int formatType=0, int numberAcross=2, double objSense=0.0) const
 Write the problem in MPS format to the specified file. More...
 

Friends

void AbcSimplexUnitTest (const std::string &mpsDir)
 A function that tests the methods in the AbcSimplex class. More...
 

status methods

void swap (int pivotRow, int nonBasicPosition)
 Swaps two variables. More...
 
void setFlagged (int sequence)
 To flag a variable. More...
 
void clearFlagged (int sequence)
 
bool flagged (int sequence) const
 
void createStatus ()
 Set up status array (can be used by OsiAbc). More...
 
void crash (int type)
 Does sort of crash. More...
 
void putStuffInBasis (int type)
 Puts more stuff in basis 1 bit set - do even if basis exists 2 bit set - don't bother staying triangular. More...
 
void allSlackBasis ()
 Sets up all slack basis and resets solution to as it was after initial load or readMps. More...
 
void checkConsistentPivots () const
 For debug - check pivotVariable consistent. More...
 
void printStuff () const
 Print stuff. More...
 
int startup (int ifValuesPass)
 Common bits of coding for dual and primal. More...
 
double rawObjectiveValue () const
 Raw objective value (so always minimize in primal) More...
 
void computeObjectiveValue (bool useWorkingSolution=false)
 Compute objective value from solution and put in objectiveValue_. More...
 
double computeInternalObjectiveValue ()
 Compute minimization objective value from internal solution without perturbation. More...
 
void moveInfo (const AbcSimplex &rhs, bool justStatus=false)
 Move status and solution across. More...
 
void swap (int pivotRow, int nonBasicPosition, Status newStatus)
 Swaps two variables and does status. More...
 
void setFakeBound (int sequence, FakeBound fakeBound)
 
FakeBound getFakeBound (int sequence) const
 
bool atFakeBound (int sequence) const
 
void setPivoted (int sequence)
 
void clearPivoted (int sequence)
 
bool pivoted (int sequence) const
 
void setActive (int iRow)
 To say row active in primal pivot row choice. More...
 
void clearActive (int iRow)
 
bool active (int iRow) const
 

data. Many arrays have a row part and a column part.

There is a single array with both - columns then rows and then normally two arrays pointing to rows and columns.

The single array is the owner of memory

double sumNonBasicCosts_
 Sum of nonbasic costs. More...
 
double rawObjectiveValue_
 Sum of costs (raw objective value) More...
 
double objectiveOffset_
 Objective offset (from offset_) More...
 
double perturbationFactor_
 Perturbation factor If <0.0 then virtual if 0.0 none if >0.0 use this as factor. More...
 
double currentDualTolerance_
 Current dualTolerance (will end up as dualTolerance_) More...
 
double currentDualBound_
 Current dualBound (will end up as dualBound_) More...
 
double largestGap_
 Largest gap. More...
 
double lastDualBound_
 Last dual bound. More...
 
double sumFakeInfeasibilities_
 Sum of infeasibilities when using fake perturbation tolerance. More...
 
double lastPrimalError_
 Last primal error. More...
 
double lastDualError_
 Last dual error. More...
 
double currentAcceptablePivot_
 Acceptable pivot for this iteration. More...
 
double movement_
 Movement of variable. More...
 
double objectiveChange_
 Objective change. More...
 
double btranAlpha_
 Btran alpha. More...
 
double ftAlpha_
 FT alpha. More...
 
double minimumThetaMovement_
 Minimum theta movement. More...
 
double initialSumInfeasibilities_
 Initial sum of infeasibilities. More...
 
int lastFirstFree_
 Last firstFree_. More...
 
int freeSequenceIn_
 Free chosen vector. More...
 
int maximumAbcNumberRows_
 Maximum number rows. More...
 
int maximumAbcNumberColumns_
 Maximum number columns. More...
 
int maximumNumberTotal_
 Maximum numberTotal. More...
 
int numberFlagged_
 Current number of variables flagged. More...
 
int normalDualColumnIteration_
 Iteration at which to do relaxed dualColumn. More...
 
int stateDualColumn_
 State of dual waffle -2 - in initial large tolerance phase -1 - in medium tolerance phase n - in correct tolerance phase and thought optimal n times. More...
 
int numberTotal_
 Number of variables (includes spare rows) More...
 
int numberTotalWithoutFixed_
 Number of variables without fixed to zero (includes spare rows) More...
 
int startAtLowerOther_
 Start of variables at lower bound with upper. More...
 
int startAtUpperNoOther_
 Start of variables at upper bound with no lower. More...
 
int startAtUpperOther_
 Start of variables at upper bound with lower. More...
 
int startOther_
 Start of superBasic, free or awkward bounds variables. More...
 
int startFixed_
 Start of fixed variables. More...
 
int stateOfProblem_
 
int numberOrdinary_
 Number of ordinary (lo/up) in tableau row. More...
 
int ordinaryVariables_
 Set to 1 if no free or super basic. More...
 
int numberFreeNonBasic_
 Number of free nonbasic variables. More...
 
int lastCleaned_
 Last time cleaned up. More...
 
int lastPivotRow_
 Current/last pivot row (set after END of choosing pivot row in dual) More...
 
int swappedAlgorithm_
 Nonzero (probably 10) if swapped algorithms. More...
 
int initialNumberInfeasibilities_
 Initial number of infeasibilities. More...
 
double * scaleFromExternal_
 Points from external to internal. More...
 
double * scaleToExternal_
 Scale from primal internal to external (in external order) Or other way for dual. More...
 
double * columnUseScale_
 use this instead of columnScale More...
 
double * inverseColumnUseScale_
 use this instead of inverseColumnScale More...
 
double * offset_
 Primal offset (in external order) So internal value is (external-offset)*scaleFromExternal. More...
 
double * offsetRhs_
 Offset for accumulated offsets*matrix. More...
 
double * tempArray_
 Useful array of numberTotal length. More...
 
unsigned char * internalStatus_
 Working status ? may be signed ? link pi_ to an indexed array? may have saved from last factorization at end. More...
 
unsigned char * internalStatusSaved_
 Saved status. More...
 
double * abcPerturbation_
 Perturbation (fixed) - is just scaled random numbers If perturbationFactor_<0 then virtual perturbation. More...
 
double * perturbationSaved_
 saved perturbation More...
 
double * perturbationBasic_
 basic perturbation More...
 
AbcMatrixabcMatrix_
 Working matrix. More...
 
double * abcLower_
 Working scaled copy of lower bounds has original scaled copy at end. More...
 
double * abcUpper_
 Working scaled copy of upper bounds has original scaled copy at end. More...
 
double * abcCost_
 Working scaled copy of objective ? where perturbed copy or can we always work with perturbed copy (in B&B) if we adjust increments/cutoffs ? should we save a fixed perturbation offset array has original scaled copy at end. More...
 
double * abcSolution_
 Working scaled primal solution may have saved from last factorization at end. More...
 
double * abcDj_
 Working scaled dual solution may have saved from last factorization at end. More...
 
double * lowerSaved_
 Saved scaled copy of lower bounds. More...
 
double * upperSaved_
 Saved scaled copy of upper bounds. More...
 
double * costSaved_
 Saved scaled copy of objective. More...
 
double * solutionSaved_
 Saved scaled primal solution. More...
 
double * djSaved_
 Saved scaled dual solution. More...
 
double * lowerBasic_
 Working scaled copy of basic lower bounds. More...
 
double * upperBasic_
 Working scaled copy of basic upper bounds. More...
 
double * costBasic_
 Working scaled copy of basic objective. More...
 
double * solutionBasic_
 Working scaled basic primal solution. More...
 
double * djBasic_
 Working scaled basic dual solution (want it to be zero) More...
 
AbcDualRowPivotabcDualRowPivot_
 dual row pivot choice More...
 
AbcPrimalColumnPivotabcPrimalColumnPivot_
 primal column pivot choice More...
 
int * abcPivotVariable_
 Basic variables pivoting on which rows followed by atLo/atUp then free/superbasic then fixed. More...
 
int * reversePivotVariable_
 Reverse abcPivotVariable_ for moving around. More...
 
AbcSimplexFactorizationabcFactorization_
 factorization More...
 
AbcSimplexabcBaseModel_
 Saved version of solution. More...
 
ClpSimplexclpModel_
 A copy of model as ClpSimplex with certain state. More...
 
AbcNonLinearCostabcNonLinearCost_
 Very wasteful way of dealing with infeasibilities in primal. More...
 
CoinPartitionedVector usefulArray_ [ABC_NUMBER_USEFUL]
 
AbcSimplexProgress abcProgress_
 For dealing with all issues of cycling etc. More...
 
ClpDataSave saveData_
 For saving stuff at beginning. More...
 
double upperTheta_
 upper theta from dual column More...
 
int multipleSequenceIn_ [4]
 Multiple sequence in. More...
 
int numberFlipped_
 
int numberDisasters_
 
int stateOfIteration_
 Where we are in iteration. More...
 
int arrayForDualColumn_
 
int arrayForReplaceColumn_
 
int arrayForFlipBounds_
 
int arrayForFlipRhs_
 
int arrayForBtran_
 
int arrayForFtran_
 
int arrayForTableauRow_
 

Additional Inherited Members

- Public Attributes inherited from ClpSimplex
int spareIntArray_ [4]
 Spare int array for passing information [0]!=0 switches on. More...
 
double spareDoubleArray_ [4]
 Spare double array for passing information [0]!=0 switches on. More...
 
- Protected Member Functions inherited from ClpSimplex
int gutsOfSolution (double *givenDuals, const double *givenPrimals, bool valuesPass=false)
 May change basis and then returns number changed. More...
 
void gutsOfDelete (int type)
 Does most of deletion (0 = all, 1 = most, 2 most + factorization) More...
 
void gutsOfCopy (const ClpSimplex &rhs)
 Does most of copying. More...
 
bool createRim (int what, bool makeRowCopy=false, int startFinishOptions=0)
 puts in format I like (rowLower,rowUpper) also see StandardMatrix 1 bit does rows (now and columns), (2 bit does column bounds), 4 bit does objective(s). More...
 
void createRim1 (bool initial)
 Does rows and columns. More...
 
void createRim4 (bool initial)
 Does objective. More...
 
void createRim5 (bool initial)
 Does rows and columns and objective. More...
 
void deleteRim (int getRidOfFactorizationData=2)
 releases above arrays and does solution scaling out. More...
 
bool sanityCheck ()
 Sanity check on input rim data (after scaling) - returns true if okay. More...
 
int housekeeping (double objectiveChange)
 This does basis housekeeping and does values for in/out variables. More...
 
void checkPrimalSolution (const double *rowActivities=NULL, const double *columnActivies=NULL)
 This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Primal) More...
 
void checkDualSolution ()
 This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Dual) More...
 
void checkBothSolutions ()
 This sets sum and number of infeasibilities (Dual and Primal) More...
 
double scaleObjective (double value)
 If input negative scales objective so maximum <= -value and returns scale factor used. More...
 
int solveDW (CoinStructuredModel *model, ClpSolve &options)
 Solve using Dantzig-Wolfe decomposition and maybe in parallel. More...
 
int solveBenders (CoinStructuredModel *model, ClpSolve &options)
 Solve using Benders decomposition and maybe in parallel. More...
 
- Protected Member Functions inherited from ClpModel
void gutsOfDelete (int type)
 Does most of deletion (0 = all, 1 = most) More...
 
void gutsOfCopy (const ClpModel &rhs, int trueCopy=1)
 Does most of copying If trueCopy 0 then just points to arrays If -1 leaves as much as possible. More...
 
void getRowBound (int iRow, double &lower, double &upper) const
 gets lower and upper bounds on rows More...
 
void gutsOfLoadModel (int numberRows, int numberColumns, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 puts in format I like - 4 array matrix - may make row copy More...
 
void gutsOfScaling ()
 Does much of scaling. More...
 
double rawObjectiveValue () const
 Objective value - always minimize. More...
 
bool permanentArrays () const
 If we are using maximumRows_ and Columns_. More...
 
void startPermanentArrays ()
 Start using maximumRows_ and Columns_. More...
 
void stopPermanentArrays ()
 Stop using maximumRows_ and Columns_. More...
 
const char *const * rowNamesAsChar () const
 Create row names as char **. More...
 
const char *const * columnNamesAsChar () const
 Create column names as char **. More...
 
void deleteNamesAsChar (const char *const *names, int number) const
 Delete char * version of names. More...
 
void onStopped ()
 On stopped - sets secondary status. More...
 
- Protected Attributes inherited from ClpSimplex
double bestPossibleImprovement_
 Best possible improvement using djs (primal) or obj change by flipping bounds to make dual feasible (dual) More...
 
double zeroTolerance_
 Zero tolerance. More...
 
int columnPrimalSequence_
 Sequence of worst (-1 if feasible) More...
 
int rowPrimalSequence_
 Sequence of worst (-1 if feasible) More...
 
double bestObjectiveValue_
 "Best" objective value More...
 
int moreSpecialOptions_
 More special options - see set for details. More...
 
int baseIteration_
 Iteration when we entered dual or primal. More...
 
int vectorMode_
 Vector mode - try and use vector instructions. More...
 
double primalToleranceToGetOptimal_
 Primal tolerance needed to make dual feasible (<largeTolerance) More...
 
double largeValue_
 Large bound value (for complementarity etc) More...
 
double largestPrimalError_
 Largest error on Ax-b. More...
 
double largestDualError_
 Largest error on basic duals. More...
 
double alphaAccuracy_
 For computing whether to re-factorize. More...
 
double dualBound_
 Dual bound. More...
 
double alpha_
 Alpha (pivot element) More...
 
double theta_
 Theta (pivot change) More...
 
double lowerIn_
 Lower Bound on In variable. More...
 
double valueIn_
 Value of In variable. More...
 
double upperIn_
 Upper Bound on In variable. More...
 
double dualIn_
 Reduced cost of In variable. More...
 
double lowerOut_
 Lower Bound on Out variable. More...
 
double valueOut_
 Value of Out variable. More...
 
double upperOut_
 Upper Bound on Out variable. More...
 
double dualOut_
 Infeasibility (dual) or ? (primal) of Out variable. More...
 
double dualTolerance_
 Current dual tolerance for algorithm. More...
 
double primalTolerance_
 Current primal tolerance for algorithm. More...
 
double sumDualInfeasibilities_
 Sum of dual infeasibilities. More...
 
double sumPrimalInfeasibilities_
 Sum of primal infeasibilities. More...
 
double infeasibilityCost_
 Weight assigned to being infeasible in primal. More...
 
double sumOfRelaxedDualInfeasibilities_
 Sum of Dual infeasibilities using tolerance based on error in duals. More...
 
double sumOfRelaxedPrimalInfeasibilities_
 Sum of Primal infeasibilities using tolerance based on error in primals. More...
 
double acceptablePivot_
 Acceptable pivot value just after factorization. More...
 
double minimumPrimalTolerance_
 Minimum primal tolerance. More...
 
double averageInfeasibility_ [CLP_INFEAS_SAVE]
 
double * lower_
 Working copy of lower bounds (Owner of arrays below) More...
 
double * rowLowerWork_
 Row lower bounds - working copy. More...
 
double * columnLowerWork_
 Column lower bounds - working copy. More...
 
double * upper_
 Working copy of upper bounds (Owner of arrays below) More...
 
double * rowUpperWork_
 Row upper bounds - working copy. More...
 
double * columnUpperWork_
 Column upper bounds - working copy. More...
 
double * cost_
 Working copy of objective (Owner of arrays below) More...
 
double * rowObjectiveWork_
 Row objective - working copy. More...
 
double * objectiveWork_
 Column objective - working copy. More...
 
CoinIndexedVector * rowArray_ [6]
 Useful row length arrays. More...
 
CoinIndexedVector * columnArray_ [6]
 Useful column length arrays. More...
 
int sequenceIn_
 Sequence of In variable. More...
 
int directionIn_
 Direction of In, 1 going up, -1 going down, 0 not a clue. More...
 
int sequenceOut_
 Sequence of Out variable. More...
 
int directionOut_
 Direction of Out, 1 to upper bound, -1 to lower bound, 0 - superbasic. More...
 
int pivotRow_
 Pivot Row. More...
 
int lastGoodIteration_
 Last good iteration (immediately after a re-factorization) More...
 
double * dj_
 Working copy of reduced costs (Owner of arrays below) More...
 
double * rowReducedCost_
 Reduced costs of slacks not same as duals (or - duals) More...
 
double * reducedCostWork_
 Possible scaled reduced costs. More...
 
double * solution_
 Working copy of primal solution (Owner of arrays below) More...
 
double * rowActivityWork_
 Row activities - working copy. More...
 
double * columnActivityWork_
 Column activities - working copy. More...
 
int numberDualInfeasibilities_
 Number of dual infeasibilities. More...
 
int numberDualInfeasibilitiesWithoutFree_
 Number of dual infeasibilities (without free) More...
 
int numberPrimalInfeasibilities_
 Number of primal infeasibilities. More...
 
int numberRefinements_
 How many iterative refinements to do. More...
 
ClpDualRowPivotdualRowPivot_
 dual row pivot choice More...
 
ClpPrimalColumnPivotprimalColumnPivot_
 primal column pivot choice More...
 
int * pivotVariable_
 Basic variables pivoting on which rows. More...
 
ClpFactorizationfactorization_
 factorization More...
 
double * savedSolution_
 Saved version of solution. More...
 
int numberTimesOptimal_
 Number of times code has tentatively thought optimal. More...
 
ClpDisasterHandlerdisasterArea_
 Disaster handler. More...
 
int changeMade_
 If change has been made (first attempt at stopping looping) More...
 
int algorithm_
 Algorithm >0 == Primal, <0 == Dual. More...
 
int forceFactorization_
 Now for some reliability aids This forces re-factorization early. More...
 
int perturbation_
 Perturbation: -50 to +50 - perturb by this power of ten (-6 sounds good) 100 - auto perturb if takes too long (1.0e-6 largest nonzero) 101 - we are perturbed 102 - don't try perturbing again default is 100. More...
 
unsigned char * saveStatus_
 Saved status regions. More...
 
ClpNonLinearCostnonLinearCost_
 Very wasteful way of dealing with infeasibilities in primal. More...
 
int lastBadIteration_
 So we know when to be cautious. More...
 
int lastFlaggedIteration_
 So we know when to open up again. More...
 
int numberFake_
 Can be used for count of fake bounds (dual) or fake costs (primal) More...
 
int numberChanged_
 Can be used for count of changed costs (dual) or changed bounds (primal) More...
 
int progressFlag_
 Progress flag - at present 0 bit says artificials out, 1 free in. More...
 
int firstFree_
 First free/super-basic variable (-1 if none) More...
 
int numberExtraRows_
 Number of extra rows. More...
 
int maximumBasic_
 Maximum number of basic variables - can be more than number of rows if GUB. More...
 
int dontFactorizePivots_
 If may skip final factorize then allow up to this pivots (default 20) More...
 
double incomingInfeasibility_
 For advanced use. More...
 
double allowedInfeasibility_
 
int automaticScale_
 Automatic scaling of objective and rhs and bounds. More...
 
int maximumPerturbationSize_
 Maximum perturbation array size (take out when code rewritten) More...
 
double * perturbationArray_
 Perturbation array (maximumPerturbationSize_) More...
 
ClpSimplexbaseModel_
 A copy of model with certain state - normally without cuts. More...
 
ClpSimplexProgress progress_
 For dealing with all issues of cycling etc. More...
 
int numberDegeneratePivots_
 Number of degenerate pivots since last perturbed. More...
 
- Protected Attributes inherited from ClpModel
double optimizationDirection_
 Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore. More...
 
double dblParam_ [ClpLastDblParam]
 Array of double parameters. More...
 
double objectiveValue_
 Objective value. More...
 
double smallElement_
 Small element value. More...
 
double objectiveScale_
 Scaling of objective. More...
 
double rhsScale_
 Scaling of rhs and bounds. More...
 
int numberRows_
 Number of rows. More...
 
int numberColumns_
 Number of columns. More...
 
double * rowActivity_
 Row activities. More...
 
double * columnActivity_
 Column activities. More...
 
double * dual_
 Duals. More...
 
double * reducedCost_
 Reduced costs. More...
 
double * rowLower_
 Row lower. More...
 
double * rowUpper_
 Row upper. More...
 
ClpObjectiveobjective_
 Objective. More...
 
double * rowObjective_
 Row Objective (? sign) - may be NULL. More...
 
double * columnLower_
 Column Lower. More...
 
double * columnUpper_
 Column Upper. More...
 
ClpMatrixBasematrix_
 Packed matrix. More...
 
ClpMatrixBaserowCopy_
 Row copy if wanted. More...
 
ClpPackedMatrixscaledMatrix_
 Scaled packed matrix. More...
 
double * ray_
 Infeasible/unbounded ray. More...
 
double * rowScale_
 Row scale factors for matrix. More...
 
double * columnScale_
 Column scale factors. More...
 
double * inverseRowScale_
 Inverse row scale factors for matrix (end of rowScale_) More...
 
double * inverseColumnScale_
 Inverse column scale factors for matrix (end of columnScale_) More...
 
int scalingFlag_
 Scale flag, 0 none, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic, 5 geometric on rows. More...
 
unsigned char * status_
 Status (i.e. More...
 
char * integerType_
 Integer information. More...
 
void * userPointer_
 User pointer for whatever reason. More...
 
ClpTrustedDatatrustedUserPointer_
 Trusted user pointer e.g. for heuristics. More...
 
int intParam_ [ClpLastIntParam]
 Array of integer parameters. More...
 
int numberIterations_
 Number of iterations. More...
 
int solveType_
 Solve type - 1 simplex, 2 simplex interface, 3 Interior. More...
 
unsigned int whatsChanged_
 
int problemStatus_
 Status of problem. More...
 
int secondaryStatus_
 Secondary status of problem. More...
 
int lengthNames_
 length of names (0 means no names) More...
 
int numberThreads_
 Number of threads (not very operational) More...
 
unsigned int specialOptions_
 For advanced options See get and set for meaning. More...
 
CoinMessageHandler * handler_
 Message handler. More...
 
bool defaultHandler_
 Flag to say if default handler (so delete) More...
 
CoinThreadRandom randomNumberGenerator_
 Thread specific random number generator. More...
 
ClpEventHandlereventHandler_
 Event handler. More...
 
std::vector< std::string > rowNames_
 Row names. More...
 
std::vector< std::string > columnNames_
 Column names. More...
 
CoinMessages messages_
 Messages. More...
 
CoinMessages coinMessages_
 Coin messages. More...
 
int maximumColumns_
 Maximum number of columns in model. More...
 
int maximumRows_
 Maximum number of rows in model. More...
 
int maximumInternalColumns_
 Maximum number of columns (internal arrays) in model. More...
 
int maximumInternalRows_
 Maximum number of rows (internal arrays) in model. More...
 
CoinPackedMatrix baseMatrix_
 Base packed matrix. More...
 
CoinPackedMatrix baseRowCopy_
 Base row copy. More...
 
double * savedRowScale_
 Saved row scale factors for matrix. More...
 
double * savedColumnScale_
 Saved column scale factors. More...
 
std::string strParam_ [ClpLastStrParam]
 Array of string parameters. More...
 

Detailed Description

Definition at line 62 of file AbcSimplex.hpp.

Member Enumeration Documentation

◆ Status

enums for status of various sorts.

ClpModel order (and warmstart) is isFree = 0x00, basic = 0x01, atUpperBound = 0x02, atLowerBound = 0x03, isFixed means fixed at lower bound and out of basis

Enumerator
atLowerBound 
atUpperBound 
isFree 
superBasic 
basic 
isFixed 

Definition at line 74 of file AbcSimplex.hpp.

◆ FakeBound

Enumerator
noFake 
lowerFake 
upperFake 
bothFake 

Definition at line 83 of file AbcSimplex.hpp.

Constructor & Destructor Documentation

◆ AbcSimplex() [1/7]

AbcSimplex::AbcSimplex ( bool  emptyMessages = false)

Default constructor.

◆ AbcSimplex() [2/7]

AbcSimplex::AbcSimplex ( const AbcSimplex rhs)

Copy constructor.

◆ AbcSimplex() [3/7]

AbcSimplex::AbcSimplex ( const ClpSimplex rhs)

Copy constructor from model.

◆ AbcSimplex() [4/7]

AbcSimplex::AbcSimplex ( const ClpSimplex wholeModel,
int  numberRows,
const int *  whichRows,
int  numberColumns,
const int *  whichColumns,
bool  dropNames = true,
bool  dropIntegers = true,
bool  fixOthers = false 
)

Subproblem constructor.

A subset of whole model is created from the row and column lists given. The new order is given by list order and duplicates are allowed. Name and integer information can be dropped Can optionally modify rhs to take into account variables NOT in list in this case duplicates are not allowed (also see getbackSolution)

◆ AbcSimplex() [5/7]

AbcSimplex::AbcSimplex ( const AbcSimplex wholeModel,
int  numberRows,
const int *  whichRows,
int  numberColumns,
const int *  whichColumns,
bool  dropNames = true,
bool  dropIntegers = true,
bool  fixOthers = false 
)

Subproblem constructor.

A subset of whole model is created from the row and column lists given. The new order is given by list order and duplicates are allowed. Name and integer information can be dropped Can optionally modify rhs to take into account variables NOT in list in this case duplicates are not allowed (also see getbackSolution)

◆ AbcSimplex() [6/7]

AbcSimplex::AbcSimplex ( AbcSimplex wholeModel,
int  numberColumns,
const int *  whichColumns 
)

This constructor modifies original AbcSimplex and stores original stuff in created AbcSimplex.

It is only to be used in conjunction with originalModel

◆ AbcSimplex() [7/7]

AbcSimplex::AbcSimplex ( const ClpSimplex clpSimplex)

This constructor copies from ClpSimplex.

◆ ~AbcSimplex()

AbcSimplex::~AbcSimplex ( )

Destructor.

Member Function Documentation

◆ originalModel()

void AbcSimplex::originalModel ( AbcSimplex miniModel)

This copies back stuff from miniModel and then deletes miniModel.

Only to be used with mini constructor

◆ putBackSolution()

void AbcSimplex::putBackSolution ( ClpSimplex simplex)

Put back solution into ClpSimplex.

◆ makeBaseModel()

void AbcSimplex::makeBaseModel ( )

Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 but give a bit extra if bigger needed.

Save a copy of model with certain state - normally without cuts

◆ deleteBaseModel()

void AbcSimplex::deleteBaseModel ( )

Switch off base model.

◆ baseModel()

AbcSimplex* AbcSimplex::baseModel ( ) const
inline

See if we have base model.

Definition at line 146 of file AbcSimplex.hpp.

◆ setToBaseModel()

void AbcSimplex::setToBaseModel ( AbcSimplex model = NULL)

Reset to base model (just size and arrays needed) If model NULL use internal copy.

◆ operator=()

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

Assignment operator. This copies the data.

◆ dual()

int AbcSimplex::dual ( )

Dual algorithm - see AbcSimplexDual.hpp for method.

◆ doAbcDual()

int AbcSimplex::doAbcDual ( )

◆ primal()

int AbcSimplex::primal ( int  ifValuesPass)

Primal algorithm - see AbcSimplexPrimal.hpp for method.

◆ doAbcPrimal()

int AbcSimplex::doAbcPrimal ( int  ifValuesPass)

◆ getBasis()

CoinWarmStartBasis* AbcSimplex::getBasis ( ) const

Returns a basis (to be deleted by user)

◆ setFactorization()

void AbcSimplex::setFactorization ( AbcSimplexFactorization factorization)

Passes in factorization.

◆ swapFactorization()

AbcSimplexFactorization* AbcSimplex::swapFactorization ( AbcSimplexFactorization factorization)

Swaps factorization.

◆ getEmptyFactorization()

AbcSimplexFactorization* AbcSimplex::getEmptyFactorization ( )

Gets clean and emptyish factorization.

◆ tightenPrimalBounds()

int AbcSimplex::tightenPrimalBounds ( )

Tightens primal bounds to make dual faster.

Unless fixed or doTight>10, bounds are slightly looser than they could be. This is to make dual go faster and is probably not needed with a presolve. Returns non-zero if problem infeasible.

Fudge for branch and bound - put bounds on columns of factor * largest value (at continuous) - should improve stability in branch and bound on infeasible branches (0.0 is off)

◆ setDualRowPivotAlgorithm()

void AbcSimplex::setDualRowPivotAlgorithm ( AbcDualRowPivot choice)

Sets row pivot choice algorithm in dual.

◆ setPrimalColumnPivotAlgorithm()

void AbcSimplex::setPrimalColumnPivotAlgorithm ( AbcPrimalColumnPivot choice)

Sets column pivot choice algorithm in primal.

◆ defaultFactorizationFrequency()

void AbcSimplex::defaultFactorizationFrequency ( )

If user left factorization frequency then compute.

◆ factorization()

AbcSimplexFactorization* AbcSimplex::factorization ( ) const
inline

factorization

Definition at line 200 of file AbcSimplex.hpp.

◆ factorizationFrequency()

int AbcSimplex::factorizationFrequency ( ) const

Factorization frequency.

◆ setFactorizationFrequency()

void AbcSimplex::setFactorizationFrequency ( int  value)

◆ maximumAbcNumberRows()

int AbcSimplex::maximumAbcNumberRows ( ) const
inline

Maximum rows.

Definition at line 215 of file AbcSimplex.hpp.

◆ maximumNumberTotal()

int AbcSimplex::maximumNumberTotal ( ) const
inline

Maximum Total.

Definition at line 220 of file AbcSimplex.hpp.

◆ maximumTotal()

int AbcSimplex::maximumTotal ( ) const
inline

Definition at line 224 of file AbcSimplex.hpp.

◆ isObjectiveLimitTestValid()

bool AbcSimplex::isObjectiveLimitTestValid ( ) const

Return true if the objective limit test can be relied upon.

◆ numberTotal()

int AbcSimplex::numberTotal ( ) const
inline

Number of variables (includes spare rows)

Definition at line 231 of file AbcSimplex.hpp.

◆ numberTotalWithoutFixed()

int AbcSimplex::numberTotalWithoutFixed ( ) const
inline

Number of variables without fixed to zero (includes spare rows)

Definition at line 236 of file AbcSimplex.hpp.

◆ usefulArray() [1/2]

CoinPartitionedVector* AbcSimplex::usefulArray ( int  index)
inline

Useful arrays (0,1,2,3,4,5,6,7)

Definition at line 241 of file AbcSimplex.hpp.

◆ usefulArray() [2/2]

CoinPartitionedVector* AbcSimplex::usefulArray ( int  index) const
inline

Definition at line 245 of file AbcSimplex.hpp.

◆ getSolution()

int AbcSimplex::getSolution ( )

Given an existing factorization computes and checks primal and dual solutions.

Uses current problem arrays for bounds. Returns feasibility states

◆ setClpSimplexObjectiveValue()

void AbcSimplex::setClpSimplexObjectiveValue ( )

Sets objectiveValue_ from rawObjectiveValue_.

◆ setupDualValuesPass()

void AbcSimplex::setupDualValuesPass ( const double *  fakeDuals,
const double *  fakePrimals,
int  type 
)

Sets dual values pass djs using unscaled duals type 1 - values pass type 2 - just use as infeasibility weights type 3 - as 2 but crash.

◆ minimizationObjectiveValue()

double AbcSimplex::minimizationObjectiveValue ( ) const
inline

Gets objective value with all offsets but as for minimization.

Definition at line 269 of file AbcSimplex.hpp.

◆ currentDualTolerance()

double AbcSimplex::currentDualTolerance ( ) const
inline

Current dualTolerance (will end up as dualTolerance_)

Definition at line 274 of file AbcSimplex.hpp.

◆ setCurrentDualTolerance()

void AbcSimplex::setCurrentDualTolerance ( double  value)
inline

Definition at line 278 of file AbcSimplex.hpp.

◆ abcNonLinearCost()

AbcNonLinearCost* AbcSimplex::abcNonLinearCost ( ) const
inline

Return pointer to details of costs.

Definition at line 283 of file AbcSimplex.hpp.

◆ perturbationSaved()

double* AbcSimplex::perturbationSaved ( ) const
inline

Perturbation (fixed) - is just scaled random numbers.

Definition at line 288 of file AbcSimplex.hpp.

◆ acceptablePivot()

double AbcSimplex::acceptablePivot ( ) const
inline

Acceptable pivot for this iteration.

Definition at line 293 of file AbcSimplex.hpp.

◆ ordinaryVariables()

int AbcSimplex::ordinaryVariables ( ) const
inline

Set to 1 if no free or super basic.

Definition at line 298 of file AbcSimplex.hpp.

◆ numberOrdinary()

int AbcSimplex::numberOrdinary ( ) const
inline

Number of ordinary (lo/up) in tableau row.

Definition at line 303 of file AbcSimplex.hpp.

◆ setNumberOrdinary()

void AbcSimplex::setNumberOrdinary ( int  number)
inline

Set number of ordinary (lo/up) in tableau row.

Definition at line 308 of file AbcSimplex.hpp.

◆ currentDualBound()

double AbcSimplex::currentDualBound ( ) const
inline

Current dualBound (will end up as dualBound_)

Definition at line 313 of file AbcSimplex.hpp.

◆ dualRowPivot()

AbcDualRowPivot* AbcSimplex::dualRowPivot ( ) const
inline

dual row pivot choice

Definition at line 318 of file AbcSimplex.hpp.

◆ primalColumnPivot()

AbcPrimalColumnPivot* AbcSimplex::primalColumnPivot ( ) const
inline

primal column pivot choice

Definition at line 323 of file AbcSimplex.hpp.

◆ abcMatrix()

AbcMatrix* AbcSimplex::abcMatrix ( ) const
inline

Abc Matrix.

Definition at line 328 of file AbcSimplex.hpp.

◆ internalFactorize()

int AbcSimplex::internalFactorize ( int  solveType)

Factorizes using current basis.

solveType - 1 iterating, 0 initial, -1 external If 10 added then in primal values pass Return codes are as from AbcSimplexFactorization unless initial factorization when total number of singularities is returned. Special case is numberRows_+1 -> all slack basis. if initial should be before permute in pivotVariable may be same as toExternal

◆ permuteIn()

void AbcSimplex::permuteIn ( )

Permutes in from ClpModel data - assumes scale factors done and AbcMatrix exists but is in original order (including slacks)

For now just add basicArray at end

But could partition into normal (i.e. reasonable lower/upper) abnormal - free, odd bounds

fixed

sets a valid pivotVariable Slacks always shifted by offset Fixed variables always shifted by offset Recode to allow row objective so can use pi from idiot etc

◆ permuteBasis()

void AbcSimplex::permuteBasis ( )

deals with new basis and puts in abcPivotVariable_

◆ permuteOut()

void AbcSimplex::permuteOut ( int  whatsWanted)

Permutes out - bit settings same as stateOfProblem.

◆ saveData()

ClpDataSave AbcSimplex::saveData ( )

Save data.

◆ restoreData()

void AbcSimplex::restoreData ( ClpDataSave  saved)

Restore data.

◆ cleanStatus()

void AbcSimplex::cleanStatus ( bool  valuesPass = false)

Clean up status - make sure no superbasic etc.

◆ computeDuals()

int AbcSimplex::computeDuals ( double *  givenDjs,
CoinIndexedVector *  array1,
CoinIndexedVector *  array2 
)

Computes duals from scratch.

If givenDjs then allows for nonzero basic djs. Returns number of refinements

◆ computePrimals()

int AbcSimplex::computePrimals ( CoinIndexedVector *  array1,
CoinIndexedVector *  array2 
)

Computes primals from scratch. Returns number of refinements.

◆ computeObjective()

void AbcSimplex::computeObjective ( )

Computes nonbasic cost and total cost.

◆ setMultipleSequenceIn()

void AbcSimplex::setMultipleSequenceIn ( int  sequenceIn[4])

set multiple sequence in

◆ unpack() [1/2]

void AbcSimplex::unpack ( CoinIndexedVector &  rowArray) const
inline

Unpacks one column of the matrix into indexed array Uses sequenceIn_.

Definition at line 381 of file AbcSimplex.hpp.

◆ unpack() [2/2]

void AbcSimplex::unpack ( CoinIndexedVector &  rowArray,
int  sequence 
) const

Unpacks one column of the matrix into indexed array.

◆ housekeeping()

int AbcSimplex::housekeeping ( )

This does basis housekeeping and does values for in/out variables.

Can also decide to re-factorize

◆ checkPrimalSolution()

void AbcSimplex::checkPrimalSolution ( bool  justBasic)

This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Primal)

◆ checkDualSolution()

void AbcSimplex::checkDualSolution ( )

This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Dual)

◆ checkDualSolutionPlusFake()

void AbcSimplex::checkDualSolutionPlusFake ( )

This sets largest infeasibility and most infeasible and sum and number of infeasibilities AND sumFakeInfeasibilites_ (Dual)

◆ checkBothSolutions()

void AbcSimplex::checkBothSolutions ( )

This sets sum and number of infeasibilities (Dual and Primal)

◆ gutsOfSolution() [1/2]

int AbcSimplex::gutsOfSolution ( int  type)

Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements)

◆ gutsOfPrimalSolution()

int AbcSimplex::gutsOfPrimalSolution ( int  type)

Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements)

◆ saveGoodStatus()

void AbcSimplex::saveGoodStatus ( )

Saves good status etc.

◆ restoreGoodStatus()

void AbcSimplex::restoreGoodStatus ( int  type)

Restores previous good status and says trouble.

◆ refreshCosts()

void AbcSimplex::refreshCosts ( )

After modifying first copy refreshes second copy and marks as updated.

◆ refreshLower()

void AbcSimplex::refreshLower ( unsigned int  type = ~(ROW_LOWER_SAME|COLUMN_UPPER_SAME))

◆ refreshUpper()

void AbcSimplex::refreshUpper ( unsigned int  type = ~(ROW_LOWER_SAME|COLUMN_LOWER_SAME))

◆ setupPointers()

void AbcSimplex::setupPointers ( int  maxRows,
int  maxColumns 
)

Sets up all extra pointers.

◆ copyFromSaved()

void AbcSimplex::copyFromSaved ( int  type = 31)

Copies all saved versions to working versions and may do something for perturbation.

◆ fillPerturbation()

void AbcSimplex::fillPerturbation ( int  start,
int  number 
)

fills in perturbationSaved_ from start with 0.5+random

◆ checkArrays()

void AbcSimplex::checkArrays ( int  ignoreEmpty = 0) const

For debug - prints summary of arrays which are out of kilter.

◆ checkDjs()

void AbcSimplex::checkDjs ( int  type = 1) const

For debug - summarizes dj situation (1 recomputes duals first, 2 checks duals as well)

◆ checkSolutionBasic()

void AbcSimplex::checkSolutionBasic ( ) const

For debug - checks solutionBasic.

◆ checkMoveBack()

void AbcSimplex::checkMoveBack ( bool  checkDuals)

For debug - moves solution back to external and computes stuff (always checks djs)

◆ setValuesPassAction()

void AbcSimplex::setValuesPassAction ( double  incomingInfeasibility,
double  allowedInfeasibility 
)

For advanced use.

When doing iterative solves things can get nasty so on values pass if incoming solution has largest infeasibility < incomingInfeasibility throw out variables from basis until largest infeasibility < allowedInfeasibility or incoming largest infeasibility. If allowedInfeasibility>= incomingInfeasibility this is always possible altough you may end up with an all slack basis.

Defaults are 1.0,10.0

◆ cleanFactorization()

int AbcSimplex::cleanFactorization ( int  ifValuesPass)

Get a clean factorization - i.e.

throw out singularities may do more later

◆ moveStatusToClp()

void AbcSimplex::moveStatusToClp ( ClpSimplex clpModel)

Move status and solution to ClpSimplex.

◆ moveStatusFromClp()

void AbcSimplex::moveStatusFromClp ( ClpSimplex clpModel)

Move status and solution from ClpSimplex.

◆ clpObjectiveValue()

double AbcSimplex::clpObjectiveValue ( ) const
inline

Objective value.

Definition at line 459 of file AbcSimplex.hpp.

◆ pivotVariable()

int* AbcSimplex::pivotVariable ( ) const
inline

Basic variables pivoting on which rows may be same as toExternal but may be as at invert.

Definition at line 465 of file AbcSimplex.hpp.

◆ stateOfProblem()

int AbcSimplex::stateOfProblem ( ) const
inline

State of problem.

Definition at line 470 of file AbcSimplex.hpp.

◆ setStateOfProblem()

void AbcSimplex::setStateOfProblem ( int  value)
inline

State of problem.

Definition at line 475 of file AbcSimplex.hpp.

◆ scaleFromExternal()

double* AbcSimplex::scaleFromExternal ( ) const
inline

Points from external to internal.

Points from internal to external Scale from primal external to internal (in external order) Or other way for dual

Definition at line 487 of file AbcSimplex.hpp.

◆ scaleToExternal()

double* AbcSimplex::scaleToExternal ( ) const
inline

Scale from primal internal to external (in external order) Or other way for dual.

Definition at line 493 of file AbcSimplex.hpp.

◆ rowScale2()

double* AbcSimplex::rowScale2 ( ) const
inline

corresponds to rowScale etc

Definition at line 498 of file AbcSimplex.hpp.

◆ inverseRowScale2()

double* AbcSimplex::inverseRowScale2 ( ) const
inline

Definition at line 502 of file AbcSimplex.hpp.

◆ inverseColumnScale2()

double* AbcSimplex::inverseColumnScale2 ( ) const
inline

Definition at line 506 of file AbcSimplex.hpp.

◆ columnScale2()

double* AbcSimplex::columnScale2 ( ) const
inline

Definition at line 510 of file AbcSimplex.hpp.

◆ arrayForDualColumn()

int AbcSimplex::arrayForDualColumn ( ) const
inline

Definition at line 514 of file AbcSimplex.hpp.

◆ upperTheta()

double AbcSimplex::upperTheta ( ) const
inline

upper theta from dual column

Definition at line 519 of file AbcSimplex.hpp.

◆ arrayForReplaceColumn()

int AbcSimplex::arrayForReplaceColumn ( ) const
inline

Definition at line 523 of file AbcSimplex.hpp.

◆ arrayForFlipBounds()

int AbcSimplex::arrayForFlipBounds ( ) const
inline

Definition at line 527 of file AbcSimplex.hpp.

◆ arrayForFlipRhs()

int AbcSimplex::arrayForFlipRhs ( ) const
inline

Definition at line 531 of file AbcSimplex.hpp.

◆ arrayForBtran()

int AbcSimplex::arrayForBtran ( ) const
inline

Definition at line 535 of file AbcSimplex.hpp.

◆ arrayForFtran()

int AbcSimplex::arrayForFtran ( ) const
inline

Definition at line 539 of file AbcSimplex.hpp.

◆ arrayForTableauRow()

int AbcSimplex::arrayForTableauRow ( ) const
inline

Definition at line 543 of file AbcSimplex.hpp.

◆ valueIncomingDual()

double AbcSimplex::valueIncomingDual ( ) const

value of incoming variable (in Dual)

◆ getColSolution()

const double* AbcSimplex::getColSolution ( ) const

Get pointer to array[getNumCols()] of primal solution vector.

◆ getRowPrice()

const double* AbcSimplex::getRowPrice ( ) const

Get pointer to array[getNumRows()] of dual prices.

◆ getReducedCost()

const double* AbcSimplex::getReducedCost ( ) const

Get a pointer to array[getNumCols()] of reduced costs.

◆ getRowActivity()

const double* AbcSimplex::getRowActivity ( ) const

Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector.

◆ gutsOfSolution() [2/2]

int AbcSimplex::gutsOfSolution ( double *  givenDuals,
const double *  givenPrimals,
bool  valuesPass = false 
)

May change basis and then returns number changed.

Computation of solutions may be overriden by given pi and solution

◆ gutsOfDelete()

void AbcSimplex::gutsOfDelete ( int  type)

Does most of deletion for arrays etc(0 just null arrays, 1 delete first)

◆ gutsOfCopy()

void AbcSimplex::gutsOfCopy ( const AbcSimplex rhs)

Does most of copying.

◆ gutsOfInitialize()

void AbcSimplex::gutsOfInitialize ( int  numberRows,
int  numberColumns,
bool  doMore 
)

Initializes arrays.

◆ gutsOfResize()

void AbcSimplex::gutsOfResize ( int  numberRows,
int  numberColumns 
)

resizes arrays

◆ translate()

void AbcSimplex::translate ( int  type)

Translates ClpModel to AbcSimplex See DO_ bits in stateOfProblem_ for type e.g.

DO_BASIS_AND_ORDER

◆ moveToBasic()

void AbcSimplex::moveToBasic ( int  which = 15)

Moves basic stuff to basic area.

◆ solutionRegion() [1/2]

double* AbcSimplex::solutionRegion ( ) const
inline

Return region.

Definition at line 590 of file AbcSimplex.hpp.

◆ djRegion() [1/2]

double* AbcSimplex::djRegion ( ) const
inline

Definition at line 594 of file AbcSimplex.hpp.

◆ lowerRegion() [1/2]

double* AbcSimplex::lowerRegion ( ) const
inline

Definition at line 598 of file AbcSimplex.hpp.

◆ upperRegion() [1/2]

double* AbcSimplex::upperRegion ( ) const
inline

Definition at line 602 of file AbcSimplex.hpp.

◆ costRegion() [1/2]

double* AbcSimplex::costRegion ( ) const
inline

Definition at line 606 of file AbcSimplex.hpp.

◆ solutionRegion() [2/2]

double* AbcSimplex::solutionRegion ( int  which) const
inline

Return region.

Definition at line 611 of file AbcSimplex.hpp.

◆ djRegion() [2/2]

double* AbcSimplex::djRegion ( int  which) const
inline

Definition at line 615 of file AbcSimplex.hpp.

◆ lowerRegion() [2/2]

double* AbcSimplex::lowerRegion ( int  which) const
inline

Definition at line 619 of file AbcSimplex.hpp.

◆ upperRegion() [2/2]

double* AbcSimplex::upperRegion ( int  which) const
inline

Definition at line 623 of file AbcSimplex.hpp.

◆ costRegion() [2/2]

double* AbcSimplex::costRegion ( int  which) const
inline

Definition at line 627 of file AbcSimplex.hpp.

◆ solutionBasic()

double* AbcSimplex::solutionBasic ( ) const
inline

Return region.

Definition at line 632 of file AbcSimplex.hpp.

◆ djBasic()

double* AbcSimplex::djBasic ( ) const
inline

Definition at line 636 of file AbcSimplex.hpp.

◆ lowerBasic()

double* AbcSimplex::lowerBasic ( ) const
inline

Definition at line 640 of file AbcSimplex.hpp.

◆ upperBasic()

double* AbcSimplex::upperBasic ( ) const
inline

Definition at line 644 of file AbcSimplex.hpp.

◆ costBasic()

double* AbcSimplex::costBasic ( ) const
inline

Definition at line 648 of file AbcSimplex.hpp.

◆ abcPerturbation()

double* AbcSimplex::abcPerturbation ( ) const
inline

Perturbation.

Definition at line 653 of file AbcSimplex.hpp.

◆ fakeDjs()

double* AbcSimplex::fakeDjs ( ) const
inline

Fake djs.

Definition at line 658 of file AbcSimplex.hpp.

◆ internalStatus()

unsigned char* AbcSimplex::internalStatus ( ) const
inline

Definition at line 662 of file AbcSimplex.hpp.

◆ getInternalStatus()

AbcSimplex::Status AbcSimplex::getInternalStatus ( int  sequence) const
inline

Definition at line 666 of file AbcSimplex.hpp.

◆ getInternalColumnStatus()

AbcSimplex::Status AbcSimplex::getInternalColumnStatus ( int  sequence) const
inline

Definition at line 670 of file AbcSimplex.hpp.

◆ setInternalStatus()

void AbcSimplex::setInternalStatus ( int  sequence,
AbcSimplex::Status  newstatus 
)
inline

Definition at line 674 of file AbcSimplex.hpp.

◆ setInternalColumnStatus()

void AbcSimplex::setInternalColumnStatus ( int  sequence,
AbcSimplex::Status  newstatus 
)
inline

Definition at line 680 of file AbcSimplex.hpp.

◆ setInitialDenseFactorization()

void AbcSimplex::setInitialDenseFactorization ( bool  onOff)

Normally the first factorization does sparse coding because the factorization could be singular.

This allows initial dense factorization when it is known to be safe

◆ initialDenseFactorization()

bool AbcSimplex::initialDenseFactorization ( ) const

◆ sequenceIn()

int AbcSimplex::sequenceIn ( ) const
inline

Return sequence In or Out.

Definition at line 693 of file AbcSimplex.hpp.

◆ sequenceOut()

int AbcSimplex::sequenceOut ( ) const
inline

Definition at line 697 of file AbcSimplex.hpp.

◆ setSequenceIn()

void AbcSimplex::setSequenceIn ( int  sequence)
inline

Set sequenceIn or Out.

Definition at line 702 of file AbcSimplex.hpp.

◆ setSequenceOut()

void AbcSimplex::setSequenceOut ( int  sequence)
inline

Definition at line 706 of file AbcSimplex.hpp.

◆ isColumn()

int AbcSimplex::isColumn ( int  sequence) const
inline

Returns 1 if sequence indicates column.

Definition at line 727 of file AbcSimplex.hpp.

◆ sequenceWithin()

int AbcSimplex::sequenceWithin ( int  sequence) const
inline

Returns sequence number within section.

Definition at line 732 of file AbcSimplex.hpp.

◆ lastPivotRow()

int AbcSimplex::lastPivotRow ( ) const
inline

Current/last pivot row (set after END of choosing pivot row in dual)

Definition at line 737 of file AbcSimplex.hpp.

◆ firstFree()

int AbcSimplex::firstFree ( ) const
inline

First Free_.

Definition at line 742 of file AbcSimplex.hpp.

◆ lastFirstFree()

int AbcSimplex::lastFirstFree ( ) const
inline

Last firstFree_.

Definition at line 747 of file AbcSimplex.hpp.

◆ freeSequenceIn()

int AbcSimplex::freeSequenceIn ( ) const
inline

Free chosen vector.

Definition at line 752 of file AbcSimplex.hpp.

◆ currentAcceptablePivot()

double AbcSimplex::currentAcceptablePivot ( ) const
inline

Acceptable pivot for this iteration.

Definition at line 757 of file AbcSimplex.hpp.

◆ fakeSuperBasic()

int AbcSimplex::fakeSuperBasic ( int  iSequence)
inline

Returns 1 if fake superbasic 0 if free or true superbasic -1 if was fake but has cleaned itself up (sets status) -2 if wasn't fake.

Definition at line 768 of file AbcSimplex.hpp.

◆ solution()

double AbcSimplex::solution ( int  sequence)
inline

Return row or column values.

Definition at line 801 of file AbcSimplex.hpp.

◆ solutionAddress()

double& AbcSimplex::solutionAddress ( int  sequence)
inline

Return address of row or column values.

Definition at line 806 of file AbcSimplex.hpp.

◆ reducedCost()

double AbcSimplex::reducedCost ( int  sequence)
inline

Definition at line 810 of file AbcSimplex.hpp.

◆ reducedCostAddress()

double& AbcSimplex::reducedCostAddress ( int  sequence)
inline

Definition at line 814 of file AbcSimplex.hpp.

◆ lower()

double AbcSimplex::lower ( int  sequence)
inline

Definition at line 818 of file AbcSimplex.hpp.

◆ lowerAddress()

double& AbcSimplex::lowerAddress ( int  sequence)
inline

Return address of row or column lower bound.

Definition at line 823 of file AbcSimplex.hpp.

◆ upper()

double AbcSimplex::upper ( int  sequence)
inline

Definition at line 827 of file AbcSimplex.hpp.

◆ upperAddress()

double& AbcSimplex::upperAddress ( int  sequence)
inline

Return address of row or column upper bound.

Definition at line 832 of file AbcSimplex.hpp.

◆ cost()

double AbcSimplex::cost ( int  sequence)
inline

Definition at line 836 of file AbcSimplex.hpp.

◆ costAddress()

double& AbcSimplex::costAddress ( int  sequence)
inline

Return address of row or column cost.

Definition at line 841 of file AbcSimplex.hpp.

◆ originalLower()

double AbcSimplex::originalLower ( int  iSequence) const
inline

Return original lower bound.

Definition at line 846 of file AbcSimplex.hpp.

◆ originalUpper()

double AbcSimplex::originalUpper ( int  iSequence) const
inline

Return original lower bound.

Definition at line 854 of file AbcSimplex.hpp.

◆ abcProgress()

AbcSimplexProgress* AbcSimplex::abcProgress ( )
inline

For dealing with all issues of cycling etc.

Definition at line 862 of file AbcSimplex.hpp.

◆ clearArraysPublic()

void AbcSimplex::clearArraysPublic ( int  which)
inline

Clears an array and says available (-1 does all) when no possibility of going parallel.

Definition at line 875 of file AbcSimplex.hpp.

◆ getAvailableArrayPublic()

int AbcSimplex::getAvailableArrayPublic ( ) const
inline

Returns first available empty array (and sets flag) when no possibility of going parallel.

Definition at line 881 of file AbcSimplex.hpp.

◆ clearArrays() [1/2]

void AbcSimplex::clearArrays ( int  which)

Clears an array and says available (-1 does all)

◆ clearArrays() [2/2]

void AbcSimplex::clearArrays ( CoinPartitionedVector *  which)

Clears an array and says available.

◆ getAvailableArray()

int AbcSimplex::getAvailableArray ( ) const

Returns first available empty array (and sets flag)

◆ setUsedArray()

void AbcSimplex::setUsedArray ( int  which) const
inline

Say array going to be used.

Definition at line 917 of file AbcSimplex.hpp.

◆ setAvailableArray()

void AbcSimplex::setAvailableArray ( int  which) const
inline

Say array going available.

Definition at line 924 of file AbcSimplex.hpp.

◆ swapPrimalStuff()

void AbcSimplex::swapPrimalStuff ( )

Swaps primal stuff.

◆ swapDualStuff()

void AbcSimplex::swapDualStuff ( int  lastSequenceOut,
int  lastDirectionOut 
)

Swaps dual stuff.

◆ swap() [1/2]

void AbcSimplex::swap ( int  pivotRow,
int  nonBasicPosition,
Status  newStatus 
)
protected

Swaps two variables and does status.

◆ setFakeBound()

void AbcSimplex::setFakeBound ( int  sequence,
FakeBound  fakeBound 
)
inlineprotected

Definition at line 942 of file AbcSimplex.hpp.

◆ getFakeBound()

FakeBound AbcSimplex::getFakeBound ( int  sequence) const
inlineprotected

Definition at line 948 of file AbcSimplex.hpp.

◆ atFakeBound()

bool AbcSimplex::atFakeBound ( int  sequence) const
protected

◆ setPivoted()

void AbcSimplex::setPivoted ( int  sequence)
inlineprotected

Definition at line 953 of file AbcSimplex.hpp.

◆ clearPivoted()

void AbcSimplex::clearPivoted ( int  sequence)
inlineprotected

Definition at line 957 of file AbcSimplex.hpp.

◆ pivoted()

bool AbcSimplex::pivoted ( int  sequence) const
inlineprotected

Definition at line 961 of file AbcSimplex.hpp.

◆ swap() [2/2]

void AbcSimplex::swap ( int  pivotRow,
int  nonBasicPosition 
)

Swaps two variables.

◆ setFlagged()

void AbcSimplex::setFlagged ( int  sequence)

To flag a variable.

◆ clearFlagged()

void AbcSimplex::clearFlagged ( int  sequence)
inline

Definition at line 971 of file AbcSimplex.hpp.

◆ flagged()

bool AbcSimplex::flagged ( int  sequence) const
inline

Definition at line 975 of file AbcSimplex.hpp.

◆ setActive()

void AbcSimplex::setActive ( int  iRow)
inlineprotected

To say row active in primal pivot row choice.

Definition at line 982 of file AbcSimplex.hpp.

◆ clearActive()

void AbcSimplex::clearActive ( int  iRow)
inlineprotected

Definition at line 986 of file AbcSimplex.hpp.

◆ active()

bool AbcSimplex::active ( int  iRow) const
inlineprotected

Definition at line 990 of file AbcSimplex.hpp.

◆ createStatus()

void AbcSimplex::createStatus ( )

Set up status array (can be used by OsiAbc).

Also can be used to set up all slack basis

◆ crash()

void AbcSimplex::crash ( int  type)

Does sort of crash.

◆ putStuffInBasis()

void AbcSimplex::putStuffInBasis ( int  type)

Puts more stuff in basis 1 bit set - do even if basis exists 2 bit set - don't bother staying triangular.

◆ allSlackBasis()

void AbcSimplex::allSlackBasis ( )

Sets up all slack basis and resets solution to as it was after initial load or readMps.

◆ checkConsistentPivots()

void AbcSimplex::checkConsistentPivots ( ) const

For debug - check pivotVariable consistent.

◆ printStuff()

void AbcSimplex::printStuff ( ) const

Print stuff.

◆ startup()

int AbcSimplex::startup ( int  ifValuesPass)

Common bits of coding for dual and primal.

◆ rawObjectiveValue()

double AbcSimplex::rawObjectiveValue ( ) const
inline

Raw objective value (so always minimize in primal)

Definition at line 1017 of file AbcSimplex.hpp.

◆ computeObjectiveValue()

void AbcSimplex::computeObjectiveValue ( bool  useWorkingSolution = false)

Compute objective value from solution and put in objectiveValue_.

◆ computeInternalObjectiveValue()

double AbcSimplex::computeInternalObjectiveValue ( )

Compute minimization objective value from internal solution without perturbation.

◆ moveInfo()

void AbcSimplex::moveInfo ( const AbcSimplex rhs,
bool  justStatus = false 
)

Move status and solution across.

◆ setObjectiveCoefficient()

void AbcSimplex::setObjectiveCoefficient ( int  elementIndex,
double  elementValue 
)

Set an objective function coefficient.

◆ setObjCoeff()

void AbcSimplex::setObjCoeff ( int  elementIndex,
double  elementValue 
)
inline

Set an objective function coefficient.

Definition at line 1064 of file AbcSimplex.hpp.

◆ setColumnLower()

void AbcSimplex::setColumnLower ( int  elementIndex,
double  elementValue 
)

Set a single column lower bound
Use -DBL_MAX for -infinity.

◆ setColumnUpper()

void AbcSimplex::setColumnUpper ( int  elementIndex,
double  elementValue 
)

Set a single column upper bound
Use DBL_MAX for infinity.

◆ setColumnBounds()

void AbcSimplex::setColumnBounds ( int  elementIndex,
double  lower,
double  upper 
)

Set a single column lower and upper bound.

◆ setColumnSetBounds()

void AbcSimplex::setColumnSetBounds ( const int *  indexFirst,
const int *  indexLast,
const double *  boundList 
)

Set the bounds on a number of columns simultaneously
The default implementation just invokes setColLower() and setColUpper() over and over again.

Parameters
indexFirst,indexLastpointers to the beginning and after the end of the array of the indices of the variables whose either bound changes
boundListthe new lower/upper bound pairs for the variables

◆ setColLower()

void AbcSimplex::setColLower ( int  elementIndex,
double  elementValue 
)
inline

Set a single column lower bound
Use -DBL_MAX for -infinity.

Definition at line 1095 of file AbcSimplex.hpp.

◆ setColUpper()

void AbcSimplex::setColUpper ( int  elementIndex,
double  elementValue 
)
inline

Set a single column upper bound
Use DBL_MAX for infinity.

Definition at line 1101 of file AbcSimplex.hpp.

◆ setColBounds()

void AbcSimplex::setColBounds ( int  elementIndex,
double  newlower,
double  newupper 
)
inline

Set a single column lower and upper bound.

Definition at line 1107 of file AbcSimplex.hpp.

◆ setColSetBounds()

void AbcSimplex::setColSetBounds ( const int *  indexFirst,
const int *  indexLast,
const double *  boundList 
)
inline

Set the bounds on a number of columns simultaneously

Parameters
indexFirst,indexLastpointers to the beginning and after the end of the array of the indices of the variables whose either bound changes
boundListthe new lower/upper bound pairs for the variables

Definition at line 1119 of file AbcSimplex.hpp.

◆ setRowLower()

void AbcSimplex::setRowLower ( int  elementIndex,
double  elementValue 
)

Set a single row lower bound
Use -DBL_MAX for -infinity.

◆ setRowUpper()

void AbcSimplex::setRowUpper ( int  elementIndex,
double  elementValue 
)

Set a single row upper bound
Use DBL_MAX for infinity.

◆ setRowBounds()

void AbcSimplex::setRowBounds ( int  elementIndex,
double  lower,
double  upper 
)

Set a single row lower and upper bound.

◆ setRowSetBounds()

void AbcSimplex::setRowSetBounds ( const int *  indexFirst,
const int *  indexLast,
const double *  boundList 
)

Set the bounds on a number of rows simultaneously

Parameters
indexFirst,indexLastpointers to the beginning and after the end of the array of the indices of the constraints whose either bound changes
boundListthe new lower/upper bound pairs for the constraints

◆ resize()

void AbcSimplex::resize ( int  newNumberRows,
int  newNumberColumns 
)

Resizes rim part of model.

Friends And Related Function Documentation

◆ AbcSimplexUnitTest

void AbcSimplexUnitTest ( const std::string &  mpsDir)
friend

A function that tests the methods in the AbcSimplex class.

The only reason for it not to be a member method is that this way it doesn't have to be compiled into the library. And that's a gain, because the library should be compiled with optimization on, but this method should be compiled with debugging.

It also does some testing of AbcSimplexFactorization class

Member Data Documentation

◆ sumNonBasicCosts_

double AbcSimplex::sumNonBasicCosts_
protected

Sum of nonbasic costs.

Definition at line 1161 of file AbcSimplex.hpp.

◆ rawObjectiveValue_

double AbcSimplex::rawObjectiveValue_
protected

Sum of costs (raw objective value)

Definition at line 1163 of file AbcSimplex.hpp.

◆ objectiveOffset_

double AbcSimplex::objectiveOffset_
protected

Objective offset (from offset_)

Definition at line 1165 of file AbcSimplex.hpp.

◆ perturbationFactor_

double AbcSimplex::perturbationFactor_
protected

Perturbation factor If <0.0 then virtual if 0.0 none if >0.0 use this as factor.

Definition at line 1170 of file AbcSimplex.hpp.

◆ currentDualTolerance_

double AbcSimplex::currentDualTolerance_
protected

Current dualTolerance (will end up as dualTolerance_)

Definition at line 1172 of file AbcSimplex.hpp.

◆ currentDualBound_

double AbcSimplex::currentDualBound_
protected

Current dualBound (will end up as dualBound_)

Definition at line 1174 of file AbcSimplex.hpp.

◆ largestGap_

double AbcSimplex::largestGap_
protected

Largest gap.

Definition at line 1176 of file AbcSimplex.hpp.

◆ lastDualBound_

double AbcSimplex::lastDualBound_
protected

Last dual bound.

Definition at line 1178 of file AbcSimplex.hpp.

◆ sumFakeInfeasibilities_

double AbcSimplex::sumFakeInfeasibilities_
protected

Sum of infeasibilities when using fake perturbation tolerance.

Definition at line 1180 of file AbcSimplex.hpp.

◆ lastPrimalError_

double AbcSimplex::lastPrimalError_
protected

Last primal error.

Definition at line 1182 of file AbcSimplex.hpp.

◆ lastDualError_

double AbcSimplex::lastDualError_
protected

Last dual error.

Definition at line 1184 of file AbcSimplex.hpp.

◆ currentAcceptablePivot_

double AbcSimplex::currentAcceptablePivot_
protected

Acceptable pivot for this iteration.

Definition at line 1186 of file AbcSimplex.hpp.

◆ movement_

double AbcSimplex::movement_
protected

Movement of variable.

Definition at line 1188 of file AbcSimplex.hpp.

◆ objectiveChange_

double AbcSimplex::objectiveChange_
protected

Objective change.

Definition at line 1190 of file AbcSimplex.hpp.

◆ btranAlpha_

double AbcSimplex::btranAlpha_
protected

Btran alpha.

Definition at line 1192 of file AbcSimplex.hpp.

◆ ftAlpha_

double AbcSimplex::ftAlpha_
protected

FT alpha.

Definition at line 1197 of file AbcSimplex.hpp.

◆ minimumThetaMovement_

double AbcSimplex::minimumThetaMovement_
protected

Minimum theta movement.

Definition at line 1199 of file AbcSimplex.hpp.

◆ initialSumInfeasibilities_

double AbcSimplex::initialSumInfeasibilities_
protected

Initial sum of infeasibilities.

Definition at line 1201 of file AbcSimplex.hpp.

◆ stateOfIteration_

int AbcSimplex::stateOfIteration_

Where we are in iteration.

Definition at line 1205 of file AbcSimplex.hpp.

◆ lastFirstFree_

int AbcSimplex::lastFirstFree_
protected

Last firstFree_.

Definition at line 1209 of file AbcSimplex.hpp.

◆ freeSequenceIn_

int AbcSimplex::freeSequenceIn_
protected

Free chosen vector.

Definition at line 1211 of file AbcSimplex.hpp.

◆ maximumAbcNumberRows_

int AbcSimplex::maximumAbcNumberRows_
protected

Maximum number rows.

Definition at line 1213 of file AbcSimplex.hpp.

◆ maximumAbcNumberColumns_

int AbcSimplex::maximumAbcNumberColumns_
protected

Maximum number columns.

Definition at line 1215 of file AbcSimplex.hpp.

◆ maximumNumberTotal_

int AbcSimplex::maximumNumberTotal_
protected

Maximum numberTotal.

Definition at line 1217 of file AbcSimplex.hpp.

◆ numberFlagged_

int AbcSimplex::numberFlagged_
protected

Current number of variables flagged.

Definition at line 1219 of file AbcSimplex.hpp.

◆ normalDualColumnIteration_

int AbcSimplex::normalDualColumnIteration_
protected

Iteration at which to do relaxed dualColumn.

Definition at line 1221 of file AbcSimplex.hpp.

◆ stateDualColumn_

int AbcSimplex::stateDualColumn_
protected

State of dual waffle -2 - in initial large tolerance phase -1 - in medium tolerance phase n - in correct tolerance phase and thought optimal n times.

Definition at line 1227 of file AbcSimplex.hpp.

◆ numberTotal_

int AbcSimplex::numberTotal_
protected

Number of variables (includes spare rows)

Definition at line 1234 of file AbcSimplex.hpp.

◆ numberTotalWithoutFixed_

int AbcSimplex::numberTotalWithoutFixed_
protected

Number of variables without fixed to zero (includes spare rows)

Definition at line 1236 of file AbcSimplex.hpp.

◆ startAtLowerOther_

int AbcSimplex::startAtLowerOther_
protected

Start of variables at lower bound with upper.

Definition at line 1240 of file AbcSimplex.hpp.

◆ startAtUpperNoOther_

int AbcSimplex::startAtUpperNoOther_
protected

Start of variables at upper bound with no lower.

Definition at line 1242 of file AbcSimplex.hpp.

◆ startAtUpperOther_

int AbcSimplex::startAtUpperOther_
protected

Start of variables at upper bound with lower.

Definition at line 1244 of file AbcSimplex.hpp.

◆ startOther_

int AbcSimplex::startOther_
protected

Start of superBasic, free or awkward bounds variables.

Definition at line 1246 of file AbcSimplex.hpp.

◆ startFixed_

int AbcSimplex::startFixed_
protected

Start of fixed variables.

Definition at line 1248 of file AbcSimplex.hpp.

◆ stateOfProblem_

int AbcSimplex::stateOfProblem_
mutableprotected

Definition at line 1286 of file AbcSimplex.hpp.

◆ numberOrdinary_

int AbcSimplex::numberOrdinary_
protected

Number of ordinary (lo/up) in tableau row.

Definition at line 1295 of file AbcSimplex.hpp.

◆ ordinaryVariables_

int AbcSimplex::ordinaryVariables_
protected

Set to 1 if no free or super basic.

Definition at line 1297 of file AbcSimplex.hpp.

◆ numberFreeNonBasic_

int AbcSimplex::numberFreeNonBasic_
protected

Number of free nonbasic variables.

Definition at line 1299 of file AbcSimplex.hpp.

◆ lastCleaned_

int AbcSimplex::lastCleaned_
protected

Last time cleaned up.

Definition at line 1301 of file AbcSimplex.hpp.

◆ lastPivotRow_

int AbcSimplex::lastPivotRow_
protected

Current/last pivot row (set after END of choosing pivot row in dual)

Definition at line 1303 of file AbcSimplex.hpp.

◆ swappedAlgorithm_

int AbcSimplex::swappedAlgorithm_
protected

Nonzero (probably 10) if swapped algorithms.

Definition at line 1305 of file AbcSimplex.hpp.

◆ initialNumberInfeasibilities_

int AbcSimplex::initialNumberInfeasibilities_
protected

Initial number of infeasibilities.

Definition at line 1307 of file AbcSimplex.hpp.

◆ scaleFromExternal_

double* AbcSimplex::scaleFromExternal_
protected

Points from external to internal.

Points from internal to external Scale from primal external to internal (in external order) Or other way for dual

Definition at line 1314 of file AbcSimplex.hpp.

◆ scaleToExternal_

double* AbcSimplex::scaleToExternal_
protected

Scale from primal internal to external (in external order) Or other way for dual.

Definition at line 1317 of file AbcSimplex.hpp.

◆ columnUseScale_

double* AbcSimplex::columnUseScale_
protected

use this instead of columnScale

Definition at line 1319 of file AbcSimplex.hpp.

◆ inverseColumnUseScale_

double* AbcSimplex::inverseColumnUseScale_
protected

use this instead of inverseColumnScale

Definition at line 1321 of file AbcSimplex.hpp.

◆ offset_

double* AbcSimplex::offset_
protected

Primal offset (in external order) So internal value is (external-offset)*scaleFromExternal.

Definition at line 1325 of file AbcSimplex.hpp.

◆ offsetRhs_

double* AbcSimplex::offsetRhs_
protected

Offset for accumulated offsets*matrix.

Definition at line 1327 of file AbcSimplex.hpp.

◆ tempArray_

double* AbcSimplex::tempArray_
protected

Useful array of numberTotal length.

Definition at line 1329 of file AbcSimplex.hpp.

◆ internalStatus_

unsigned char* AbcSimplex::internalStatus_
protected

Working status ? may be signed ? link pi_ to an indexed array? may have saved from last factorization at end.

Definition at line 1334 of file AbcSimplex.hpp.

◆ internalStatusSaved_

unsigned char* AbcSimplex::internalStatusSaved_
protected

Saved status.

Definition at line 1336 of file AbcSimplex.hpp.

◆ abcPerturbation_

double* AbcSimplex::abcPerturbation_
protected

Perturbation (fixed) - is just scaled random numbers If perturbationFactor_<0 then virtual perturbation.

Definition at line 1339 of file AbcSimplex.hpp.

◆ perturbationSaved_

double* AbcSimplex::perturbationSaved_
protected

saved perturbation

Definition at line 1341 of file AbcSimplex.hpp.

◆ perturbationBasic_

double* AbcSimplex::perturbationBasic_
protected

basic perturbation

Definition at line 1343 of file AbcSimplex.hpp.

◆ abcMatrix_

AbcMatrix* AbcSimplex::abcMatrix_
protected

Working matrix.

Definition at line 1345 of file AbcSimplex.hpp.

◆ abcLower_

double* AbcSimplex::abcLower_
protected

Working scaled copy of lower bounds has original scaled copy at end.

Definition at line 1348 of file AbcSimplex.hpp.

◆ abcUpper_

double* AbcSimplex::abcUpper_
protected

Working scaled copy of upper bounds has original scaled copy at end.

Definition at line 1351 of file AbcSimplex.hpp.

◆ abcCost_

double* AbcSimplex::abcCost_
protected

Working scaled copy of objective ? where perturbed copy or can we always work with perturbed copy (in B&B) if we adjust increments/cutoffs ? should we save a fixed perturbation offset array has original scaled copy at end.

Definition at line 1357 of file AbcSimplex.hpp.

◆ abcSolution_

double* AbcSimplex::abcSolution_
protected

Working scaled primal solution may have saved from last factorization at end.

Definition at line 1360 of file AbcSimplex.hpp.

◆ abcDj_

double* AbcSimplex::abcDj_
protected

Working scaled dual solution may have saved from last factorization at end.

Definition at line 1363 of file AbcSimplex.hpp.

◆ lowerSaved_

double* AbcSimplex::lowerSaved_
protected

Saved scaled copy of lower bounds.

Definition at line 1365 of file AbcSimplex.hpp.

◆ upperSaved_

double* AbcSimplex::upperSaved_
protected

Saved scaled copy of upper bounds.

Definition at line 1367 of file AbcSimplex.hpp.

◆ costSaved_

double* AbcSimplex::costSaved_
protected

Saved scaled copy of objective.

Definition at line 1369 of file AbcSimplex.hpp.

◆ solutionSaved_

double* AbcSimplex::solutionSaved_
protected

Saved scaled primal solution.

Definition at line 1371 of file AbcSimplex.hpp.

◆ djSaved_

double* AbcSimplex::djSaved_
protected

Saved scaled dual solution.

Definition at line 1373 of file AbcSimplex.hpp.

◆ lowerBasic_

double* AbcSimplex::lowerBasic_
protected

Working scaled copy of basic lower bounds.

Definition at line 1375 of file AbcSimplex.hpp.

◆ upperBasic_

double* AbcSimplex::upperBasic_
protected

Working scaled copy of basic upper bounds.

Definition at line 1377 of file AbcSimplex.hpp.

◆ costBasic_

double* AbcSimplex::costBasic_
protected

Working scaled copy of basic objective.

Definition at line 1379 of file AbcSimplex.hpp.

◆ solutionBasic_

double* AbcSimplex::solutionBasic_
protected

Working scaled basic primal solution.

Definition at line 1381 of file AbcSimplex.hpp.

◆ djBasic_

double* AbcSimplex::djBasic_
protected

Working scaled basic dual solution (want it to be zero)

Definition at line 1383 of file AbcSimplex.hpp.

◆ abcDualRowPivot_

AbcDualRowPivot* AbcSimplex::abcDualRowPivot_
protected

dual row pivot choice

Definition at line 1385 of file AbcSimplex.hpp.

◆ abcPrimalColumnPivot_

AbcPrimalColumnPivot* AbcSimplex::abcPrimalColumnPivot_
protected

primal column pivot choice

Definition at line 1387 of file AbcSimplex.hpp.

◆ abcPivotVariable_

int* AbcSimplex::abcPivotVariable_
protected

Basic variables pivoting on which rows followed by atLo/atUp then free/superbasic then fixed.

Definition at line 1391 of file AbcSimplex.hpp.

◆ reversePivotVariable_

int* AbcSimplex::reversePivotVariable_
protected

Reverse abcPivotVariable_ for moving around.

Definition at line 1393 of file AbcSimplex.hpp.

◆ abcFactorization_

AbcSimplexFactorization* AbcSimplex::abcFactorization_
protected

factorization

Definition at line 1395 of file AbcSimplex.hpp.

◆ abcBaseModel_

AbcSimplex* AbcSimplex::abcBaseModel_
protected

Saved version of solution.

A copy of model with certain state - normally without cuts

Definition at line 1407 of file AbcSimplex.hpp.

◆ clpModel_

ClpSimplex* AbcSimplex::clpModel_
protected

A copy of model as ClpSimplex with certain state.

Definition at line 1409 of file AbcSimplex.hpp.

◆ abcNonLinearCost_

AbcNonLinearCost* AbcSimplex::abcNonLinearCost_
protected

Very wasteful way of dealing with infeasibilities in primal.

However it will allow non-linearities and use of dual analysis. If it doesn't work it can easily be replaced.

Definition at line 1414 of file AbcSimplex.hpp.

◆ usefulArray_

CoinPartitionedVector AbcSimplex::usefulArray_[ABC_NUMBER_USEFUL]
mutableprotected

Definition at line 1420 of file AbcSimplex.hpp.

◆ abcProgress_

AbcSimplexProgress AbcSimplex::abcProgress_
protected

For dealing with all issues of cycling etc.

Definition at line 1422 of file AbcSimplex.hpp.

◆ saveData_

ClpDataSave AbcSimplex::saveData_
protected

For saving stuff at beginning.

Definition at line 1424 of file AbcSimplex.hpp.

◆ upperTheta_

double AbcSimplex::upperTheta_
protected

upper theta from dual column

Definition at line 1426 of file AbcSimplex.hpp.

◆ multipleSequenceIn_

int AbcSimplex::multipleSequenceIn_[4]
protected

Multiple sequence in.

Definition at line 1428 of file AbcSimplex.hpp.

◆ arrayForDualColumn_

int AbcSimplex::arrayForDualColumn_

Definition at line 1431 of file AbcSimplex.hpp.

◆ arrayForReplaceColumn_

int AbcSimplex::arrayForReplaceColumn_

Definition at line 1432 of file AbcSimplex.hpp.

◆ arrayForFlipBounds_

int AbcSimplex::arrayForFlipBounds_

Definition at line 1433 of file AbcSimplex.hpp.

◆ arrayForFlipRhs_

int AbcSimplex::arrayForFlipRhs_

Definition at line 1434 of file AbcSimplex.hpp.

◆ arrayForBtran_

int AbcSimplex::arrayForBtran_

Definition at line 1435 of file AbcSimplex.hpp.

◆ arrayForFtran_

int AbcSimplex::arrayForFtran_

Definition at line 1436 of file AbcSimplex.hpp.

◆ arrayForTableauRow_

int AbcSimplex::arrayForTableauRow_

Definition at line 1437 of file AbcSimplex.hpp.

◆ numberFlipped_

int AbcSimplex::numberFlipped_
protected

Definition at line 1439 of file AbcSimplex.hpp.

◆ numberDisasters_

int AbcSimplex::numberDisasters_
protected

Definition at line 1440 of file AbcSimplex.hpp.


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