18#include "CoinIndexedVector.hpp"
28class OsiAbcSolverInterface;
29class CoinWarmStartBasis;
31class AbcSimplexProgress;
57#define HEAVY_PERTURBATION 57
108 int numberRows,
const int * whichRows,
109 int numberColumns,
const int * whichColumns,
110 bool dropNames =
true,
bool dropIntegers =
true,
111 bool fixOthers =
false);
119 int numberRows,
const int * whichRows,
120 int numberColumns,
const int * whichColumns,
121 bool dropNames =
true,
bool dropIntegers =
true,
122 bool fixOthers =
false);
127 int numberColumns,
const int * whichColumns);
202#ifdef EARLY_FACTORIZE
232 return const_cast<CoinPartitionedVector *
>(&
usefulArray_[index]);
251 const double * fakePrimals,
334 int computeDuals(
double * givenDjs, CoinIndexedVector * array1, CoinIndexedVector * array2);
345 inline void unpack(CoinIndexedVector & rowArray)
const
350 void unpack(CoinIndexedVector & rowArray,
int sequence)
const;
375#define rowUseScale_ scaleFromExternal_
376#define inverseRowUseScale_ scaleToExternal_
407 double allowedInfeasibility);
497 const double * givenPrimals,
498 bool valuesPass =
false);
581 st_byte =
static_cast<unsigned char>(st_byte & ~7);
582 st_byte =
static_cast<unsigned char>(st_byte | newstatus);
586 st_byte =
static_cast<unsigned char>(st_byte & ~7);
587 st_byte =
static_cast<unsigned char>(st_byte | newstatus);
611 inline int sequenceInternalIn()
const {
612 return sequenceInternalIn_;
614 inline int sequenceInternalOut()
const {
615 return sequenceInternalOut_;
618 inline void setSequenceInternalIn(
int sequence) {
619 sequenceInternalIn_ = sequence;
621 inline void setSequenceInternalOut(
int sequence) {
622 sequenceInternalOut_ = sequence;
665 printf(
"Pansetting %d to lb\n",iSequence);
675 printf(
"Pansetting %d to ub\n",iSequence);
714 inline double cost(
int sequence) {
738 AbcSimplex * createSubProblem(
int numberColumns,
const int * whichColumn);
740 void restoreFromSubProblem(
AbcSimplex * fullProblem,
const int * whichColumn);
753 inline int parallelMode()
const
754 {
return parallelMode_;}
756 inline void setParallelMode(
int value)
757 { parallelMode_=value;}
759 inline int numberCpus()
const
760 {
return parallelMode_+1;}
763 inline void setStopStart(
int value)
790 void swap(
int pivotRow,
int nonBasicPosition,
Status newStatus);
793 st_byte =
static_cast<unsigned char>(st_byte & ~24);
794 st_byte =
static_cast<unsigned char>(st_byte | (fakeBound << 3));
811 void swap(
int pivotRow,
int nonBasicPosition);
862#ifndef NUMBER_THREADS
863#define NUMBER_THREADS 3
867 inline pthread_mutex_t * mutexPointer(
int which,
int thread=0)
868 {
return mutex_+which+3*thread;}
869 inline pthread_barrier_t * barrierPointer()
871 inline int whichLocked(
int thread=0)
const
872 {
return locked_[thread];}
873 inline CoinThreadInfo * threadInfoPointer(
int thread=0)
874 {
return threadInfo_+thread;}
875 void startParallelStuff(
int type);
876 int stopParallelStuff(
int type);
878 int whichThread()
const;
891 inline void setObjCoeff(
int elementIndex,
double elementValue ) {
905 double lower,
double upper );
916 const int* indexLast,
917 const double* boundList);
921 inline void setColLower(
int elementIndex,
double elementValue ) {
926 inline void setColUpper(
int elementIndex,
double elementValue ) {
932 double newlower,
double newupper ) {
943 const int* indexLast,
944 const double* boundList) {
958 double lower,
double upper ) ;
967 const int* indexLast,
968 const double* boundList);
970 void resize (
int newNumberRows,
int newNumberColumns);
1017#ifdef ABC_LONG_FACTORIZATION
1059#define startAtLowerNoOther_ maximumAbcNumberRows_
1070#ifdef EARLY_FACTORIZE
1091#define ALL_STATUS_OK 2048
1092#define ROW_PRIMAL_OK 4096
1093#define ROW_DUAL_OK 8192
1094#define COLUMN_PRIMAL_OK 16384
1095#define COLUMN_DUAL_OK 32768
1096#define PESSIMISTIC 65536
1097#define ADD_A_BIT 131072
1098#define DO_SCALE_AND_MATRIX 262144
1099#define DO_BASIS_AND_ORDER 524288
1100#define DO_STATUS 1048576
1101#define DO_SOLUTION 2097152
1102#define DO_JUST_BOUNDS 0x400000
1103#define NEED_BASIS_SORT 0x800000
1104#define FAKE_SUPERBASIC 0x1000000
1105#define VALUES_PASS 0x2000000
1106#define VALUES_PASS2 0x4000000
1216#ifdef EARLY_FACTORIZE
1220#ifdef TEMPORARY_FACTORIZATION
1239#define ABC_NUMBER_USEFUL 8
1264 pthread_barrier_t barrier_;
1269#elif ABC_PARALLEL==2
void AbcSimplexUnitTest(const std::string &mpsDir)
A function that tests the methods in the AbcSimplex class.
#define ABC_NUMBER_USEFUL
Useful arrays (all of row+column+2 length)
#define inverseRowUseScale_
#define COLUMN_UPPER_SAME
#define COLUMN_LOWER_SAME
@ ClpObjOffset
Objective function constant.
Dual Row Pivot Abstract Base Class.
Primal Column Pivot Abstract Base Class.
This just implements AbcFactorization when an AbcMatrix object is passed.
void restoreGoodStatus(int type)
Restores previous good status and says trouble.
int housekeeping()
This does basis housekeeping and does values for in/out variables.
int initialNumberInfeasibilities_
Initial number of infeasibilities.
void moveStatusToClp(ClpSimplex *clpModel)
Move status and solution to ClpSimplex.
void checkArrays(int ignoreEmpty=0) const
For debug - prints summary of arrays which are out of kilter.
AbcSimplex(const AbcSimplex &rhs)
Copy constructor.
double * costSaved_
Saved scaled copy of objective.
double * abcPerturbation() const
Perturbation.
int normalDualColumnIteration_
Iteration at which to do relaxed dualColumn.
int startOther_
Start of superBasic, free or awkward bounds variables.
double largestGap_
Largest gap.
void setValuesPassAction(double incomingInfeasibility, double allowedInfeasibility)
For advanced use.
void setFakeBound(int sequence, FakeBound fakeBound)
int arrayForFlipRhs() const
void fillPerturbation(int start, int number)
fills in perturbationSaved_ from start with 0.5+random
void setClpSimplexObjectiveValue()
Sets objectiveValue_ from rawObjectiveValue_.
AbcMatrix * abcMatrix() const
Abc Matrix.
bool flagged(int sequence) const
double * abcUpper_
Working scaled copy of upper bounds has original scaled copy at end.
int numberFlagged_
Current number of variables flagged.
int maximumNumberTotal_
Maximum numberTotal.
double upper(int sequence)
void setObjectiveCoefficient(int elementIndex, double elementValue)
Set an objective function coefficient.
void checkMoveBack(bool checkDuals)
For debug - moves solution back to external and computes stuff (always checks djs)
int startFixed_
Start of fixed variables.
int numberTotalWithoutFixed_
Number of variables without fixed to zero (includes spare rows)
int * reversePivotVariable_
Reverse abcPivotVariable_ for moving around.
AbcSimplex * abcBaseModel_
Saved version of solution.
void checkDjs(int type=1) const
For debug - summarizes dj situation (1 recomputes duals first, 2 checks duals as well)
AbcSimplexFactorization * swapFactorization(AbcSimplexFactorization *factorization)
Swaps factorization.
double currentAcceptablePivot() const
Acceptable pivot for this iteration.
void setCurrentDualTolerance(double value)
int lastFirstFree() const
Last firstFree_.
void setPivoted(int sequence)
bool atFakeBound(int sequence) const
AbcSimplex(AbcSimplex *wholeModel, int numberColumns, const int *whichColumns)
This constructor modifies original AbcSimplex and stores original stuff in created AbcSimplex.
int gutsOfSolution(int type)
Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements)
void gutsOfDelete(int type)
Does most of deletion for arrays etc(0 just null arrays, 1 delete first)
void gutsOfCopy(const AbcSimplex &rhs)
Does most of copying.
double minimizationObjectiveValue() const
Gets objective value with all offsets but as for minimization.
void gutsOfResize(int numberRows, int numberColumns)
resizes arrays
int gutsOfSolution(double *givenDuals, const double *givenPrimals, bool valuesPass=false)
May change basis and then returns number changed.
void checkPrimalSolution(bool justBasic)
This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Primal)
int firstFree() const
First Free_.
double * upperRegion(int which) const
int arrayForDualColumn() const
double * djSaved_
Saved scaled dual solution.
double * costBasic_
Working scaled copy of basic objective.
int tightenPrimalBounds()
Tightens primal bounds to make dual faster.
AbcDualRowPivot * abcDualRowPivot_
dual row pivot choice
AbcSimplexProgress abcProgress_
For dealing with all issues of cycling etc.
double acceptablePivot() const
Acceptable pivot for this iteration.
int startAtUpperNoOther_
Start of variables at upper bound with no lower.
double reducedCost(int sequence)
int stateOfIteration_
Where we are in iteration.
int freeSequenceIn() const
Free chosen vector.
int numberTotal() const
Number of variables (includes spare rows)
void swapPrimalStuff()
Swaps primal stuff.
double computeInternalObjectiveValue()
Compute minimization objective value from internal solution without perturbation.
void allSlackBasis()
Sets up all slack basis and resets solution to as it was after initial load or readMps.
int lastPivotRow() const
Current/last pivot row (set after END of choosing pivot row in dual)
void setStateOfProblem(int value)
State of problem.
void permuteBasis()
deals with new basis and puts in abcPivotVariable_
double * fakeDjs() const
Fake djs.
double initialSumInfeasibilities_
Initial sum of infeasibilities.
void copyFromSaved(int type=31)
Copies all saved versions to working versions and may do something for perturbation.
int getSolution()
Given an existing factorization computes and checks primal and dual solutions.
double * abcDj_
Working scaled dual solution may have saved from last factorization at end.
double * lowerRegion(int which) const
friend void AbcSimplexUnitTest(const std::string &mpsDir)
A function that tests the methods in the AbcSimplex class.
void setSequenceOut(int sequence)
void setFactorizationFrequency(int value)
int ordinaryVariables_
Set to 1 if no free or super basic.
void moveToBasic(int which=15)
Moves basic stuff to basic area.
int maximumNumberTotal() const
Maximum Total.
int gutsOfPrimalSolution(int type)
Computes solutions - 1 do duals, 2 do primals, 3 both (returns number of refinements)
AbcSimplex::Status getInternalColumnStatus(int sequence) const
int fakeSuperBasic(int iSequence)
Returns 1 if fake superbasic 0 if free or true superbasic -1 if was fake but has cleaned itself up (s...
void setColumnBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
double * solutionRegion(int which) const
Return region.
double * perturbationBasic_
basic perturbation
double * upperRegion() const
double & lowerAddress(int sequence)
Return address of row or column lower bound.
double * scaleToExternal_
Scale from primal internal to external (in external order) Or other way for dual.
double sumFakeInfeasibilities_
Sum of infeasibilities when using fake perturbation tolerance.
double objectiveChange_
Objective change.
double * costRegion(int which) const
int sequenceWithin(int sequence) const
Returns sequence number within section.
unsigned char * internalStatus() const
int cleanFactorization(int ifValuesPass)
Get a clean factorization - i.e.
void computeObjective()
Computes nonbasic cost and total cost.
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 infeasibilit...
double * abcPerturbation_
Perturbation (fixed) - is just scaled random numbers If perturbationFactor_<0 then virtual perturbati...
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.
double clpObjectiveValue() const
Objective value.
double lastPrimalError_
Last primal error.
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 setColL...
void defaultFactorizationFrequency()
If user left factorization frequency then compute.
void resize(int newNumberRows, int newNumberColumns)
Resizes rim part of model.
int stateDualColumn_
State of dual waffle -2 - in initial large tolerance phase -1 - in medium tolerance phase n - in corr...
double movement_
Movement of variable.
void setFactorization(AbcSimplexFactorization &factorization)
Passes in factorization.
void setPrimalColumnPivotAlgorithm(AbcPrimalColumnPivot &choice)
Sets column pivot choice algorithm in primal.
double * scaleFromExternal_
Points from external to internal.
void originalModel(AbcSimplex *miniModel)
This copies back stuff from miniModel and then deletes miniModel.
int numberOrdinary() const
Number of ordinary (lo/up) in tableau row.
void setActive(int iRow)
To say row active in primal pivot row choice.
void printStuff() const
Print stuff.
void setDualRowPivotAlgorithm(AbcDualRowPivot &choice)
Sets row pivot choice algorithm in dual.
double * solutionBasic_
Working scaled basic primal solution.
void setMultipleSequenceIn(int sequenceIn[4])
set multiple sequence in
void moveInfo(const AbcSimplex &rhs, bool justStatus=false)
Move status and solution across.
void clearPivoted(int sequence)
void checkConsistentPivots() const
For debug - check pivotVariable consistent.
void checkSolutionBasic() const
For debug - checks solutionBasic.
void checkDualSolutionPlusFake()
This sets largest infeasibility and most infeasible and sum and number of infeasibilities AND sumFake...
AbcDualRowPivot * dualRowPivot() const
dual row pivot choice
double lower(int sequence)
double * lowerBasic_
Working scaled copy of basic lower bounds.
const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
double & reducedCostAddress(int sequence)
int arrayForFtran() const
const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
int lastPivotRow_
Current/last pivot row (set after END of choosing pivot row in dual)
int multipleSequenceIn_[4]
Multiple sequence in.
void clearArrays(int which)
Clears an array and says available (-1 does all)
int primal(int ifValuesPass)
Primal algorithm - see AbcSimplexPrimal.hpp for method.
double * offsetRhs_
Offset for accumulated offsets*matrix.
double * inverseColumnScale2() const
int startup(int ifValuesPass)
Common bits of coding for dual and primal.
ClpDataSave saveData_
For saving stuff at beginning.
void setColBounds(int elementIndex, double newlower, double newupper)
Set a single column lower and upper bound.
int freeSequenceIn_
Free chosen vector.
int getAvailableArrayPublic() const
Returns first available empty array (and sets flag) when no possibility of going parallel.
double * abcLower_
Working scaled copy of lower bounds has original scaled copy at end.
void restoreData(ClpDataSave saved)
Restore data.
double currentAcceptablePivot_
Acceptable pivot for this iteration.
void unpack(CoinIndexedVector &rowArray, int sequence) const
Unpacks one column of the matrix into indexed array.
bool pivoted(int sequence) const
const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
double solution(int sequence)
Return row or column values.
int arrayForFlipBounds() const
void checkDualSolution()
This sets largest infeasibility and most infeasible and sum and number of infeasibilities (Dual)
void setInternalColumnStatus(int sequence, AbcSimplex::Status newstatus)
void clearFlagged(int sequence)
int getAvailableArray() const
Returns first available empty array (and sets flag)
int sequenceIn() const
Return sequence In or Out.
int internalFactorize(int solveType)
Factorizes using current basis.
void moveStatusFromClp(ClpSimplex *clpModel)
Move status and solution from ClpSimplex.
void putStuffInBasis(int type)
Puts more stuff in basis 1 bit set - do even if basis exists 2 bit set - don't bother staying triangu...
double & solutionAddress(int sequence)
Return address of row or column values.
void makeBaseModel()
Array persistence flag If 0 then as now (delete/new) 1 then only do arrays if bigger needed 2 as 1 bu...
AbcSimplexFactorization * abcFactorization_
factorization
AbcSimplex(bool emptyMessages=false)
Default constructor.
double * costRegion() const
AbcSimplex(const ClpSimplex &rhs)
Copy constructor from model.
AbcPrimalColumnPivot * primalColumnPivot() const
primal column pivot choice
double btranAlpha_
Btran alpha.
void unpack(CoinIndexedVector &rowArray) const
Unpacks one column of the matrix into indexed array Uses sequenceIn_.
double * scaleToExternal() const
Scale from primal internal to external (in external order) Or other way for dual.
void setInternalStatus(int sequence, AbcSimplex::Status newstatus)
double * inverseColumnUseScale_
use this instead of inverseColumnScale
double & costAddress(int sequence)
Return address of row or column cost.
int startAtUpperOther_
Start of variables at upper bound with lower.
int startAtLowerOther_
Start of variables at lower bound with upper.
void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -DBL_MAX for -infinity.
double valueIncomingDual() const
value of incoming variable (in Dual)
void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
double & upperAddress(int sequence)
Return address of row or column upper bound.
void setToBaseModel(AbcSimplex *model=NULL)
Reset to base model (just size and arrays needed) If model NULL use internal copy.
void setUsedArray(int which) const
Say array going to be used.
double currentDualTolerance_
Current dualTolerance (will end up as dualTolerance_)
const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
void saveGoodStatus()
Saves good status etc.
bool initialDenseFactorization() const
void putBackSolution(ClpSimplex *simplex)
Put back solution into ClpSimplex.
int numberFreeNonBasic_
Number of free nonbasic variables.
int maximumAbcNumberRows_
Maximum number rows.
unsigned char * internalStatusSaved_
Saved status.
void setupPointers(int maxRows, int maxColumns)
Sets up all extra pointers.
void clearArraysPublic(int which)
Clears an array and says available (-1 does all) when no possibility of going parallel.
void setAvailableArray(int which) const
Say array going available.
double * costBasic() const
int * pivotVariable() const
Basic variables pivoting on which rows may be same as toExternal but may be as at invert.
double perturbationFactor_
Perturbation factor If <0.0 then virtual if 0.0 none if >0.0 use this as factor.
void setColumnLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
void checkBothSolutions()
This sets sum and number of infeasibilities (Dual and Primal)
int * abcPivotVariable_
Basic variables pivoting on which rows followed by atLo/atUp then free/superbasic then fixed.
int ordinaryVariables() const
Set to 1 if no free or super basic.
AbcSimplex(const ClpSimplex *clpSimplex)
This constructor copies from ClpSimplex.
double currentDualBound_
Current dualBound (will end up as dualBound_)
void setColSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of columns simultaneously
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.
int lastFirstFree_
Last firstFree_.
int maximumAbcNumberColumns_
Maximum number columns.
double cost(int sequence)
int dual()
Dual algorithm - see AbcSimplexDual.hpp for method.
void translate(int type)
Translates ClpModel to AbcSimplex See DO_ bits in stateOfProblem_ for type e.g.
void setColumnUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
int arrayForReplaceColumn_
double minimumThetaMovement_
Minimum theta movement.
void setRowSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of rows simultaneously
double * upperSaved_
Saved scaled copy of upper bounds.
double * perturbationSaved() const
Perturbation (fixed) - is just scaled random numbers.
void swapDualStuff(int lastSequenceOut, int lastDirectionOut)
Swaps dual stuff.
int numberOrdinary_
Number of ordinary (lo/up) in tableau row.
AbcSimplexProgress * abcProgress()
For dealing with all issues of cycling etc.
void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
CoinPartitionedVector * usefulArray(int index)
Useful arrays (0,1,2,3,4,5,6,7)
void swap(int pivotRow, int nonBasicPosition)
Swaps two variables.
double * djRegion(int which) const
CoinPartitionedVector usefulArray_[ABC_NUMBER_USEFUL]
int arrayForTableauRow() const
void cleanStatus(bool valuesPass=false)
Clean up status - make sure no superbasic etc.
bool isObjectiveLimitTestValid() const
Return true if the objective limit test can be relied upon.
int numberTotal_
Number of variables (includes spare rows)
double * abcCost_
Working scaled copy of objective ? where perturbed copy or can we always work with perturbed copy (in...
void computeObjectiveValue(bool useWorkingSolution=false)
Compute objective value from solution and put in objectiveValue_.
void setNumberOrdinary(int number)
Set number of ordinary (lo/up) in tableau row.
int isColumn(int sequence) const
Returns 1 if sequence indicates column.
int computePrimals(CoinIndexedVector *array1, CoinIndexedVector *array2)
Computes primals from scratch. Returns number of refinements.
void clearArrays(CoinPartitionedVector *which)
Clears an array and says available.
void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
double * solutionBasic() const
Return region.
AbcSimplexFactorization * getEmptyFactorization()
Gets clean and emptyish factorization.
void refreshUpper(unsigned int type=~(ROW_LOWER_SAME|COLUMN_LOWER_SAME))
double * tempArray_
Useful array of numberTotal length.
double * columnScale2() const
int numberTotalWithoutFixed() const
Number of variables without fixed to zero (includes spare rows)
double * djRegion() const
unsigned char * internalStatus_
Working status ? may be signed ? link pi_ to an indexed array? may have saved from last factorization...
double * columnUseScale_
use this instead of columnScale
double * lowerBasic() const
double * lowerRegion() const
CoinWarmStartBasis * getBasis() const
Returns a basis (to be deleted by user)
AbcSimplexFactorization * factorization() const
factorization
AbcNonLinearCost * abcNonLinearCost_
Very wasteful way of dealing with infeasibilities in primal.
void permuteOut(int whatsWanted)
Permutes out - bit settings same as stateOfProblem.
void swap(int pivotRow, int nonBasicPosition, Status newStatus)
Swaps two variables and does status.
ClpSimplex * clpModel_
A copy of model as ClpSimplex with certain state.
void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
double originalUpper(int iSequence) const
Return original lower bound.
double upperTheta_
upper theta from dual column
double * upperBasic() const
int doAbcPrimal(int ifValuesPass)
AbcNonLinearCost * abcNonLinearCost() const
Return pointer to details of costs.
FakeBound getFakeBound(int sequence) const
double * offset_
Primal offset (in external order) So internal value is (external-offset)*scaleFromExternal.
AbcSimplex * baseModel() const
See if we have base model.
int stateOfProblem() const
State of problem.
double objectiveOffset_
Objective offset (from offset_)
int arrayForReplaceColumn() const
double * rowScale2() const
corresponds to rowScale etc
void refreshCosts()
After modifying first copy refreshes second copy and marks as updated.
double * scaleFromExternal() const
Points from external to internal.
double lastDualBound_
Last dual bound.
double currentDualBound() const
Current dualBound (will end up as dualBound_)
AbcSimplex & operator=(const AbcSimplex &rhs)
Assignment operator. This copies the data.
double currentDualTolerance() const
Current dualTolerance (will end up as dualTolerance_)
Status
enums for status of various sorts.
void setInitialDenseFactorization(bool onOff)
Normally the first factorization does sparse coding because the factorization could be singular.
void clearActive(int iRow)
double sumNonBasicCosts_
Sum of nonbasic costs.
void setSequenceIn(int sequence)
Set sequenceIn or Out.
int arrayForBtran() const
double originalLower(int iSequence) const
Return original lower bound.
bool active(int iRow) const
double * upperBasic_
Working scaled copy of basic upper bounds.
int maximumAbcNumberRows() const
Maximum rows.
AbcMatrix * abcMatrix_
Working matrix.
double lastDualError_
Last dual error.
double * solutionSaved_
Saved scaled primal solution.
double * inverseRowScale2() const
int computeDuals(double *givenDjs, CoinIndexedVector *array1, CoinIndexedVector *array2)
Computes duals from scratch.
void gutsOfInitialize(int numberRows, int numberColumns, bool doMore)
Initializes arrays.
void crash(int type)
Does sort of crash.
double * solutionRegion() const
Return region.
void createStatus()
Set up status array (can be used by OsiAbc).
CoinPartitionedVector * usefulArray(int index) const
double * djBasic_
Working scaled basic dual solution (want it to be zero)
ClpDataSave saveData()
Save data.
void refreshLower(unsigned int type=~(ROW_LOWER_SAME|COLUMN_UPPER_SAME))
void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use DBL_MAX for infinity.
double * abcSolution_
Working scaled primal solution may have saved from last factorization at end.
void deleteBaseModel()
Switch off base model.
double rawObjectiveValue() const
Raw objective value (so always minimize in primal)
double upperTheta() const
upper theta from dual column
double * lowerSaved_
Saved scaled copy of lower bounds.
AbcPrimalColumnPivot * abcPrimalColumnPivot_
primal column pivot choice
int lastCleaned_
Last time cleaned up.
void permuteIn()
Permutes in from ClpModel data - assumes scale factors done and AbcMatrix exists but is in original o...
int factorizationFrequency() const
Factorization frequency.
double * perturbationSaved_
saved perturbation
int swappedAlgorithm_
Nonzero (probably 10) if swapped algorithms.
AbcSimplex::Status getInternalStatus(int sequence) const
double rawObjectiveValue_
Sum of costs (raw objective value)
void setFlagged(int sequence)
To flag a variable.
This is a tiny class where data can be saved round calls.
Base class for Clp disaster handling.
int numberColumns_
Number of columns.
double optimizationDirection_
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
double * rowUpper_
Row upper.
double * rowLower_
Row lower.
int getNumElements() const
Number of elements in matrix.
double * columnUpper_
Column Upper.
double dblParam_[ClpLastDblParam]
Array of double parameters.
double objectiveValue_
Objective value.
double * columnLower_
Column Lower.
This solves LPs using the simplex method.
double primalTolerance_
Current primal tolerance for algorithm.
double bestPossibleImprovement_
Best possible improvement using djs (primal) or obj change by flipping bounds to make dual feasible (...
double acceptablePivot_
Acceptable pivot value just after factorization.
int sequenceOut_
Sequence of Out variable.
int sequenceIn_
Sequence of In variable.
int firstFree_
First free/super-basic variable (-1 if none)