48 int numberPasses,
int options[6],
49 int extraInfo[6],
int independentOptions[3]);
122 return independentOptions_[0] != 0;
127 return (independentOptions_[1] & 1) == 0;
132 independentOptions_[1] &= ~1;
134 independentOptions_[1] |= 1;
139 return (independentOptions_[1] & 2) == 0;
144 independentOptions_[1] &= ~2;
146 independentOptions_[1] |= 2;
151 return (independentOptions_[1] & 4) == 0;
156 independentOptions_[1] &= ~4;
158 independentOptions_[1] |= 4;
163 return (independentOptions_[1] & 8) == 0;
168 independentOptions_[1] &= ~8;
170 independentOptions_[1] |= 8;
175 return (independentOptions_[1] & 16) == 0;
180 independentOptions_[1] &= ~16;
182 independentOptions_[1] |= 16;
187 return (independentOptions_[1] & 32) == 0;
192 independentOptions_[1] &= ~32;
194 independentOptions_[1] |= 32;
199 return (independentOptions_[1] & 64) == 0;
204 independentOptions_[1] &= ~64;
206 independentOptions_[1] |= 64;
211 return (independentOptions_[1] & 128) == 0;
216 independentOptions_[1] &= ~128;
218 independentOptions_[1] |= 128;
223 return (independentOptions_[1] & 256) == 0;
228 independentOptions_[1] &= ~256;
230 independentOptions_[1] |= 256;
235 return (independentOptions_[1] & 512) == 0;
240 independentOptions_[1] &= ~512;
242 independentOptions_[1] |= 512;
247 return (independentOptions_[1] & 8192) == 0;
252 independentOptions_[1] &= ~8192;
254 independentOptions_[1] |= 8192;
259 return independentOptions_[1] & 0xffffff;
263 independentOptions_[1] = (independentOptions_[1] & 0xff000000) | (action & 0xffffff);
268 return independentOptions_[2];
272 independentOptions_[2] = value;
276 independentOptions_[type] = value;
280 return independentOptions_[type];
305 int independentOptions_[3];
344 int cycle(
int in,
int out,
int wayIn,
int wayOut);
411 #define CLP_PROGRESS 5 420 #ifdef CLP_PROGRESS_WEIGHT 421 double objectiveWeight_[CLP_PROGRESS_WEIGHT];
424 double infeasibilityWeight_[CLP_PROGRESS_WEIGHT];
426 double realInfeasibilityWeight_[CLP_PROGRESS_WEIGHT];
446 #ifdef CLP_PROGRESS_WEIGHT 447 int numberInfeasibilitiesWeight_[CLP_PROGRESS_WEIGHT];
450 int iterationNumberWeight_[CLP_PROGRESS_WEIGHT];
474 AbcSimplexProgress();
481 AbcSimplexProgress(
const AbcSimplexProgress &);
484 AbcSimplexProgress &
operator=(
const AbcSimplexProgress &rhs);
486 ~AbcSimplexProgress();
void reset()
Resets as much as possible.
This is a very simple class to guide algorithms.
bool doTripleton() const
Whether we want to do tripleton part of presolve.
void startCheck()
Start check at beginning of whileIterating.
int getSpecialOption(int which) const
int timesFlagged() const
number of times flagged
void setDoSingletonColumn(bool doSingleton_)
void setIndependentOption(int type, int value)
bool infeasibleReturn() const
bool doSingleton() const
Whether we want to do singleton part of presolve.
ClpSimplex * model_
Pointer back to model so we can get information.
void setSpecialOption(int which, int value, int extraInfo=-1)
Special options - bits 0 4 - use crash (default allslack in dual, idiot in primal) 8 - all slack basi...
For saving extra information to see if looping.
int numberTimes_
Number of times checked (so won't stop too early)
bool doDupcol() const
Whether we want to do dupcol part of presolve.
void newOddState()
Odd state.
void generateCpp(FILE *fp)
Generates code for above constructor.
int looping()
Returns -1 if okay, -n+1 (n number of times bad) if bad but action taken, >=0 if give up and use as p...
void setDoTripleton(bool doTripleton_)
void setPresolveType(PresolveType amount, int extraInfo=-1)
double lastInfeasibility(int back=1) const
Returns real primal infeasibility (if -1) - current if (0)
double lastObjective(int back=1) const
Returns previous objective (if -1) - current if (0)
ClpSolve()
Default constructor.
~ClpSimplexProgress()
Destructor.
int cycle(int in, int out, int wayIn, int wayOut)
Returns cycle length in whileIterating.
int in_[CLP_CYCLE]
For cycle checking.
int numberReallyBadTimes_
Number really bad times.
void incrementTimesFlagged()
void setDoForcing(bool doForcing_)
void clearIterationNumbers()
clears all iteration numbers (to switch off panic)
int numberInfeasibilities(int back=1) const
Returns number of primal infeasibilities (if -1) - current if (0)
This solves LPs using the simplex method.
void setDoDupcol(bool doDupcol_)
void fillFromModel(ClpSimplex *model)
Fill from model.
bool doDuprow() const
Whether we want to do duprow part of presolve.
bool doForcing() const
Whether we want to do forcing part of presolve.
void setDoTighten(bool doTighten_)
SolveType
enums for solve function
void setDoDual(bool doDual_)
int iterationNumber_[CLP_PROGRESS]
Iteration number at which occurred.
void setDoSingleton(bool doSingleton_)
double realInfeasibility_[CLP_PROGRESS]
Sum of real primal infeasibilities for primal.
int presolveActions() const
Set whole group.
int independentOption(int type) const
void setSolveType(SolveType method, int extraInfo=-1)
Solve types.
void incrementReallyBadTimes()
bool doKillSmall() const
Whether we want to kill small substitutions.
int substitution() const
Largest column for substitution (normally 3)
void setDoDuprow(bool doDuprow_)
double infeasibility_[CLP_PROGRESS]
Sum of infeasibilities for algorithm.
void setDoKillSmall(bool doKill)
bool doTighten() const
Whether we want to do tighten part of presolve.
ClpSolve & operator=(const ClpSolve &rhs)
Assignment operator. This copies the data.
void setInfeasibleReturn(bool trueFalse)
Say to return at once if infeasible, default is to solve.
int numberTimesFlagged_
Number of times no iterations as flagged.
bool doDoubleton() const
Whether we want to do doubleton part of presolve.
int lastIterationNumber(int back=1) const
Returns previous iteration number (if -1) - current if (0)
bool doImpliedFree() const
Whether we want to do impliedfree part of presolve.
ClpSimplexProgress & operator=(const ClpSimplexProgress &rhs)
Assignment operator. This copies the data.
int oddState_
If things are in an odd state.
void setDoImpliedFree(bool doImpliedfree)
int reallyBadTimes() const
number of really bad times
ClpSimplexProgress()
Default constructor.
void setPresolveActions(int action)
void modifyObjective(double value)
Modify objective e.g. if dual infeasible in dual.
int badTimes() const
number of bad times
double initialWeight_
Initial weight for weights.
void setDoDoubleton(bool doDoubleton_)
bool doSingletonColumn() const
Whether we want to do singleton column part of presolve.
void setInfeasibility(double value)
Set real primal infeasibility and move back.
double objective_[CLP_PROGRESS]
Objective values.
int getPresolvePasses() const
bool doDual() const
Whether we want to do dual part of presolve.
int numberInfeasibilities_[CLP_PROGRESS]
Number of infeasibilities.
int getExtraInfo(int which) const
Extra info for idiot (or sprint)
PresolveType getPresolveType()
int numberBadTimes_
Number of times it looked like loop.
void setSubstitution(int value)