Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClpSimplexPrimal.hpp
Go to the documentation of this file.
1 /* $Id: ClpSimplexPrimal.hpp 1665 2011-01-04 17:55:54Z lou $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 /*
6  Authors
7 
8  John Forrest
9 
10  */
11 #ifndef ClpSimplexPrimal_H
12 #define ClpSimplexPrimal_H
13 
14 #include "ClpSimplex.hpp"
15 
23 class ClpSimplexPrimal : public ClpSimplex {
24 
25 public:
26 
115  int primal(int ifValuesPass = 0, int startFinishOptions = 0);
117 
120  void alwaysOptimal(bool onOff);
122  bool alwaysOptimal() const;
127  void exactOutgoing(bool onOff);
128  bool exactOutgoing() const;
130 
145  int whileIterating(int valuesOption);
146 
165  int pivotResult(int ifValuesPass = 0);
166 
167 
173  double theta,
174  double & objectiveChange,
175  int valuesPass);
184  void primalRow(CoinIndexedVector * rowArray,
185  CoinIndexedVector * rhsArray,
186  CoinIndexedVector * spareArray,
187  int valuesPass);
195  void primalColumn(CoinIndexedVector * updateArray,
196  CoinIndexedVector * spareRow1,
197  CoinIndexedVector * spareRow2,
198  CoinIndexedVector * spareColumn1,
199  CoinIndexedVector * spareColumn2);
200 
204  double changeCost);
215  void statusOfProblemInPrimal(int & lastCleaned, int type,
217  bool doFactorization,
218  int ifValuesPass,
219  ClpSimplex * saveModel = NULL);
221  void perturb(int type);
223  bool unPerturb();
225  int unflag();
231  int nextSuperBasic(int superBasicType, CoinIndexedVector * columnArray);
232 
234  void primalRay(CoinIndexedVector * rowArray);
236  void clearAll();
237 
239  int lexSolve();
240 
242 };
243 #endif
244 
double * ray() const
For advanced users - no need to delete - sign not changed.
Definition: ClpModel.hpp:772
void perturb(int type)
Perturbs problem (method depends on perturbation())
int whileIterating(int valuesOption)
This has the flow between re-factorizations.
void primalRay(CoinIndexedVector *rowArray)
Create primal ray.
double theta() const
Theta (pivot change)
int checkUnbounded(CoinIndexedVector *ray, CoinIndexedVector *spare, double changeCost)
Checks if tentative optimal actually means unbounded in primal Returns -3 if not, 2 if is unbounded...
void statusOfProblemInPrimal(int &lastCleaned, int type, ClpSimplexProgress *progress, bool doFactorization, int ifValuesPass, ClpSimplex *saveModel=NULL)
Refactorizes if necessary Checks if finished.
For saving extra information to see if looping.
Definition: ClpSolve.hpp:261
bool alwaysOptimal() const
void primalColumn(CoinIndexedVector *updateArray, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
Chooses primal pivot column updateArray has cost updates (also use pivotRow_ from last iteration) Wou...
int updatePrimalsInPrimal(CoinIndexedVector *rowArray, double theta, double &objectiveChange, int valuesPass)
The primals are updated by the given array.
bool exactOutgoing() const
int pivotResult(int ifValuesPass=0)
Do last half of an iteration.
int unflag()
Unflag all variables and return number unflagged.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
bool unPerturb()
Take off effect of perturbation and say whether to try dual.
Indexed Vector.
int nextSuperBasic(int superBasicType, CoinIndexedVector *columnArray)
Get next superbasic -1 if none, Normal type is 1 If type is 3 then initializes sorted list if 2 uses ...
void primalRow(CoinIndexedVector *rowArray, CoinIndexedVector *rhsArray, CoinIndexedVector *spareArray, int valuesPass)
Row array has pivot column This chooses pivot row.
int primal(int ifValuesPass=0, int startFinishOptions=0)
Primal algorithm.
CoinIndexedVector * columnArray(int index) const
Useful column length arrays (0,1,2,3,4,5)
Definition: ClpSimplex.hpp:731
int lexSolve()
Sort of lexicographic resolve.
int saveModel(const char *fileName)
Save model to file, returns 0 if success.
void clearAll()
Clears all bits and clears rowArray[1] etc.
ClpSimplexProgress * progress()
For dealing with all issues of cycling etc.
CoinIndexedVector * rowArray(int index) const
Useful row length arrays (0,1,2,3,4,5)
Definition: ClpSimplex.hpp:727
This solves LPs using the primal simplex method.