#include <CoinModel.hpp>
Collaboration diagram for CoinModel:

Public Member Functions | |
| int | computeAssociated (double *associated) |
| Fills in all associated - returning number of errors. | |
| CoinPackedMatrix * | quadraticRow (int rowNumber, double *linear, int &numberBad) const |
| Gets correct form for a quadratic row - user to delete If row is not quadratic then returns which other variables are involved with tiny (1.0e-100) elements and count of total number of variables which could not be put in quadratic form. | |
| void | replaceQuadraticRow (int rowNumber, const double *linear, const CoinPackedMatrix *quadraticPart) |
| Replaces a quadratic row. | |
| CoinModel * | reorder (const char *mark) const |
| If possible return a model where if all variables marked nonzero are fixed the problem will be linear. | |
| int | expandKnapsack (int knapsackRow, int &numberOutput, double *buildObj, CoinBigIndex *buildStart, int *buildRow, double *buildElement, int reConstruct=-1) const |
| Expands out all possible combinations for a knapsack If buildObj NULL then just computes space needed - returns number elements On entry numberOutput is maximum allowed, on exit it is number needed or -1 (as will be number elements) if maximum exceeded. | |
| void | setCutMarker (int size, const int *marker) |
| Sets cut marker array. | |
| void | setPriorities (int size, const int *priorities) |
| Sets priority array. | |
| const int * | priorities () const |
| priorities (given for all columns (-1 if not integer) | |
Useful methods for building model | |
| void | addRow (int numberInRow, const int *columns, const double *elements, double rowLower=-COIN_DBL_MAX, double rowUpper=COIN_DBL_MAX, const char *name=NULL) |
| add a row - numberInRow may be zero | |
| void | addColumn (int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objectiveValue=0.0, const char *name=NULL, bool isInteger=false) |
| add a column - numberInColumn may be zero */ | |
| void | addCol (int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objectiveValue=0.0, const char *name=NULL, bool isInteger=false) |
| add a column - numberInColumn may be zero */ | |
| void | operator() (int i, int j, double value) |
| Sets value for row i and column j. | |
| void | setElement (int i, int j, double value) |
| Sets value for row i and column j. | |
| int | getRow (int whichRow, int *column, double *element) |
| Gets sorted row - user must provide enough space (easiest is allocate number of columns). | |
| int | getColumn (int whichColumn, int *column, double *element) |
| Gets sorted column - user must provide enough space (easiest is allocate number of rows). | |
| void | setQuadraticElement (int i, int j, double value) |
| Sets quadratic value for column i and j. | |
| void | operator() (int i, int j, const char *value) |
| Sets value for row i and column j as string. | |
| void | setElement (int i, int j, const char *value) |
| Sets value for row i and column j as string. | |
| int | associateElement (const char *stringValue, double value) |
| Associates a string with a value. Returns string id (or -1 if does not exist). | |
| void | setRowLower (int whichRow, double rowLower) |
| Sets rowLower (if row does not exist then all rows up to this are defined with default values and no elements). | |
| void | setRowUpper (int whichRow, double rowUpper) |
| Sets rowUpper (if row does not exist then all rows up to this are defined with default values and no elements). | |
| void | setRowBounds (int whichRow, double rowLower, double rowUpper) |
| Sets rowLower and rowUpper (if row does not exist then all rows up to this are defined with default values and no elements). | |
| void | setRowName (int whichRow, const char *rowName) |
| Sets name (if row does not exist then all rows up to this are defined with default values and no elements). | |
| void | setColumnLower (int whichColumn, double columnLower) |
| Sets columnLower (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnUpper (int whichColumn, double columnUpper) |
| Sets columnUpper (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnBounds (int whichColumn, double columnLower, double columnUpper) |
| Sets columnLower and columnUpper (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnObjective (int whichColumn, double columnObjective) |
| Sets columnObjective (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnName (int whichColumn, const char *columnName) |
| Sets name (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnIsInteger (int whichColumn, bool columnIsInteger) |
| Sets integer state (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setObjective (int whichColumn, double columnObjective) |
| Sets columnObjective (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setIsInteger (int whichColumn, bool columnIsInteger) |
| Sets integer state (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setInteger (int whichColumn) |
| Sets integer (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setContinuous (int whichColumn) |
| Sets continuous (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColLower (int whichColumn, double columnLower) |
| Sets columnLower (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColUpper (int whichColumn, double columnUpper) |
| Sets columnUpper (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColBounds (int whichColumn, double columnLower, double columnUpper) |
| Sets columnLower and columnUpper (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColObjective (int whichColumn, double columnObjective) |
| Sets columnObjective (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColName (int whichColumn, const char *columnName) |
| Sets name (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColIsInteger (int whichColumn, bool columnIsInteger) |
| Sets integer (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setRowLower (int whichRow, const char *rowLower) |
| Sets rowLower (if row does not exist then all rows up to this are defined with default values and no elements). | |
| void | setRowUpper (int whichRow, const char *rowUpper) |
| Sets rowUpper (if row does not exist then all rows up to this are defined with default values and no elements). | |
| void | setColumnLower (int whichColumn, const char *columnLower) |
| Sets columnLower (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnUpper (int whichColumn, const char *columnUpper) |
| Sets columnUpper (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnObjective (int whichColumn, const char *columnObjective) |
| Sets columnObjective (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setColumnIsInteger (int whichColumn, const char *columnIsInteger) |
| Sets integer (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setObjective (int whichColumn, const char *columnObjective) |
| Sets columnObjective (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | setIsInteger (int whichColumn, const char *columnIsInteger) |
| Sets integer (if column does not exist then all columns up to this are defined with default values and no elements). | |
| void | deleteRow (int whichRow) |
| Deletes all entries in row and bounds. | |
| void | deleteColumn (int whichColumn) |
| Deletes all entries in column and bounds and objective. | |
| void | deleteCol (int whichColumn) |
| Deletes all entries in column and bounds. | |
| int | deleteElement (int row, int column) |
| Takes element out of matrix - returning position (<0 if not there);. | |
| void | deleteThisElement (int row, int column, int position) |
| Takes element out of matrix when position known. | |
| int | packRows () |
| Packs down all rows i.e. | |
| int | packColumns () |
| Packs down all columns i.e. | |
| int | packCols () |
| Packs down all columns i.e. | |
| int | pack () |
| Packs down all rows and columns. | |
| int | writeMps (const char *filename, int compression=0, int formatType=0, int numberAcross=2, bool keepStrings=false) |
| Write the problem in MPS format to a file with the given filename. | |
| int | differentModel (CoinModel &other, bool ignoreNames) |
| Check two models against each other. | |
For getting information | |
| int | numberRows () const |
| Return number of rows or maximum found so far. | |
| int | numberColumns () const |
| Return number of columns or maximum found so far. | |
| CoinBigIndex | numberElements () const |
| Return number of elements. | |
| const CoinModelTriple * | elements () const |
| Return elements as triples. | |
| double | operator() (int i, int j) const |
| Returns value for row i and column j. | |
| double | getElement (int i, int j) const |
| Returns value for row i and column j. | |
| double | operator() (const char *rowName, const char *columnName) const |
| Returns value for row rowName and column columnName. | |
| double | getElement (const char *rowName, const char *columnName) const |
| Returns value for row rowName and column columnName. | |
| double | getQuadraticElement (int i, int j) const |
| Returns quadratic value for columns i and j. | |
| const char * | getElementAsString (int i, int j) const |
| Returns value for row i and column j as string. | |
| double * | pointer (int i, int j) const |
| Returns pointer to element for row i column j. | |
| int | position (int i, int j) const |
| Returns position in elements for row i column j. | |
| CoinModelLink | firstInRow (int whichRow) const |
| Returns first element in given row - index is -1 if none. | |
| CoinModelLink | lastInRow (int whichRow) const |
| Returns last element in given row - index is -1 if none. | |
| CoinModelLink | firstInColumn (int whichColumn) const |
| Returns first element in given column - index is -1 if none. | |
| CoinModelLink | lastInColumn (int whichColumn) const |
| Returns last element in given column - index is -1 if none. | |
| CoinModelLink | next (CoinModelLink ¤t) const |
| Returns next element in current row or column - index is -1 if none. | |
| CoinModelLink | previous (CoinModelLink ¤t) const |
| Returns previous element in current row or column - index is -1 if none. | |
| CoinModelLink | firstInQuadraticColumn (int whichColumn) const |
| Returns first element in given quadratic column - index is -1 if none. | |
| CoinModelLink | lastInQuadraticColumn (int whichColumn) const |
| Returns last element in given quadratic column - index is -1 if none. | |
| double | getRowLower (int whichRow) const |
| Gets rowLower (if row does not exist then -COIN_DBL_MAX). | |
| double | getRowUpper (int whichRow) const |
| Gets rowUpper (if row does not exist then +COIN_DBL_MAX). | |
| const char * | getRowName (int whichRow) const |
| Gets name (if row does not exist then ""). | |
| double | rowLower (int whichRow) const |
| Return number of rows or maximum found so far. | |
| double | rowUpper (int whichRow) const |
| Gets rowUpper (if row does not exist then COIN_DBL_MAX). | |
| const char * | rowName (int whichRow) const |
| Gets name (if row does not exist then ""). | |
| double | getColumnLower (int whichColumn) const |
| Gets columnLower (if column does not exist then 0.0). | |
| double | getColumnUpper (int whichColumn) const |
| Gets columnUpper (if column does not exist then COIN_DBL_MAX). | |
| double | getColumnObjective (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| const char * | getColumnName (int whichColumn) const |
| Gets name (if column does not exist then ""). | |
| bool | getColumnIsInteger (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| double | columnLower (int whichColumn) const |
| Gets columnLower (if column does not exist then 0.0). | |
| double | columnUpper (int whichColumn) const |
| Gets columnUpper (if column does not exist then COIN_DBL_MAX). | |
| double | columnObjective (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| double | objective (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| const char * | columnName (int whichColumn) const |
| Gets name (if column does not exist then ""). | |
| bool | columnIsInteger (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| bool | isInteger (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| double | getColLower (int whichColumn) const |
| Gets columnLower (if column does not exist then 0.0). | |
| double | getColUpper (int whichColumn) const |
| Gets columnUpper (if column does not exist then COIN_DBL_MAX). | |
| double | getColObjective (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| const char * | getColName (int whichColumn) const |
| Gets name (if column does not exist then ""). | |
| bool | getColIsInteger (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| const char * | getRowLowerAsString (int whichRow) const |
| Gets rowLower (if row does not exist then -COIN_DBL_MAX). | |
| const char * | getRowUpperAsString (int whichRow) const |
| Gets rowUpper (if row does not exist then +COIN_DBL_MAX). | |
| const char * | rowLowerAsString (int whichRow) const |
| Return number of rows or maximum found so far. | |
| const char * | rowUpperAsString (int whichRow) const |
| Gets rowUpper (if row does not exist then COIN_DBL_MAX). | |
| const char * | getColumnLowerAsString (int whichColumn) const |
| Gets columnLower (if column does not exist then 0.0). | |
| const char * | getColumnUpperAsString (int whichColumn) const |
| Gets columnUpper (if column does not exist then COIN_DBL_MAX). | |
| const char * | getColumnObjectiveAsString (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| const char * | getColumnIsIntegerAsString (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| const char * | columnLowerAsString (int whichColumn) const |
| Gets columnLower (if column does not exist then 0.0). | |
| const char * | columnUpperAsString (int whichColumn) const |
| Gets columnUpper (if column does not exist then COIN_DBL_MAX). | |
| const char * | columnObjectiveAsString (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| const char * | objectiveAsString (int whichColumn) const |
| Gets columnObjective (if column does not exist then 0.0). | |
| const char * | columnIsIntegerAsString (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| const char * | isIntegerAsString (int whichColumn) const |
| Gets if integer (if column does not exist then false). | |
| int | row (const char *rowName) const |
| Row index from row name (-1 if no names or no match). | |
| int | column (const char *columnName) const |
| Column index from column name (-1 if no names or no match). | |
| double | objectiveOffset () const |
| Returns the (constant) objective offset This is the RHS entry for the objective row. | |
| void | setObjectiveOffset (double value) |
| Set objective offset. | |
| int | logLevel () const |
| Get print level 0 - off, 1 - errors, 2 - more. | |
| void | setLogLevel (int value) |
| Set print level 0 - off, 1 - errors, 2 - more. | |
| const char * | getProblemName () const |
| Return the problem name. | |
| void | setProblemName (const char *name) |
| Set problem name. | |
| int | type () const |
| Returns type. | |
| double | unsetValue () const |
| returns unset value | |
| int | createPackedMatrix (CoinPackedMatrix &matrix, const double *associated) |
| Creates a packed matrix - return number of errors. | |
| int | countPlusMinusOne (CoinBigIndex *startPositive, CoinBigIndex *startNegative, const double *associated) |
| Fills in startPositive and startNegative with counts for +-1 matrix. | |
| void | createPlusMinusOne (CoinBigIndex *startPositive, CoinBigIndex *startNegative, int *indices, const double *associated) |
| Creates +-1 matrix given startPositive and startNegative counts for +-1 matrix. | |
| int | createArrays (double *&rowLower, double *&rowUpper, double *&columnLower, double *&columnUpper, double *&objective, int *&integerType, double *&associated) |
| Creates copies of various arrays - return number of errors. | |
| bool | stringsExist () const |
| Says if strings exist. | |
| const CoinModelHash * | stringArray () const |
| Return string array. | |
| double * | associatedArray () const |
| Returns associated array. | |
| double * | rowLowerArray () const |
| Return rowLower array. | |
| double * | rowUpperArray () const |
| Return rowUpper array. | |
| double * | columnLowerArray () const |
| Return columnLower array. | |
| double * | columnUpperArray () const |
| Return columnUpper array. | |
| double * | objectiveArray () const |
| Return objective array. | |
| int * | integerTypeArray () const |
| Return integerType array. | |
| const CoinModelHash * | rowNames () const |
| Return row names array. | |
| const CoinModelHash * | columnNames () const |
| Return column names array. | |
| const int * | cutMarker () const |
| Returns array of 0 or nonzero if can be a cut (or returns NULL). | |
| double | optimizationDirection () const |
| Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore. | |
| void | setOptimizationDirection (double value) |
| Set direction of optimization (1 - minimize, -1 - maximize, 0 - ignore. | |
| void * | moreInfo () const |
| Return pointer to more information. | |
| void | setMoreInfo (void *info) |
| Set pointer to more information. | |
Constructors, destructor | |
| CoinModel () | |
| Default constructor. | |
| CoinModel (const char *fileName, int allowStrings=0) | |
| Read a problem in MPS or GAMS format from the given filename. | |
| CoinModel (int nonLinear, const char *fileName, const void *info) | |
| Read a problem from AMPL nl file NOTE - as I can't work out configure etc the source code is in Cbc_ampl.cpp! | |
| ~CoinModel () | |
| Destructor. | |
Copy method | |
| CoinModel (const CoinModel &) | |
| The copy constructor. | |
| CoinModel & | operator= (const CoinModel &) |
| = | |
For debug | |
| void | validateLinks () const |
| Checks that links are consistent. | |
Private Member Functions | |
| void | resize (int maximumRows, int maximumColumns, int maximumElements) |
| Resize. | |
| void | fillRows (int which, bool forceCreation, bool fromAddRow=false) |
| Fill in default row information. | |
| void | fillColumns (int which, bool forceCreation, bool fromAddColumn=false) |
| Fill in default column information. | |
| void | fillList (int which, CoinModelLinkedList &list, int type) const |
| Fill in default linked list information (1= row, 2 = column) Marked as const as list is mutable. | |
| void | createList (int type) const |
| Create a linked list and synchronize free type 1 for row 2 for column Marked as const as list is mutable. | |
| int | addString (const char *string) |
| Adds one string, returns index. | |
| double | getDoubleFromString (CoinYacc &info, const char *string) |
| Gets a double from a string possibly containing named strings, returns unset if not found. | |
| void | freeStringMemory (CoinYacc &info) |
| Frees value memory. | |
| void | gdb (int nonLinear, const char *fileName, const void *info) |
| Read a problem from AMPL nl file so not constructor so gdb will work. | |
| int | decodeBit (char *phrase, char *&nextPhrase, double &coefficient, bool ifFirst) const |
| returns jColumn (-2 if linear term, -1 if unknown) and coefficient | |
Private Attributes | |
Data members | |
| int | numberRows_ |
| Current number of rows. | |
| int | maximumRows_ |
| Maximum number of rows. | |
| int | numberColumns_ |
| Current number of columns. | |
| int | maximumColumns_ |
| Maximum number of columns. | |
| int | numberElements_ |
| Current number of elements. | |
| int | maximumElements_ |
| Maximum number of elements. | |
| int | numberQuadraticElements_ |
| Current number of quadratic elements. | |
| int | maximumQuadraticElements_ |
| Maximum number of quadratic elements. | |
| double | optimizationDirection_ |
| Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore. | |
| double | objectiveOffset_ |
| Objective offset to be passed on. | |
| char * | problemName_ |
| Problem name. | |
| double * | rowLower_ |
| Row lower. | |
| double * | rowUpper_ |
| Row upper. | |
| CoinModelHash | rowName_ |
| Row names. | |
| int * | rowType_ |
| Row types. | |
| double * | objective_ |
| Objective. | |
| double * | columnLower_ |
| Column Lower. | |
| double * | columnUpper_ |
| Column Upper. | |
| CoinModelHash | columnName_ |
| Column names. | |
| int * | integerType_ |
| Integer information. | |
| CoinModelHash | string_ |
| Strings. | |
| int * | columnType_ |
| Column types. | |
| int * | start_ |
| If simple then start of each row/column. | |
| CoinModelTriple * | elements_ |
| Actual elements. | |
| CoinModelHash2 | hashElements_ |
| Hash for elements. | |
| CoinModelLinkedList | rowList_ |
| Linked list for rows. | |
| CoinModelLinkedList | columnList_ |
| Linked list for columns. | |
| CoinModelTriple * | quadraticElements_ |
| Actual quadratic elements (always linked lists). | |
| CoinModelHash2 | hashQuadraticElements_ |
| Hash for quadratic elements. | |
| int * | sortIndices_ |
| Array for sorting indices. | |
| double * | sortElements_ |
| Array for sorting elements. | |
| int | sortSize_ |
| Size of sort arrays. | |
| CoinModelLinkedList | quadraticRowList_ |
| Linked list for quadratic rows. | |
| CoinModelLinkedList | quadraticColumnList_ |
| Linked list for quadratic columns. | |
| int | sizeAssociated_ |
| Size of associated values. | |
| double * | associated_ |
| Associated values. | |
| int | numberSOS_ |
| Number of SOS - all these are done in one go e.g. from ampl. | |
| int * | startSOS_ |
| SOS starts. | |
| int * | memberSOS_ |
| SOS members. | |
| int * | typeSOS_ |
| SOS type. | |
| int * | prioritySOS_ |
| SOS priority. | |
| double * | referenceSOS_ |
| SOS reference. | |
| int * | priority_ |
| priorities (given for all columns (-1 if not integer) | |
| int * | cut_ |
| Nonzero if row is cut - done in one go e.g. from ampl. | |
| void * | moreInfo_ |
| Pointer to more information. | |
| int | logLevel_ |
| Print level. | |
| int | type_ |
| Type of build - -1 unset, 0 for row, 1 for column, 2 linked. | |
| int | links_ |
| Links present (could be tested by sizes of objects) 0 - none, 1 - row links, 2 - column links, 3 - both. | |
It has to be passed across to ClpModel or OsiSolverInterface by addRows, addCol(umn)s or loadProblem.
It may have up to four parts - 1) A matrix of doubles (or strings - see note A) 2) Column information including integer information and names 3) Row information including names 4) Quadratic objective (not implemented - but see A)
This class is meant to make it more efficient to build a model. It is at its most efficient when all additions are done as addRow or as addCol but not mixed. If only 1 and 2 exist then solver.addColumns may be used to pass to solver, if only 1 and 3 exist then solver.addRows may be used. Otherwise solver.loadProblem must be used.
If addRows and addColumns are mixed or if individual elements are set then the speed will drop to some extent and more memory will be used.
It is also possible to iterate over existing elements and to access columns and rows by name. Again each of these use memory and cpu time. However memory is unlikely to be critical as most algorithms will use much more.
Notes: A) Although this could be used to pass nonlinear information around the only use at present is to have named values e.g. value1 which can then be set to a value after model is created. I have no idea whether that could be useful but I thought it might be fun. Quadratic terms are allowed in strings! A solver could try and use this if so - the convention is that 0.5* quadratic is stored
B) This class could be useful for modeling.
Definition at line 45 of file CoinModel.hpp.
| CoinModel::CoinModel | ( | ) |
Default constructor.
| CoinModel::CoinModel | ( | const char * | fileName, | |
| int | allowStrings = 0 | |||
| ) |
Read a problem in MPS or GAMS format from the given filename.
| CoinModel::CoinModel | ( | int | nonLinear, | |
| const char * | fileName, | |||
| const void * | info | |||
| ) |
Read a problem from AMPL nl file NOTE - as I can't work out configure etc the source code is in Cbc_ampl.cpp!
| CoinModel::~CoinModel | ( | ) |
Destructor.
| CoinModel::CoinModel | ( | const CoinModel & | ) |
The copy constructor.
| void CoinModel::addRow | ( | int | numberInRow, | |
| const int * | columns, | |||
| const double * | elements, | |||
| double | rowLower = -COIN_DBL_MAX, |
|||
| double | rowUpper = COIN_DBL_MAX, |
|||
| const char * | name = NULL | |||
| ) |
add a row - numberInRow may be zero
| void CoinModel::addColumn | ( | int | numberInColumn, | |
| const int * | rows, | |||
| const double * | elements, | |||
| double | columnLower = 0.0, |
|||
| double | columnUpper = COIN_DBL_MAX, |
|||
| double | objectiveValue = 0.0, |
|||
| const char * | name = NULL, |
|||
| bool | isInteger = false | |||
| ) |
| void CoinModel::addCol | ( | int | numberInColumn, | |
| const int * | rows, | |||
| const double * | elements, | |||
| double | columnLower = 0.0, |
|||
| double | columnUpper = COIN_DBL_MAX, |
|||
| double | objectiveValue = 0.0, |
|||
| const char * | name = NULL, |
|||
| bool | isInteger = false | |||
| ) | [inline] |
add a column - numberInColumn may be zero */
Definition at line 61 of file CoinModel.hpp.
References addColumn(), columnLower(), columnUpper(), and isInteger().
| void CoinModel::operator() | ( | int | i, | |
| int | j, | |||
| double | value | |||
| ) | [inline] |
Sets value for row i and column j.
Definition at line 69 of file CoinModel.hpp.
References setElement().
| void CoinModel::setElement | ( | int | i, | |
| int | j, | |||
| double | value | |||
| ) |
| int CoinModel::getRow | ( | int | whichRow, | |
| int * | column, | |||
| double * | element | |||
| ) |
Gets sorted row - user must provide enough space (easiest is allocate number of columns).
If column or element NULL then just returns number Returns number of elements
| int CoinModel::getColumn | ( | int | whichColumn, | |
| int * | column, | |||
| double * | element | |||
| ) |
Gets sorted column - user must provide enough space (easiest is allocate number of rows).
If row or element NULL then just returns number Returns number of elements
| void CoinModel::setQuadraticElement | ( | int | i, | |
| int | j, | |||
| double | value | |||
| ) |
Sets quadratic value for column i and j.
| void CoinModel::operator() | ( | int | i, | |
| int | j, | |||
| const char * | value | |||
| ) | [inline] |
Sets value for row i and column j as string.
Definition at line 88 of file CoinModel.hpp.
References setElement().
| void CoinModel::setElement | ( | int | i, | |
| int | j, | |||
| const char * | value | |||
| ) |
Sets value for row i and column j as string.
| int CoinModel::associateElement | ( | const char * | stringValue, | |
| double | value | |||
| ) |
Associates a string with a value. Returns string id (or -1 if does not exist).
| void CoinModel::setRowLower | ( | int | whichRow, | |
| double | rowLower | |||
| ) |
Sets rowLower (if row does not exist then all rows up to this are defined with default values and no elements).
| void CoinModel::setRowUpper | ( | int | whichRow, | |
| double | rowUpper | |||
| ) |
Sets rowUpper (if row does not exist then all rows up to this are defined with default values and no elements).
| void CoinModel::setRowBounds | ( | int | whichRow, | |
| double | rowLower, | |||
| double | rowUpper | |||
| ) |
Sets rowLower and rowUpper (if row does not exist then all rows up to this are defined with default values and no elements).
| void CoinModel::setRowName | ( | int | whichRow, | |
| const char * | rowName | |||
| ) |
Sets name (if row does not exist then all rows up to this are defined with default values and no elements).
| void CoinModel::setColumnLower | ( | int | whichColumn, | |
| double | columnLower | |||
| ) |
Sets columnLower (if column does not exist then all columns up to this are defined with default values and no elements).
Referenced by setColLower().
| void CoinModel::setColumnUpper | ( | int | whichColumn, | |
| double | columnUpper | |||
| ) |
Sets columnUpper (if column does not exist then all columns up to this are defined with default values and no elements).
Referenced by setColUpper().
| void CoinModel::setColumnBounds | ( | int | whichColumn, | |
| double | columnLower, | |||
| double | columnUpper | |||
| ) |
Sets columnLower and columnUpper (if column does not exist then all columns up to this are defined with default values and no elements).
Referenced by setColBounds().
| void CoinModel::setColumnObjective | ( | int | whichColumn, | |
| double | columnObjective | |||
| ) |
Sets columnObjective (if column does not exist then all columns up to this are defined with default values and no elements).
Referenced by setColObjective(), and setObjective().
| void CoinModel::setColumnName | ( | int | whichColumn, | |
| const char * | columnName | |||
| ) |
Sets name (if column does not exist then all columns up to this are defined with default values and no elements).
Referenced by setColName().
| void CoinModel::setColumnIsInteger | ( | int | whichColumn, | |
| bool | columnIsInteger | |||
| ) |
Sets integer state (if column does not exist then all columns up to this are defined with default values and no elements).
Referenced by setColIsInteger(), setContinuous(), setInteger(), and setIsInteger().
| void CoinModel::setObjective | ( | int | whichColumn, |
| double&nb |