|
Private member data |
void | round () |
| truncate or round all values of the problem to given precision eps
|
void | round (double *vector, int vectorlength) |
| truncate or round all values of the vector to given precision eps
|
void | round (CoinPackedMatrix *MatrixDouble) |
| truncate or round all values of MatrixDouble to given precision eps
|
double | round (double value) |
double | truncate (double precision, double &x) |
| truncates a double x to given precision, i.e. cuts of decimals which are of lower "importance" than precision ;
|
double | round (int numberofdecimals_, double &x) |
| rounds a double x to number of decimals; found on the web; cf. truncate()
|
int | allocateVectors (const int numcols, const int numrows) |
| allocate memory for constraint vectors, objective function and equation type
|
template<class Type> |
int | allocateVector (Type *&pointertovector, long int sizeofvector) |
| checks if array not already exists and if sizeofvector > 0; if true allocates memory
|
template<class ClassType> |
void | copy (ClassType *&finalObjectPtr_, const ClassType *originalObject) |
| copy a class pointers' contents and allocate neccessary memory
|
void | freeCachedColRim () |
| free cached column rim vectors
|
void | freeCachedRowRim () |
| free cached row rim vectors
|
void | freeCachedResults () |
| free cached result vectors
|
void | freeCachedMatrix () |
| free cached matrices
|
void | freeCachedSpeciallyOrdSets () |
| free cached specially ordered sets and integer sets
|
void | freeCachedData (int keepCached=KEEPCACHED_NONE) |
| free all cached data (except specified entries, see getLpPtr())
|
void | gutsOfConstructor () |
| real work of constructor
|
void | gutsOfDestructor () |
| real work of destructor
|
void | freeAllMemory () |
| free all allocated memory
|
double * | obj |
| Pointer to objective vector.
|
double * | obj2 |
| Pointer to second objective vector to be used in bicriteria solver.
|
double * | collower |
| Pointer to dense vector of variable lower bounds.
|
double * | colupper |
| Pointer to dense vector of variable lower bounds.
|
char * | rowsense |
| Pointer to dense vector of row sense indicators.
|
double * | rowrhs |
| Pointer to dense vector of row right-hand side values.
|
double * | rowrange |
double * | rowlower |
| Pointer to dense vector of row lower bounds.
|
double * | rowupper |
| Pointer to dense vector of row upper bounds.
|
int * | isint |
| Pointer to information if varible is an integer or contiuous, true resp. false.
|
CoinPackedMatrix * | matrixByRow |
| Pointer to row-wise copy of problem MatrixDouble coefficients.
|
CoinPackedMatrix * | matrixByCol |
| Pointer to row-wise copy of problem MatrixDouble coefficients.
|
double | objsense |
| Objective function sense (1 for min (default), -1 for max).
|
int | numberofsos |
| Number of specially ordered sets.
|
SpeciallyOrderedSet ** | speciallyOrderedSets |
| Array with numberofsos specially ordered sets.
|
int | numberofintegersets |
| Number of integer sets.
|
SpeciallyOrderedSet ** | integerSets |
| Array with numberofintegersets integersets.
|
CoinPackedMatrix | infoBlock |
| Info Block from Excel tableau.
|
CoinPackedMatrix * | activityType |
| Activity Typ.
|
double | infinity |
| Infinity of chosen solver.
|
double | eps |
| Tolerance/Precision as double.
|
int | numberofdecimals |
| Precision in decimals.
|
bool | test |
| Test flag.
|
int | numberofrowstodrop |
| Number of Rows which are zero and thus can be deleted.
|
int * | rowsToDrop |
| Row indices of rows which are zero and thus can be deleted.
|
int | numberofcolstodrop |
| Number of Columns which are zero and thus can be deleted.
|
int * | colsToDrop |
| Column indices of rows which are zero and thus can be deleted.
|
Public Types |
enum | keepCachedFlag {
KEEPCACHED_NONE = 0,
KEEPCACHED_COLUMN = 1,
KEEPCACHED_ROW = 2,
KEEPCACHED_MATRIX = 4,
KEEPCACHED_SOS = 5,
KEEPCACHED_RESULTS = 8,
KEEPCACHED_PROBLEM = KEEPCACHED_COLUMN | KEEPCACHED_ROW | KEEPCACHED_MATRIX | KEEPCACHED_SOS,
KEEPCACHED_ALL = KEEPCACHED_PROBLEM | KEEPCACHED_RESULTS,
FREECACHED_COLUMN = KEEPCACHED_PROBLEM & !KEEPCACHED_COLUMN & !KEEPCACHED_SOS,
FREECACHED_ROW = KEEPCACHED_PROBLEM & !KEEPCACHED_ROW,
FREECACHED_MATRIX = KEEPCACHED_PROBLEM & !KEEPCACHED_MATRIX,
FREECACHED_RESULTS = KEEPCACHED_ALL & !KEEPCACHED_RESULTS
} |
Public Member Functions |
|
Querying a problem that has no data associated with it will result in zeros for the number of rows and columns, and NULL pointers from the methods that return vectors.
Const pointers returned from any data-query method are valid as long as the data is unchanged and the solver is not called.
|
int | getNumCols () const |
| Get number of columns.
|
int | getNumRows () const |
| Get number of rows.
|
int | getNumElements () const |
| Get number of nonzero elements.
|
const double * | getColLower () const |
| Get pointer to array[getNumCols()] of column lower bounds.
|
const double * | getColUpper () const |
| Get pointer to array[getNumCols()] of column upper bounds.
|
const char * | getRowSense () const |
const double * | getRightHandSide () const |
const double * | getRowRange () const |
const double * | getRowLower () const |
| Get pointer to array[getNumRows()] of row lower bounds.
|
const double * | getRowUpper () const |
| Get pointer to array[getNumRows()] of row upper bounds.
|
const double * | getObjCoefficients () const |
| Get pointer to array[getNumCols()] of objective function coefficients.
|
const double * | getObj2Coefficients () const |
double | getObjSense () const |
| Get objective function sense (1 for min (default), -1 for max).
|
double | getMatCoeff (int i, int j) |
| Return MatrixDouble element by row and column index.
|
int | getNumberOfSpeciallyOrderedSets () const |
| Return the number of specially ordered sets.
|
SpeciallyOrderedSet * | getSpeciallyOrderedSet (int index) const |
| Return a pointer to indicated specially ordered set.
|
int | getNumberOfIntegerSets () const |
| Return the number of integer sets.
|
SpeciallyOrderedSet * | getIntegerSet (int index) const |
| Return a pointer to indicated integer set.
|
bool | isContinuous (int colIndex) const |
| Return true if variable is continuous.
|
bool | isBinary (int colIndex) const |
| Return true if variable is binary.
|
bool | isInteger (int colIndex) const |
bool | isIntegerNonBinary (int colIndex) const |
| Return true if variable is general integer.
|
bool | isFreeBinary (int colIndex) const |
| Return true if variable is binary and not fixed at either bound.
|
const CoinPackedMatrix * | getMatrixByRow () const |
| Get pointer to row-wise copy of MatrixDouble.
|
const CoinPackedMatrix * | getMatrixByCol () const |
| Get pointer to column-wise copy of MatrixDouble.
|
double | getInfinity () const |
| Get solver's value for infinity.
|
double | getTolerance () const |
| Get the tolerance/precision of variables as a double value.
|
int | getNumberOfDecimals () const |
| Get the tolerance/precision of variables as number of decimals.
|
bool | getTestFlag () const |
| Get test flag.
|
int | getNumberOfRowsToDrop () const |
| Get the number of Rows which are zero and thus can be deleted.
|
int * | getRowsToDrop () const |
| Get indices of rows which are zero and thus can be deleted.
|
int | getNumberOfColsToDrop () const |
| Get the number of Columns which are zero and thus can be deleted.
|
int * | getColsToDrop () const |
| Get indices of columns which are zero and thus can be deleted.
|
int | getActivityType (int index) const |
| Get component index of activity types.
|
const CoinPackedMatrix * | getActivityType () const |
| Get a pointer to activity types; needed in copy constructor.
|
|
CoinPackedMatrix | getInfoBlock () const |
| Get the info block about the tableau structure.
|
|
virtual void | setObjCoeff (int elementIndex, double elementValue) |
virtual void | setObj2Coeff (int elementIndex, double elementValue) |
virtual void | setColLower (int elementIndex, double elementValue) |
virtual void | setColUpper (int elementIndex, double elementValue) |
virtual void | setRowLower (int elementIndex, double elementValue) const |
virtual void | setRowUpper (int elementIndex, double elementValue) const |
virtual void | setRowType (int index, char sense, double rightHandSide, double range) const |
virtual void | setRightHandSide (int index, double elementValue) const |
virtual void | setObjSense (double s) |
| Set the objective function sense. (1 for min (default), -1 for max).
|
virtual void | setNumberOfSpeciallyOrderedSets (int numberofsos_) |
| Set the number of specially ordered sets.
|
virtual void | setNumberOfIntegerSets (int numberofintegersets_) |
| Set the number of integer Sets.
|
virtual void | setMatCoeff (int i, int j, double coeff) |
| Set the (i,j)-th coefficient in constraint MatrixDouble.
|
virtual int | setActivityType (int index, double value) |
| Set coefficients of activity Type.
|
|
virtual void | setContinuous (int index) |
virtual void | setInteger (int index) |
virtual void | setColName (char **colname) |
|
virtual void | setInfinity (double infinity) |
virtual void | setTolerance (double eps_) |
| Set the tolerance/precision of variables as a double value.
|
virtual void | setNumberOfDecimals (int numberofdecimals_) |
| Set the tolerance/precision of variables as number of decimals.
|
virtual void | setTestFlag (bool test) |
| Set test flag.
|
|
virtual void | setSpeciallyOrderedSets (int numberOfSos, SpeciallyOrderedSet *speciallyOrdSets) |
| Set the specially ordered (integer) sets.
|
virtual void | setIntegerSets (int numberOfIntegerSets, SpeciallyOrderedSet *integerSets) |
| Set the integer sets.
|
|
virtual void | setInfoBlock (const CoinPackedMatrix infoBlock_) |
| Set the info block about tableau structure.
|
|
virtual void | loadProblem (const CoinPackedMatrix &MatrixDouble, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng) |
|
virtual void | findEmptyRowsAndCols () |
| find the empty Rows and columns, i.e. rows and columns equal to zero
|
|
int | read (FILE *datStream, int &istransposed) |
| Reads mtx file.
|
int | write (FILE *file, int istransposed) const |
| Reads mtx file.
|
virtual void | output (string name) |
| some other write to file function
|
|
| AgentProblem () |
| Default constructor.
|
| AgentProblem (const AgentProblem &problem) |
| Copy constructor.
|
AgentProblem & | operator= (const AgentProblem &rhs) |
| ~AgentProblem () |
| Destructor.
|
Protected Member Functions |
|
void | convertBoundToSense (const double lower, const double upper, char &sense, double &right, double &range) const |
void | convertSenseToBound (const char sense, const double right, const double range, double &lower, double &upper) const |
The auxiliary class AgentProblem is an extended data structure which initially contains the decision problem (i.e. a MIP(Mixed Integer Problems) ) of an agent which is passed to the OsiSolverInterface to be solved. Finally the MIPs solution should be passed back from the OsiSolverInterface to the agent by the MipHandler using the class AgentSolution. The Interface between AgentF and OsiSolverInterface (meassage handling) is the class MipHandler. The structure and contents of this class corresponds essentially to the structure and contents of an mtx file. An mtx file is identical to the first part of a (new)dat file.