Loading...
Searching...
No Matches
ClpModel.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2002, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef ClpModel_H
#define ClpModel_H
#include "ClpConfig.h"
#include <iostream>
#include <cassert>
#include <cmath>
#include <vector>
#include <string>
//#ifndef COIN_USE_CLP
//#define COIN_USE_CLP
//#endif
#include "ClpPackedMatrix.hpp"
#include "CoinMessageHandler.hpp"
#include "CoinHelperFunctions.hpp"
#include "CoinTypes.hpp"
#include "CoinFinite.hpp"
#include "ClpParameters.hpp"
#include "ClpObjective.hpp"
class ClpEventHandler;
class CoinBuild;
class CoinModel;
class ClpModel {
public:
ClpModel(bool emptyMessages = false);
ClpModel(const ClpModel &rhs, int scalingMode = -1);
ClpModel &operator=(const ClpModel &rhs);
ClpModel(const ClpModel *wholeModel,
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns,
bool dropNames = true, bool dropIntegers = true);
~ClpModel();
void loadProblem(const ClpMatrixBase &matrix,
const double *collb, const double *colub,
const double *obj,
const double *rowlb, const double *rowub,
const double *rowObjective = NULL);
void loadProblem(const CoinPackedMatrix &matrix,
const double *collb, const double *colub,
const double *obj,
const double *rowlb, const double *rowub,
const double *rowObjective = NULL);
void loadProblem(const int numcols, const int numrows,
const CoinBigIndex *start, const int *index,
const double *value,
const double *collb, const double *colub,
const double *obj,
const double *rowlb, const double *rowub,
const double *rowObjective = NULL);
int loadProblem(CoinModel &modelObject, bool tryPlusMinusOne = false);
void loadProblem(const int numcols, const int numrows,
const CoinBigIndex *start, const int *index,
const double *value, const int *length,
const double *collb, const double *colub,
const double *obj,
const double *rowlb, const double *rowub,
const double *rowObjective = NULL);
void loadQuadraticObjective(const int numberColumns,
const CoinBigIndex *start,
const int *column, const double *element);
void loadQuadraticObjective(const CoinPackedMatrix &matrix);
void deleteQuadraticObjective();
void setRowObjective(const double *rowObjective);
int readMps(const char *filename,
bool keepNames = false,
bool ignoreErrors = false);
int readGMPL(const char *filename, const char *dataName,
bool keepNames = false);
void copyInIntegerInformation(const char *information);
void deleteIntegerInformation();
void setContinuous(int index);
void setInteger(int index);
bool isInteger(int index) const;
void resize(int newNumberRows, int newNumberColumns);
private:
void synchronizeMatrix();
public:
void deleteRows(int number, const int *which);
void addRow(int numberInRow, const int *columns,
const double *elements, double rowLower = -COIN_DBL_MAX,
double rowUpper = COIN_DBL_MAX);
void addRows(int number, const double *rowLower,
const double *rowUpper,
const CoinBigIndex *rowStarts, const int *columns,
const double *elements);
void addRows(int number, const double *rowLower,
const double *rowUpper,
const CoinBigIndex *rowStarts, const int *rowLengths,
const int *columns,
const double *elements);
#ifndef CLP_NO_VECTOR
void addRows(int number, const double *rowLower,
const double *rowUpper,
const CoinPackedVectorBase *const *rows);
#endif
int addRows(const CoinBuild &buildObject, bool tryPlusMinusOne = false,
bool checkDuplicates = true);
int addRows(CoinModel &modelObject, bool tryPlusMinusOne = false,
bool checkDuplicates = true);
void deleteColumns(int number, const int *which);
void deleteRowsAndColumns(int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns);
void addColumn(int numberInColumn,
const int *rows,
const double *elements,
double columnLower = 0.0,
double columnUpper = COIN_DBL_MAX,
double objective = 0.0);
void addColumns(int number, const double *columnLower,
const double *columnUpper,
const double *objective,
const CoinBigIndex *columnStarts, const int *rows,
const double *elements);
void addColumns(int number, const double *columnLower,
const double *columnUpper,
const double *objective,
const CoinBigIndex *columnStarts, const int *columnLengths,
const int *rows,
const double *elements);
#ifndef CLP_NO_VECTOR
void addColumns(int number, const double *columnLower,
const double *columnUpper,
const double *objective,
const CoinPackedVectorBase *const *columns);
#endif
int addColumns(const CoinBuild &buildObject, bool tryPlusMinusOne = false,
bool checkDuplicates = true);
int addColumns(CoinModel &modelObject, bool tryPlusMinusOne = false,
bool checkDuplicates = true);
inline void modifyCoefficient(int row, int column, double newElement,
bool keepZero = false)
{
matrix_->modifyCoefficient(row, column, newElement, keepZero);
}
void chgRowLower(const double *rowLower);
void chgRowUpper(const double *rowUpper);
void chgColumnLower(const double *columnLower);
void chgColumnUpper(const double *columnUpper);
void chgObjCoefficients(const double *objIn);
void borrowModel(ClpModel &otherModel);
void returnModel(ClpModel &otherModel);
void createEmptyMatrix();
CoinBigIndex cleanMatrix(double threshold = 1.0e-20);
void copy(const ClpMatrixBase *from, ClpMatrixBase *&to);
#ifndef CLP_NO_STD
void dropNames();
void copyNames(const std::vector< std::string > &rowNames,
const std::vector< std::string > &columnNames);
void copyRowNames(const std::vector< std::string > &rowNames, int first, int last);
void copyColumnNames(const std::vector< std::string > &columnNames, int first, int last);
void copyRowNames(const char *const *rowNames, int first, int last);
void copyColumnNames(const char *const *columnNames, int first, int last);
void setRowName(int rowIndex, std::string &name);
void setColumnName(int colIndex, std::string &name);
#endif
int findNetwork(char *rotate, double fractionNeeded = 0.75);
CoinModel *createCoinModel() const;
int writeMps(const char *filename,
int formatType = 0, int numberAcross = 2,
double objSense = 0.0) const;
inline int numberRows() const
{
return numberRows_;
}
inline int getNumRows() const
{
return numberRows_;
}
inline int getNumCols() const
{
return numberColumns_;
}
inline int numberColumns() const
{
return numberColumns_;
}
inline double primalTolerance() const
{
return dblParam_[ClpPrimalTolerance];
}
void setPrimalTolerance(double value);
inline double dualTolerance() const
{
return dblParam_[ClpDualTolerance];
}
void setDualTolerance(double value);
inline double primalObjectiveLimit() const
{
return dblParam_[ClpPrimalObjectiveLimit];
}
void setPrimalObjectiveLimit(double value);
inline double dualObjectiveLimit() const
{
return dblParam_[ClpDualObjectiveLimit];
}
void setDualObjectiveLimit(double value);
inline double objectiveOffset() const
{
return dblParam_[ClpObjOffset];
}
void setObjectiveOffset(double value);
inline double presolveTolerance() const
{
return dblParam_[ClpPresolveTolerance];
}
#ifndef CLP_NO_STD
inline const std::string &problemName() const
{
return strParam_[ClpProbName];
}
#endif
inline int numberIterations() const
{
return numberIterations_;
}
inline int getIterationCount() const
{
return numberIterations_;
}
inline void setNumberIterations(int numberIterationsNew)
{
numberIterations_ = numberIterationsNew;
}
inline int solveType() const
{
return solveType_;
}
inline void setSolveType(int type)
{
solveType_ = type;
}
inline int maximumIterations() const
{
return intParam_[ClpMaxNumIteration];
}
void setMaximumIterations(int value);
inline double maximumSeconds() const
{
return dblParam_[ClpMaxSeconds];
}
void setMaximumSeconds(double value);
void setMaximumWallSeconds(double value);
bool hitMaximumIterations() const;
inline int status() const
{
return problemStatus_;
}
inline int problemStatus() const
{
return problemStatus_;
}
inline void setProblemStatus(int problemStatusNew)
{
problemStatus_ = problemStatusNew;
}
inline int secondaryStatus() const
{
return secondaryStatus_;
}
inline void setSecondaryStatus(int newstatus)
{
secondaryStatus_ = newstatus;
}
inline bool isAbandoned() const
{
return problemStatus_ == 4;
}
inline bool isProvenOptimal() const
{
return problemStatus_ == 0;
}
inline bool isProvenPrimalInfeasible() const
{
return problemStatus_ == 1;
}
inline bool isProvenDualInfeasible() const
{
return problemStatus_ == 2;
}
bool isPrimalObjectiveLimitReached() const;
bool isDualObjectiveLimitReached() const;
inline bool isIterationLimitReached() const
{
return problemStatus_ == 3;
}
inline double optimizationDirection() const
{
return optimizationDirection_;
}
inline double getObjSense() const
{
return optimizationDirection_;
}
void setOptimizationDirection(double value);
inline double *primalRowSolution() const
{
return rowActivity_;
}
inline const double *getRowActivity() const
{
return rowActivity_;
}
inline double *primalColumnSolution() const
{
return columnActivity_;
}
inline const double *getColSolution() const
{
return columnActivity_;
}
inline void setColSolution(const double *input)
{
memcpy(columnActivity_, input, numberColumns_ * sizeof(double));
}
inline double *dualRowSolution() const
{
return dual_;
}
inline const double *getRowPrice() const
{
return dual_;
}
inline double *dualColumnSolution() const
{
return reducedCost_;
}
inline const double *getReducedCost() const
{
return reducedCost_;
}
inline double *rowLower() const
{
return rowLower_;
}
inline const double *getRowLower() const
{
return rowLower_;
}
inline double *rowUpper() const
{
return rowUpper_;
}
inline const double *getRowUpper() const
{
return rowUpper_;
}
//-------------------------------------------------------------------------
void setObjectiveCoefficient(int elementIndex, double elementValue);
inline void setObjCoeff(int elementIndex, double elementValue)
{
setObjectiveCoefficient(elementIndex, elementValue);
}
void setColumnLower(int elementIndex, double elementValue);
void setColumnUpper(int elementIndex, double elementValue);
void setColumnBounds(int elementIndex,
double lower, double upper);
void setColumnSetBounds(const int *indexFirst,
const int *indexLast,
const double *boundList);
inline void setColLower(int elementIndex, double elementValue)
{
setColumnLower(elementIndex, elementValue);
}
inline void setColUpper(int elementIndex, double elementValue)
{
setColumnUpper(elementIndex, elementValue);
}
inline void setColBounds(int elementIndex,
double lower, double upper)
{
setColumnBounds(elementIndex, lower, upper);
}
inline void setColSetBounds(const int *indexFirst,
const int *indexLast,
const double *boundList)
{
setColumnSetBounds(indexFirst, indexLast, boundList);
}
void setRowLower(int elementIndex, double elementValue);
void setRowUpper(int elementIndex, double elementValue);
void setRowBounds(int elementIndex,
double lower, double upper);
void setRowSetBounds(const int *indexFirst,
const int *indexLast,
const double *boundList);
inline const double *rowScale() const
{
return rowScale_;
}
inline const double *columnScale() const
{
return columnScale_;
}
inline const double *inverseRowScale() const
{
return inverseRowScale_;
}
inline const double *inverseColumnScale() const
{
return inverseColumnScale_;
}
inline double *mutableRowScale() const
{
return rowScale_;
}
inline double *mutableColumnScale() const
{
return columnScale_;
}
inline double *mutableInverseRowScale() const
{
return inverseRowScale_;
}
inline double *mutableInverseColumnScale() const
{
return inverseColumnScale_;
}
inline double *swapRowScale(double *newScale)
{
double *oldScale = rowScale_;
rowScale_ = newScale;
return oldScale;
}
void setRowScale(double *scale);
void setColumnScale(double *scale);
inline double objectiveScale() const
{
return objectiveScale_;
}
inline void setObjectiveScale(double value)
{
objectiveScale_ = value;
}
inline double rhsScale() const
{
return rhsScale_;
}
inline void setRhsScale(double value)
{
rhsScale_ = value;
}
void scaling(int mode = 1);
void unscale();
inline int scalingFlag() const
{
return scalingFlag_;
}
inline double *objective() const
{
if (objective_) {
double offset;
return objective_->gradient(NULL, NULL, offset, false);
} else {
return NULL;
}
}
inline double *objective(const double *solution, double &offset, bool refresh = true) const
{
offset = 0.0;
if (objective_) {
return objective_->gradient(NULL, solution, offset, refresh);
} else {
return NULL;
}
}
inline const double *getObjCoefficients() const
{
if (objective_) {
double offset;
return objective_->gradient(NULL, NULL, offset, false);
} else {
return NULL;
}
}
inline double *rowObjective() const
{
return rowObjective_;
}
inline const double *getRowObjCoefficients() const
{
return rowObjective_;
}
inline double *columnLower() const
{
return columnLower_;
}
inline const double *getColLower() const
{
return columnLower_;
}
inline double *columnUpper() const
{
return columnUpper_;
}
inline const double *getColUpper() const
{
return columnUpper_;
}
inline CoinPackedMatrix *matrix() const
{
if (matrix_ == NULL)
return NULL;
else
return matrix_->getPackedMatrix();
}
inline CoinBigIndex getNumElements() const
{
return matrix_->getNumElements();
}
inline double getSmallElementValue() const
{
return smallElement_;
}
inline void setSmallElementValue(double value)
{
smallElement_ = value;
}
inline ClpMatrixBase *rowCopy() const
{
return rowCopy_;
}
void setNewRowCopy(ClpMatrixBase *newCopy);
inline ClpMatrixBase *clpMatrix() const
{
return matrix_;
}
inline ClpPackedMatrix *clpScaledMatrix() const
{
return scaledMatrix_;
}
inline void setClpScaledMatrix(ClpPackedMatrix *scaledMatrix)
{
delete scaledMatrix_;
scaledMatrix_ = scaledMatrix;
}
inline ClpPackedMatrix *swapScaledMatrix(ClpPackedMatrix *scaledMatrix)
{
ClpPackedMatrix *oldMatrix = scaledMatrix_;
scaledMatrix_ = scaledMatrix;
return oldMatrix;
}
void replaceMatrix(ClpMatrixBase *matrix, bool deleteCurrent = false);
inline void replaceMatrix(CoinPackedMatrix *newmatrix,
bool deleteCurrent = false)
{
replaceMatrix(new ClpPackedMatrix(newmatrix), deleteCurrent);
}
inline double objectiveValue() const
{
return objectiveValue_ * optimizationDirection_ - dblParam_[ClpObjOffset];
}
inline void setObjectiveValue(double value)
{
objectiveValue_ = (value + dblParam_[ClpObjOffset]) / optimizationDirection_;
}
inline double getObjValue() const
{
return objectiveValue_ * optimizationDirection_ - dblParam_[ClpObjOffset];
}
inline char *integerInformation() const
{
return integerType_;
}
double *infeasibilityRay(bool fullRay = false) const;
double *unboundedRay() const;
inline double *ray() const
{
return ray_;
}
inline bool rayExists() const
{
return (ray_ != NULL);
}
inline void deleteRay()
{
delete[] ray_;
ray_ = NULL;
}
inline const double *internalRay() const
{
return ray_;
}
inline bool statusExists() const
{
return (status_ != NULL);
}
inline unsigned char *statusArray() const
{
return status_;
}
unsigned char *statusCopy() const;
void copyinStatus(const unsigned char *statusArray);
inline void setUserPointer(void *pointer)
{
userPointer_ = pointer;
}
inline void *getUserPointer() const
{
return userPointer_;
}
inline void setTrustedUserPointer(ClpTrustedData *pointer)
{
trustedUserPointer_ = pointer;
}
inline ClpTrustedData *getTrustedUserPointer() const
{
return trustedUserPointer_;
}
inline int whatsChanged() const
{
return whatsChanged_;
}
inline void setWhatsChanged(int value)
{
whatsChanged_ = value;
}
inline int numberThreads() const
{
return numberThreads_;
}
inline void setNumberThreads(int value)
{
numberThreads_ = value;
}
void passInMessageHandler(CoinMessageHandler *handler);
CoinMessageHandler *pushMessageHandler(CoinMessageHandler *handler,
bool &oldDefault);
void popMessageHandler(CoinMessageHandler *oldHandler, bool oldDefault);
void newLanguage(CoinMessages::Language language);
inline void setLanguage(CoinMessages::Language language)
{
newLanguage(language);
}
void setDefaultMessageHandler();
inline CoinMessageHandler *messageHandler() const
{
return handler_;
}
inline CoinMessages messages() const
{
return messages_;
}
inline CoinMessages *messagesPointer()
{
return &messages_;
}
inline CoinMessages coinMessages() const
{
return coinMessages_;
}
inline CoinMessages *coinMessagesPointer()
{
return &coinMessages_;
}
inline void setLogLevel(int value)
{
handler_->setLogLevel(value);
}
inline int logLevel() const
{
return handler_->logLevel();
}
inline bool defaultHandler() const
{
return defaultHandler_;
}
void passInEventHandler(const ClpEventHandler *eventHandler);
inline ClpEventHandler *eventHandler() const
{
return eventHandler_;
}
inline CoinThreadRandom *randomNumberGenerator()
{
return &randomNumberGenerator_;
}
inline CoinThreadRandom &mutableRandomNumberGenerator()
{
return randomNumberGenerator_;
}
inline void setRandomSeed(int value)
{
randomNumberGenerator_.setSeed(value);
}
inline int lengthNames() const
{
return lengthNames_;
}
#ifndef CLP_NO_STD
inline void setLengthNames(int value)
{
lengthNames_ = value;
}
inline const std::vector< std::string > *rowNames() const
{
return &rowNames_;
}
inline const std::string &rowName(int iRow) const
{
return rowNames_[iRow];
}
std::string getRowName(int iRow) const;
inline const std::vector< std::string > *columnNames() const
{
return &columnNames_;
}
inline const std::string &columnName(int iColumn) const
{
return columnNames_[iColumn];
}
std::string getColumnName(int iColumn) const;
#endif
inline ClpObjective *objectiveAsObject() const
{
return objective_;
}
void setObjective(ClpObjective *objective);
inline void setObjectivePointer(ClpObjective *newobjective)
{
objective_ = newobjective;
}
int emptyProblem(int *infeasNumber = NULL, double *infeasSum = NULL, bool printMessage = true);
void times(double scalar,
const double *x, double *y) const;
void transposeTimes(double scalar,
const double *x, double *y) const;
//---------------------------------------------------------------------------
bool setIntParam(ClpIntParam key, int value);
bool setDblParam(ClpDblParam key, double value);
#ifndef CLP_NO_STD
bool setStrParam(ClpStrParam key, const std::string &value);
#endif
// Get an integer parameter
inline bool getIntParam(ClpIntParam key, int &value) const
{
if (key < ClpLastIntParam) {
value = intParam_[key];
return true;
} else {
return false;
}
}
// Get an double parameter
inline bool getDblParam(ClpDblParam key, double &value) const
{
if (key < ClpLastDblParam) {
value = dblParam_[key];
return true;
} else {
return false;
}
}
#ifndef CLP_NO_STD
// Get a string parameter
inline bool getStrParam(ClpStrParam key, std::string &value) const
{
if (key < ClpLastStrParam) {
value = strParam_[key];
return true;
} else {
return false;
}
}
#endif
void generateCpp(FILE *fp);
inline unsigned int specialOptions() const
{
return specialOptions_;
}
void setSpecialOptions(unsigned int value);
#define COIN_CBC_USING_CLP 0x01000000
inline bool inCbcBranchAndBound() const
{
return (specialOptions_ & COIN_CBC_USING_CLP) != 0;
}
protected:
void gutsOfDelete(int type);
void gutsOfCopy(const ClpModel &rhs, int trueCopy = 1);
void getRowBound(int iRow, double &lower, double &upper) const;
void gutsOfLoadModel(int numberRows, int numberColumns,
const double *collb, const double *colub,
const double *obj,
const double *rowlb, const double *rowub,
const double *rowObjective = NULL);
void gutsOfScaling();
inline double rawObjectiveValue() const
{
return objectiveValue_;
}
inline bool permanentArrays() const
{
return (specialOptions_ & 65536) != 0;
}
void startPermanentArrays();
void stopPermanentArrays();
const char *const *rowNamesAsChar() const;
const char *const *columnNamesAsChar() const;
void deleteNamesAsChar(const char *const *names, int number) const;
void onStopped();
protected:
double optimizationDirection_;
double dblParam_[ClpLastDblParam];
double objectiveValue_;
double smallElement_;
double objectiveScale_;
double rhsScale_;
int numberRows_;
int numberColumns_;
double *rowActivity_;
double *columnActivity_;
double *dual_;
double *reducedCost_;
double *rowLower_;
double *rowUpper_;
ClpObjective *objective_;
double *rowObjective_;
double *columnLower_;
double *columnUpper_;
ClpMatrixBase *matrix_;
ClpMatrixBase *rowCopy_;
ClpPackedMatrix *scaledMatrix_;
double *ray_;
double *rowScale_;
double *columnScale_;
double *inverseRowScale_;
double *inverseColumnScale_;
int scalingFlag_;
unsigned char *status_;
char *integerType_;
void *userPointer_;
ClpTrustedData *trustedUserPointer_;
int intParam_[ClpLastIntParam];
int numberIterations_;
int solveType_;
#define ROW_COLUMN_COUNTS_SAME 1
#define MATRIX_SAME 2
#define MATRIX_JUST_ROWS_ADDED 4
#define MATRIX_JUST_COLUMNS_ADDED 8
#define ROW_LOWER_SAME 16
#define ROW_UPPER_SAME 32
#define OBJECTIVE_SAME 64
#define COLUMN_LOWER_SAME 128
#define COLUMN_UPPER_SAME 256
#define BASIS_SAME 512
#define ALL_SAME 65339
#define ALL_SAME_EXCEPT_COLUMN_BOUNDS 65337
unsigned int whatsChanged_;
int problemStatus_;
int secondaryStatus_;
int lengthNames_;
int numberThreads_;
unsigned int specialOptions_;
CoinMessageHandler *handler_;
bool defaultHandler_;
CoinThreadRandom randomNumberGenerator_;
ClpEventHandler *eventHandler_;
#ifndef CLP_NO_STD
std::vector< std::string > rowNames_;
std::vector< std::string > columnNames_;
#endif
CoinMessages messages_;
CoinMessages coinMessages_;
int maximumColumns_;
int maximumRows_;
int maximumInternalColumns_;
int maximumInternalRows_;
CoinPackedMatrix baseMatrix_;
CoinPackedMatrix baseRowCopy_;
double *savedRowScale_;
double *savedColumnScale_;
#ifndef CLP_NO_STD
std::string strParam_[ClpLastStrParam];
#endif
};
class ClpDataSave {
public:
ClpDataSave();
ClpDataSave(const ClpDataSave &);
ClpDataSave &operator=(const ClpDataSave &rhs);
~ClpDataSave();
public:
double dualBound_;
double infeasibilityCost_;
double pivotTolerance_;
double zeroFactorizationTolerance_;
double zeroSimplexTolerance_;
double acceptablePivot_;
double objectiveScale_;
int sparseThreshold_;
int perturbation_;
int forceFactorization_;
int scalingFlag_;
unsigned int specialOptions_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
type
CbcOrClpParameterType type() const
type
Definition CbcOrClpParam.hpp:462
name
std::string name() const
Returns name.
Definition CbcOrClpParam.hpp:332
ClpConfig.h
COIN_CBC_USING_CLP
#define COIN_CBC_USING_CLP
Definition ClpModel.hpp:1190
ClpObjective.hpp
ClpPackedMatrix.hpp
ClpParameters.hpp
ClpIntParam
ClpIntParam
This is where to put any useful stuff.
Definition ClpParameters.hpp:12
ClpMaxNumIteration
@ ClpMaxNumIteration
The maximum number of iterations Clp can execute in the simplex methods.
Definition ClpParameters.hpp:15
ClpLastIntParam
@ ClpLastIntParam
Just a marker, so that we can allocate a static sized array to store parameters.
Definition ClpParameters.hpp:40
ClpStrParam
ClpStrParam
Definition ClpParameters.hpp:72
ClpLastStrParam
@ ClpLastStrParam
Just a marker, so that we can allocate a static sized array to store parameters.
Definition ClpParameters.hpp:78
ClpProbName
@ ClpProbName
Name of the problem.
Definition ClpParameters.hpp:75
ClpDblParam
ClpDblParam
Definition ClpParameters.hpp:43
ClpPresolveTolerance
@ ClpPresolveTolerance
Tolerance to use in presolve.
Definition ClpParameters.hpp:66
ClpDualTolerance
@ ClpDualTolerance
The maximum amount the dual constraints can be violated and still be considered feasible.
Definition ClpParameters.hpp:54
ClpPrimalObjectiveLimit
@ ClpPrimalObjectiveLimit
Primal objective limit.
Definition ClpParameters.hpp:51
ClpMaxSeconds
@ ClpMaxSeconds
Maximum time in seconds - after, this action is as max iterations.
Definition ClpParameters.hpp:62
ClpDualObjectiveLimit
@ ClpDualObjectiveLimit
Set Dual objective limit.
Definition ClpParameters.hpp:47
ClpLastDblParam
@ ClpLastDblParam
Just a marker, so that we can allocate a static sized array to store parameters.
Definition ClpParameters.hpp:69
ClpPrimalTolerance
@ ClpPrimalTolerance
The maximum amount the primal constraints can be violated and still be considered feasible.
Definition ClpParameters.hpp:57
ClpObjOffset
@ ClpObjOffset
Objective function constant.
Definition ClpParameters.hpp:60
ClpDataSave::specialOptions_
unsigned int specialOptions_
Definition ClpModel.hpp:1435
ClpDataSave::acceptablePivot_
double acceptablePivot_
Definition ClpModel.hpp:1429
ClpDataSave::pivotTolerance_
double pivotTolerance_
Definition ClpModel.hpp:1426
ClpDataSave::operator=
ClpDataSave & operator=(const ClpDataSave &rhs)
Assignment operator. This copies the data.
ClpDataSave::sparseThreshold_
int sparseThreshold_
Definition ClpModel.hpp:1431
ClpDataSave::scalingFlag_
int scalingFlag_
Definition ClpModel.hpp:1434
ClpDataSave::perturbation_
int perturbation_
Definition ClpModel.hpp:1432
ClpDataSave::ClpDataSave
ClpDataSave()
Default constructor.
ClpDataSave::~ClpDataSave
~ClpDataSave()
Destructor.
ClpDataSave::ClpDataSave
ClpDataSave(const ClpDataSave &)
Copy constructor.
ClpDataSave::zeroSimplexTolerance_
double zeroSimplexTolerance_
Definition ClpModel.hpp:1428
ClpDataSave::dualBound_
double dualBound_
Definition ClpModel.hpp:1424
ClpDataSave::zeroFactorizationTolerance_
double zeroFactorizationTolerance_
Definition ClpModel.hpp:1427
ClpDataSave::infeasibilityCost_
double infeasibilityCost_
Definition ClpModel.hpp:1425
ClpDataSave::objectiveScale_
double objectiveScale_
Definition ClpModel.hpp:1430
ClpDataSave::forceFactorization_
int forceFactorization_
Definition ClpModel.hpp:1433
ClpEventHandler
Base class for Clp event handling.
Definition ClpEventHandler.hpp:27
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition ClpMatrixBase.hpp:38
ClpModel::inCbcBranchAndBound
bool inCbcBranchAndBound() const
Definition ClpModel.hpp:1191
ClpModel::getIntParam
bool getIntParam(ClpIntParam key, int &value) const
Definition ClpModel.hpp:1116
ClpModel::setSmallElementValue
void setSmallElementValue(double value)
Definition ClpModel.hpp:791
ClpModel::inverseColumnScale
const double * inverseColumnScale() const
Definition ClpModel.hpp:661
ClpModel::chgRowLower
void chgRowLower(const double *rowLower)
Change row lower bounds.
ClpModel::dualColumnSolution
double * dualColumnSolution() const
Reduced costs.
Definition ClpModel.hpp:531
ClpModel::getColUpper
const double * getColUpper() const
Definition ClpModel.hpp:768
ClpModel::columnNamesAsChar
const char *const * columnNamesAsChar() const
Create column names as char **.
ClpModel::userPointer_
void * userPointer_
User pointer for whatever reason.
Definition ClpModel.hpp:1310
ClpModel::strParam_
std::string strParam_[ClpLastStrParam]
Array of string parameters.
Definition ClpModel.hpp:1396
ClpModel::numberColumns_
int numberColumns_
Number of columns.
Definition ClpModel.hpp:1259
ClpModel::cleanMatrix
CoinBigIndex cleanMatrix(double threshold=1.0e-20)
Really clean up matrix (if ClpPackedMatrix).
ClpModel::setColumnScale
void setColumnScale(double *scale)
ClpModel::gutsOfDelete
void gutsOfDelete(int type)
Does most of deletion (0 = all, 1 = most).
ClpModel::getNumRows
int getNumRows() const
Definition ClpModel.hpp:323
ClpModel::setDblParam
bool setDblParam(ClpDblParam key, double value)
Set an double parameter.
ClpModel::setRowBounds
void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
ClpModel::setRowObjective
void setRowObjective(const double *rowObjective)
This just loads up a row objective.
ClpModel::getObjValue
double getObjValue() const
Definition ClpModel.hpp:850
ClpModel::setTrustedUserPointer
void setTrustedUserPointer(ClpTrustedData *pointer)
Trusted user pointer.
Definition ClpModel.hpp:910
ClpModel::getNumElements
CoinBigIndex getNumElements() const
Number of elements in matrix.
Definition ClpModel.hpp:781
ClpModel::objectiveAsObject
ClpObjective * objectiveAsObject() const
Objective methods.
Definition ClpModel.hpp:1057
ClpModel::setContinuous
void setContinuous(int index)
Set the index-th variable to be a continuous variable.
ClpModel::defaultHandler_
bool defaultHandler_
Flag to say if default handler (so delete).
Definition ClpModel.hpp:1363
ClpModel::copyRowNames
void copyRowNames(const std::vector< std::string > &rowNames, int first, int last)
Copies in Row names - modifies names first .. last-1.
ClpModel::getObjCoefficients
const double * getObjCoefficients() const
Definition ClpModel.hpp:736
ClpModel::emptyProblem
int emptyProblem(int *infeasNumber=NULL, double *infeasSum=NULL, bool printMessage=true)
Solve a problem with no elements - return status and dual and primal infeasibilites.
ClpModel::status_
unsigned char * status_
Status (i.e.
Definition ClpModel.hpp:1306
ClpModel::isInteger
bool isInteger(int index) const
Return true if the index-th variable is an integer variable.
ClpModel::solveType_
int solveType_
Solve type - 1 simplex, 2 simplex interface, 3 Interior.
Definition ClpModel.hpp:1318
ClpModel::isPrimalObjectiveLimitReached
bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
ClpModel::messages_
CoinMessages messages_
Messages.
Definition ClpModel.hpp:1375
ClpModel::optimizationDirection_
double optimizationDirection_
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
Definition ClpModel.hpp:1245
ClpModel::problemStatus_
int problemStatus_
Status of problem.
Definition ClpModel.hpp:1349
ClpModel::setObjectiveCoefficient
void setObjectiveCoefficient(int elementIndex, double elementValue)
Set an objective function coefficient.
ClpModel::setIntParam
bool setIntParam(ClpIntParam key, int value)
Set an integer parameter.
ClpModel::addRows
int addRows(CoinModel &modelObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
Add rows from a model object.
ClpModel::dualTolerance
double dualTolerance() const
Dual tolerance to use.
Definition ClpModel.hpp:343
ClpModel::ray
double * ray() const
For advanced users - no need to delete - sign not changed.
Definition ClpModel.hpp:864
ClpModel::gutsOfScaling
void gutsOfScaling()
Does much of scaling.
ClpModel::setObjectiveValue
void setObjectiveValue(double value)
Definition ClpModel.hpp:846
ClpModel::columnName
const std::string & columnName(int iColumn) const
Definition ClpModel.hpp:1049
ClpModel::baseMatrix_
CoinPackedMatrix baseMatrix_
Base packed matrix.
Definition ClpModel.hpp:1387
ClpModel::primalColumnSolution
double * primalColumnSolution() const
Primal column solution.
Definition ClpModel.hpp:509
ClpModel::inverseRowScale_
double * inverseRowScale_
Inverse row scale factors for matrix (end of rowScale_).
Definition ClpModel.hpp:1293
ClpModel::intParam_
int intParam_[ClpLastIntParam]
Array of integer parameters.
Definition ClpModel.hpp:1314
ClpModel::handler_
CoinMessageHandler * handler_
Message handler.
Definition ClpModel.hpp:1361
ClpModel::objectiveValue
double objectiveValue() const
Objective value.
Definition ClpModel.hpp:842
ClpModel::stopPermanentArrays
void stopPermanentArrays()
Stop using maximumRows_ and Columns_.
ClpModel::setColumnLower
void setColumnLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
ClpModel::maximumInternalRows_
int maximumInternalRows_
Maximum number of rows (internal arrays) in model.
Definition ClpModel.hpp:1385
ClpModel::rowNamesAsChar
const char *const * rowNamesAsChar() const
Create row names as char **.
ClpModel::returnModel
void returnModel(ClpModel &otherModel)
Return model - nulls all arrays so can be deleted safely also updates any scalars.
ClpModel::deleteNamesAsChar
void deleteNamesAsChar(const char *const *names, int number) const
Delete char * version of names.
ClpModel::addColumns
void addColumns(int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinBigIndex *columnStarts, const int *columnLengths, const int *rows, const double *elements)
ClpModel::status
int status() const
Status of problem: -1 - unknown e.g.
Definition ClpModel.hpp:423
ClpModel::loadQuadraticObjective
void loadQuadraticObjective(const int numberColumns, const CoinBigIndex *start, const int *column, const double *element)
Load up quadratic objective.
ClpModel::setRowScale
void setRowScale(double *scale)
ClpModel::maximumInternalColumns_
int maximumInternalColumns_
Maximum number of columns (internal arrays) in model.
Definition ClpModel.hpp:1383
ClpModel::columnNames_
std::vector< std::string > columnNames_
Column names.
Definition ClpModel.hpp:1372
ClpModel::findNetwork
int findNetwork(char *rotate, double fractionNeeded=0.75)
Find a network subset.
ClpModel::~ClpModel
~ClpModel()
Destructor.
ClpModel::setStrParam
bool setStrParam(ClpStrParam key, const std::string &value)
Set an string parameter.
ClpModel::integerType_
char * integerType_
Integer information.
Definition ClpModel.hpp:1308
ClpModel::scaling
void scaling(int mode=1)
Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3 auto, 4 auto-but-as-initialSolve-in-bab...
ClpModel::chgColumnUpper
void chgColumnUpper(const double *columnUpper)
Change column upper bounds.
ClpModel::setSpecialOptions
void setSpecialOptions(unsigned int value)
ClpModel::rowUpper_
double * rowUpper_
Row upper.
Definition ClpModel.hpp:1271
ClpModel::rowCopy_
ClpMatrixBase * rowCopy_
Row copy if wanted.
Definition ClpModel.hpp:1283
ClpModel::getReducedCost
const double * getReducedCost() const
Definition ClpModel.hpp:535
ClpModel::loadProblem
void loadProblem(const ClpMatrixBase &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
Loads a problem (the constraints on the rows are given by lower and upper bounds).
ClpModel::primalTolerance
double primalTolerance() const
Primal tolerance to use.
Definition ClpModel.hpp:337
ClpModel::randomNumberGenerator_
CoinThreadRandom randomNumberGenerator_
Thread specific random number generator.
Definition ClpModel.hpp:1365
ClpModel::rayExists
bool rayExists() const
just test if infeasibility or unbounded Ray exists
Definition ClpModel.hpp:869
ClpModel::integerInformation
char * integerInformation() const
Integer information.
Definition ClpModel.hpp:855
ClpModel::setDualTolerance
void setDualTolerance(double value)
ClpModel::rowLower_
double * rowLower_
Row lower.
Definition ClpModel.hpp:1269
ClpModel::setLanguage
void setLanguage(CoinMessages::Language language)
Definition ClpModel.hpp:948
ClpModel::getRowName
std::string getRowName(int iRow) const
Return name or Rnnnnnnn.
ClpModel::setMaximumWallSeconds
void setMaximumWallSeconds(double value)
ClpModel::unboundedRay
double * unboundedRay() const
ClpModel::objectiveOffset
double objectiveOffset() const
Objective offset.
Definition ClpModel.hpp:361
ClpModel::addColumns
void addColumns(int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinBigIndex *columnStarts, const int *rows, const double *elements)
Add columns.
ClpModel::chgRowUpper
void chgRowUpper(const double *rowUpper)
Change row upper bounds.
ClpModel::writeMps
int writeMps(const char *filename, int formatType=0, int numberAcross=2, double objSense=0.0) const
Write the problem in MPS format to the specified file.
ClpModel::setLogLevel
void setLogLevel(int value)
Amount of print out: 0 - none 1 - just final 2 - just factorizations 3 - as 2 plus a bit more 4 - ver...
Definition ClpModel.hpp:987
ClpModel::specialOptions
unsigned int specialOptions() const
For advanced options 1 - Don't keep changing infeasibility weight 2 - Keep nonLinearCost round solves...
Definition ClpModel.hpp:1185
ClpModel::setColSetBounds
void setColSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of columns simultaneously .
Definition ClpModel.hpp:618
ClpModel::rhsScale_
double rhsScale_
Scaling of rhs and bounds.
Definition ClpModel.hpp:1255
ClpModel::copyInIntegerInformation
void copyInIntegerInformation(const char *information)
Copy in integer informations.
ClpModel::messagesPointer
CoinMessages * messagesPointer()
Return pointer to messages.
Definition ClpModel.hpp:965
ClpModel::times
void times(double scalar, const double *x, double *y) const
Return y + A * x * scalar in y.
ClpModel::getRowBound
void getRowBound(int iRow, double &lower, double &upper) const
gets lower and upper bounds on rows
ClpModel::objective
double * objective(const double *solution, double &offset, bool refresh=true) const
Definition ClpModel.hpp:727
ClpModel::setColumnSetBounds
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...
ClpModel::logLevel
int logLevel() const
Definition ClpModel.hpp:991
ClpModel::savedColumnScale_
double * savedColumnScale_
Saved column scale factors.
Definition ClpModel.hpp:1393
ClpModel::internalRay
const double * internalRay() const
Access internal ray storage. Users should call infeasibilityRay() or unboundedRay() instead.
Definition ClpModel.hpp:880
ClpModel::scalingFlag
int scalingFlag() const
Gets scalingFlag.
Definition ClpModel.hpp:713
ClpModel::secondaryStatus_
int secondaryStatus_
Secondary status of problem.
Definition ClpModel.hpp:1351
ClpModel::setNumberThreads
void setNumberThreads(int value)
Definition ClpModel.hpp:932
ClpModel::mutableRandomNumberGenerator
CoinThreadRandom & mutableRandomNumberGenerator()
Thread specific random number generator.
Definition ClpModel.hpp:1013
ClpModel::chgObjCoefficients
void chgObjCoefficients(const double *objIn)
Change objective coefficients.
ClpModel::columnUpper_
double * columnUpper_
Column Upper.
Definition ClpModel.hpp:1279
ClpModel::maximumColumns_
int maximumColumns_
Maximum number of columns in model.
Definition ClpModel.hpp:1379
ClpModel::mutableColumnScale
double * mutableColumnScale() const
Definition ClpModel.hpp:669
ClpModel::numberThreads_
int numberThreads_
Number of threads (not very operational).
Definition ClpModel.hpp:1355
ClpModel::getObjSense
double getObjSense() const
Definition ClpModel.hpp:494
ClpModel::transposeTimes
void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
ClpModel::setRowUpper
void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use DBL_MAX for infinity.
ClpModel::popMessageHandler
void popMessageHandler(CoinMessageHandler *oldHandler, bool oldDefault)
back to previous message handler
ClpModel::getRowActivity
const double * getRowActivity() const
Definition ClpModel.hpp:504
ClpModel::deleteRowsAndColumns
void deleteRowsAndColumns(int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
Deletes rows AND columns (keeps old sizes).
ClpModel::columnNames
const std::vector< std::string > * columnNames() const
Column names.
Definition ClpModel.hpp:1045
ClpModel::getUserPointer
void * getUserPointer() const
Definition ClpModel.hpp:905
ClpModel::infeasibilityRay
double * infeasibilityRay(bool fullRay=false) const
Infeasibility/unbounded ray (NULL returned if none/wrong) Up to user to use delete [] on these arrays...
ClpModel::addColumns
void addColumns(int number, const double *columnLower, const double *columnUpper, const double *objective, const CoinPackedVectorBase *const *columns)
ClpModel::rhsScale
double rhsScale() const
Scaling of rhs and bounds.
Definition ClpModel.hpp:699
ClpModel::numberIterations_
int numberIterations_
Number of iterations.
Definition ClpModel.hpp:1316
ClpModel::setObjectiveScale
void setObjectiveScale(double value)
Definition ClpModel.hpp:694
ClpModel::setSecondaryStatus
void setSecondaryStatus(int newstatus)
Definition ClpModel.hpp:456
ClpModel::getIterationCount
int getIterationCount() const
Definition ClpModel.hpp:382
ClpModel::ClpModel
ClpModel(const ClpModel *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true)
Subproblem constructor.
ClpModel::newLanguage
void newLanguage(CoinMessages::Language language)
Set language.
ClpModel::passInEventHandler
void passInEventHandler(const ClpEventHandler *eventHandler)
Pass in Event handler (cloned and deleted at end).
ClpModel::passInMessageHandler
void passInMessageHandler(CoinMessageHandler *handler)
Pass in Message handler (not deleted at end).
ClpModel::setObjectivePointer
void setObjectivePointer(ClpObjective *newobjective)
Definition ClpModel.hpp:1062
ClpModel::columnUpper
double * columnUpper() const
Column Upper.
Definition ClpModel.hpp:764
ClpModel::modifyCoefficient
void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Modify one element of a matrix.
Definition ClpModel.hpp:234
ClpModel::rawObjectiveValue
double rawObjectiveValue() const
Objective value - always minimize.
Definition ClpModel.hpp:1217
ClpModel::getStrParam
bool getStrParam(ClpStrParam key, std::string &value) const
Definition ClpModel.hpp:1137
ClpModel::objective_
ClpObjective * objective_
Objective.
Definition ClpModel.hpp:1273
ClpModel::getDblParam
bool getDblParam(ClpDblParam key, double &value) const
Definition ClpModel.hpp:1126
ClpModel::addRow
void addRow(int numberInRow, const int *columns, const double *elements, double rowLower=-COIN_DBL_MAX, double rowUpper=COIN_DBL_MAX)
Add one row.
ClpModel::primalRowSolution
double * primalRowSolution() const
Primal row solution.
Definition ClpModel.hpp:500
ClpModel::maximumIterations
int maximumIterations() const
Maximum number of iterations.
Definition ClpModel.hpp:400
ClpModel::statusExists
bool statusExists() const
See if status (i.e. basis) array exists (partly for OsiClp).
Definition ClpModel.hpp:885
ClpModel::onStopped
void onStopped()
On stopped - sets secondary status.
ClpModel::getColSolution
const double * getColSolution() const
Definition ClpModel.hpp:513
ClpModel::loadProblem
void loadProblem(const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const int *length, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
This one is for after presolve to save memory.
ClpModel::clpMatrix
ClpMatrixBase * clpMatrix() const
Clp Matrix.
Definition ClpModel.hpp:803
ClpModel::numberRows_
int numberRows_
Number of rows.
Definition ClpModel.hpp:1257
ClpModel::dblParam_
double dblParam_[ClpLastDblParam]
Array of double parameters.
Definition ClpModel.hpp:1247
ClpModel::inverseRowScale
const double * inverseRowScale() const
Definition ClpModel.hpp:657
ClpModel::copyinStatus
void copyinStatus(const unsigned char *statusArray)
Copy in status (basis) vector.
ClpModel::maximumRows_
int maximumRows_
Maximum number of rows in model.
Definition ClpModel.hpp:1381
ClpModel::savedRowScale_
double * savedRowScale_
Saved row scale factors for matrix.
Definition ClpModel.hpp:1391
ClpModel::lengthNames_
int lengthNames_
length of names (0 means no names)
Definition ClpModel.hpp:1353
ClpModel::loadProblem
void loadProblem(const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
Just like the other loadProblem() method except that the matrix is given in a standard column major o...
ClpModel::rowObjective
double * rowObjective() const
Row Objective.
Definition ClpModel.hpp:746
ClpModel::trustedUserPointer_
ClpTrustedData * trustedUserPointer_
Trusted user pointer e.g. for heuristics.
Definition ClpModel.hpp:1312
ClpModel::objectiveScale_
double objectiveScale_
Scaling of objective.
Definition ClpModel.hpp:1253
ClpModel::dualObjectiveLimit
double dualObjectiveLimit() const
Dual objective limit.
Definition ClpModel.hpp:355
ClpModel::setRowSetBounds
void setRowSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a number of rows simultaneously .
ClpModel::deleteIntegerInformation
void deleteIntegerInformation()
Drop integer informations.
ClpModel::setRowLower
void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -DBL_MAX for -infinity.
ClpModel::maximumSeconds
double maximumSeconds() const
Maximum time in seconds (from when set called).
Definition ClpModel.hpp:406
ClpModel::setLengthNames
void setLengthNames(int value)
length of names (0 means no names0
Definition ClpModel.hpp:1029
ClpModel::scaledMatrix_
ClpPackedMatrix * scaledMatrix_
Scaled packed matrix.
Definition ClpModel.hpp:1285
ClpModel::rowScale
const double * rowScale() const
Scaling.
Definition ClpModel.hpp:649
ClpModel::deleteRows
void deleteRows(int number, const int *which)
Deletes rows.
ClpModel::replaceMatrix
void replaceMatrix(ClpMatrixBase *matrix, bool deleteCurrent=false)
Replace Clp Matrix (current is not deleted unless told to and new is used) So up to user to delete cu...
ClpModel::loadQuadraticObjective
void loadQuadraticObjective(const CoinPackedMatrix &matrix)
ClpModel::coinMessages_
CoinMessages coinMessages_
Coin messages.
Definition ClpModel.hpp:1377
ClpModel::isDualObjectiveLimitReached
bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
ClpModel::isProvenDualInfeasible
bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
Definition ClpModel.hpp:476
ClpModel::getNumCols
int getNumCols() const
Number of columns.
Definition ClpModel.hpp:328
ClpModel::addRows
void addRows(int number, const double *rowLower, const double *rowUpper, const CoinPackedVectorBase *const *rows)
ClpModel::addRows
void addRows(int number, const double *rowLower, const double *rowUpper, const CoinBigIndex *rowStarts, const int *columns, const double *elements)
Add rows.
ClpModel::columnScale_
double * columnScale_
Column scale factors.
Definition ClpModel.hpp:1291
ClpModel::optimizationDirection
double optimizationDirection() const
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
Definition ClpModel.hpp:490
ClpModel::swapScaledMatrix
ClpPackedMatrix * swapScaledMatrix(ClpPackedMatrix *scaledMatrix)
Swaps pointer to scaled ClpPackedMatrix.
Definition ClpModel.hpp:819
ClpModel::isProvenPrimalInfeasible
bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
Definition ClpModel.hpp:471
ClpModel::coinMessages
CoinMessages coinMessages() const
Return Coin messages.
Definition ClpModel.hpp:970
ClpModel::setNumberIterations
void setNumberIterations(int numberIterationsNew)
Definition ClpModel.hpp:386
ClpModel::getSmallElementValue
double getSmallElementValue() const
Small element value - elements less than this set to zero, default is 1.0e-20.
Definition ClpModel.hpp:787
ClpModel::rowLower
double * rowLower() const
Row lower.
Definition ClpModel.hpp:540
ClpModel::presolveTolerance
double presolveTolerance() const
Presolve tolerance to use.
Definition ClpModel.hpp:367
ClpModel::gutsOfLoadModel
void gutsOfLoadModel(int numberRows, int numberColumns, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
puts in format I like - 4 array matrix - may make row copy
ClpModel::rowName
const std::string & rowName(int iRow) const
Definition ClpModel.hpp:1038
ClpModel::messages
CoinMessages messages() const
Return messages.
Definition ClpModel.hpp:960
ClpModel::rowCopy
ClpMatrixBase * rowCopy() const
Row Matrix.
Definition ClpModel.hpp:796
ClpModel::statusArray
unsigned char * statusArray() const
Return address of status (i.e. basis) array (char[numberRows+numberColumns]).
Definition ClpModel.hpp:890
ClpModel::objective
double * objective() const
Objective.
Definition ClpModel.hpp:718
ClpModel::setColBounds
void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
Definition ClpModel.hpp:606
ClpModel::rowNames
const std::vector< std::string > * rowNames() const
Row names.
Definition ClpModel.hpp:1034
ClpModel::setSolveType
void setSolveType(int type)
Definition ClpModel.hpp:395
ClpModel::setDefaultMessageHandler
void setDefaultMessageHandler()
Overrides message handler with a default one.
ClpModel::operator=
ClpModel & operator=(const ClpModel &rhs)
Assignment operator. This copies the data.
ClpModel::synchronizeMatrix
void synchronizeMatrix()
Makes sure matrix dimensions are at least model dimensions.
ClpModel::rowActivity_
double * rowActivity_
Row activities.
Definition ClpModel.hpp:1261
ClpModel::whatsChanged_
unsigned int whatsChanged_
Definition ClpModel.hpp:1347
ClpModel::objectiveScale
double objectiveScale() const
Scaling of objective.
Definition ClpModel.hpp:690
ClpModel::resize
void resize(int newNumberRows, int newNumberColumns)
Resizes rim part of model.
ClpModel::numberColumns
int numberColumns() const
Definition ClpModel.hpp:332
ClpModel::deleteQuadraticObjective
void deleteQuadraticObjective()
Get rid of quadratic objective.
ClpModel::setObjective
void setObjective(ClpObjective *objective)
ClpModel::randomNumberGenerator
CoinThreadRandom * randomNumberGenerator()
Thread specific random number generator.
Definition ClpModel.hpp:1008
ClpModel::setUserPointer
void setUserPointer(void *pointer)
User pointer for whatever reason.
Definition ClpModel.hpp:901
ClpModel::numberRows
int numberRows() const
Number of rows.
Definition ClpModel.hpp:319
ClpModel::startPermanentArrays
void startPermanentArrays()
Start using maximumRows_ and Columns_.
ClpModel::inverseColumnScale_
double * inverseColumnScale_
Inverse column scale factors for matrix (end of columnScale_).
Definition ClpModel.hpp:1295
ClpModel::setRhsScale
void setRhsScale(double value)
Definition ClpModel.hpp:703
ClpModel::setColUpper
void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
Definition ClpModel.hpp:600
ClpModel::matrix_
ClpMatrixBase * matrix_
Packed matrix.
Definition ClpModel.hpp:1281
ClpModel::setColumnName
void setColumnName(int colIndex, std::string &name)
Set name of col.
ClpModel::getRowLower
const double * getRowLower() const
Definition ClpModel.hpp:544
ClpModel::loadProblem
void loadProblem(const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
ClpModel::permanentArrays
bool permanentArrays() const
If we are using maximumRows_ and Columns_.
Definition ClpModel.hpp:1222
ClpModel::matrix
CoinPackedMatrix * matrix() const
Matrix (if not ClpPackedmatrix be careful about memory leak.
Definition ClpModel.hpp:773
ClpModel::setColumnUpper
void setColumnUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
ClpModel::deleteColumns
void deleteColumns(int number, const int *which)
Deletes columns.
ClpModel::readGMPL
int readGMPL(const char *filename, const char *dataName, bool keepNames=false)
Read GMPL files from the given filenames.
ClpModel::setNewRowCopy
void setNewRowCopy(ClpMatrixBase *newCopy)
Set new row matrix.
ClpModel::setDualObjectiveLimit
void setDualObjectiveLimit(double value)
ClpModel::addColumns
int addColumns(const CoinBuild &buildObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
Add columns from a build object If tryPlusMinusOne then will try adding as +-1 matrix if no matrix ex...
ClpModel::setOptimizationDirection
void setOptimizationDirection(double value)
ClpModel::columnLower
double * columnLower() const
Column Lower.
Definition ClpModel.hpp:755
ClpModel::baseRowCopy_
CoinPackedMatrix baseRowCopy_
Base row copy.
Definition ClpModel.hpp:1389
ClpModel::primalObjectiveLimit
double primalObjectiveLimit() const
Primal objective limit.
Definition ClpModel.hpp:349
ClpModel::scalingFlag_
int scalingFlag_
Scale flag, 0 none, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic, 5 geometric on rows.
Definition ClpModel.hpp:1298
ClpModel::copyColumnNames
void copyColumnNames(const std::vector< std::string > &columnNames, int first, int last)
Copies in Column names - modifies names first .. last-1.
ClpModel::objectiveValue_
double objectiveValue_
Objective value.
Definition ClpModel.hpp:1249
ClpModel::copyColumnNames
void copyColumnNames(const char *const *columnNames, int first, int last)
Copies in Column names - modifies names first .. last-1.
ClpModel::gutsOfCopy
void gutsOfCopy(const ClpModel &rhs, int trueCopy=1)
Does most of copying If trueCopy 0 then just points to arrays If -1 leaves as much as possible.
ClpModel::chgColumnLower
void chgColumnLower(const double *columnLower)
Change column lower bounds.
ClpModel::setPrimalObjectiveLimit
void setPrimalObjectiveLimit(double value)
ClpModel::addRows
int addRows(const CoinBuild &buildObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
Add rows from a build object.
ClpModel::generateCpp
void generateCpp(FILE *fp)
Create C++ lines to get to current state.
ClpModel::setColLower
void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
Definition ClpModel.hpp:594
ClpModel::solveType
int solveType() const
Solve type - 1 simplex, 2 simplex interface, 3 Interior.
Definition ClpModel.hpp:391
ClpModel::problemStatus
int problemStatus() const
Definition ClpModel.hpp:427
ClpModel::isProvenOptimal
bool isProvenOptimal() const
Is optimality proven?
Definition ClpModel.hpp:466
ClpModel::copyRowNames
void copyRowNames(const char *const *rowNames, int first, int last)
Copies in Row names - modifies names first .. last-1.
ClpModel::pushMessageHandler
CoinMessageHandler * pushMessageHandler(CoinMessageHandler *handler, bool &oldDefault)
Pass in Message handler (not deleted at end) and return current.
ClpModel::clpScaledMatrix
ClpPackedMatrix * clpScaledMatrix() const
Scaled ClpPackedMatrix.
Definition ClpModel.hpp:808
ClpModel::coinMessagesPointer
CoinMessages * coinMessagesPointer()
Return pointer to Coin messages.
Definition ClpModel.hpp:975
ClpModel::setObjCoeff
void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
Definition ClpModel.hpp:563
ClpModel::numberIterations
int numberIterations() const
Number of iterations.
Definition ClpModel.hpp:378
ClpModel::setObjectiveOffset
void setObjectiveOffset(double value)
ClpModel::addRows
void addRows(int number, const double *rowLower, const double *rowUpper, const CoinBigIndex *rowStarts, const int *rowLengths, const int *columns, const double *elements)
Add rows.
ClpModel::ClpModel
ClpModel(bool emptyMessages=false)
Default constructor.
ClpModel::lengthNames
int lengthNames() const
length of names (0 means no names0
Definition ClpModel.hpp:1023
ClpModel::readMps
int readMps(const char *filename, bool keepNames=false, bool ignoreErrors=false)
Read an mps file from the given filename.
ClpModel::columnLower_
double * columnLower_
Column Lower.
Definition ClpModel.hpp:1277
ClpModel::defaultHandler
bool defaultHandler() const
Return true if default handler.
Definition ClpModel.hpp:996
ClpModel::setPrimalTolerance
void setPrimalTolerance(double value)
ClpModel::rowUpper
double * rowUpper() const
Row upper.
Definition ClpModel.hpp:549
ClpModel::setColSolution
void setColSolution(const double *input)
Definition ClpModel.hpp:517
ClpModel::numberThreads
int numberThreads() const
Number of threads (not really being used).
Definition ClpModel.hpp:928
ClpModel::getColLower
const double * getColLower() const
Definition ClpModel.hpp:759
ClpModel::addColumn
void addColumn(int numberInColumn, const int *rows, const double *elements, double columnLower=0.0, double columnUpper=COIN_DBL_MAX, double objective=0.0)
Add one column.
ClpModel::swapRowScale
double * swapRowScale(double *newScale)
Definition ClpModel.hpp:681
ClpModel::setColumnBounds
void setColumnBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
ClpModel::setMaximumIterations
void setMaximumIterations(int value)
ClpModel::rowObjective_
double * rowObjective_
Row Objective (? sign) - may be NULL.
Definition ClpModel.hpp:1275
ClpModel::columnActivity_
double * columnActivity_
Column activities.
Definition ClpModel.hpp:1263
ClpModel::eventHandler_
ClpEventHandler * eventHandler_
Event handler.
Definition ClpModel.hpp:1367
ClpModel::rowScale_
double * rowScale_
Row scale factors for matrix.
Definition ClpModel.hpp:1289
ClpModel::secondaryStatus
int secondaryStatus() const
Secondary status of problem - may get extended 0 - none 1 - primal infeasible because dual limit reac...
Definition ClpModel.hpp:452
ClpModel::problemName
const std::string & problemName() const
Definition ClpModel.hpp:372
ClpModel::loadProblem
int loadProblem(CoinModel &modelObject, bool tryPlusMinusOne=false)
This loads a model from a coinModel object - returns number of errors.
ClpModel::mutableRowScale
double * mutableRowScale() const
Definition ClpModel.hpp:665
ClpModel::unscale
void unscale()
If we constructed a "really" scaled model then this reverses the operation.
ClpModel::setMaximumSeconds
void setMaximumSeconds(double value)
ClpModel::reducedCost_
double * reducedCost_
Reduced costs.
Definition ClpModel.hpp:1267
ClpModel::dualRowSolution
double * dualRowSolution() const
Dual row solution.
Definition ClpModel.hpp:522
ClpModel::mutableInverseColumnScale
double * mutableInverseColumnScale() const
Definition ClpModel.hpp:677
ClpModel::eventHandler
ClpEventHandler * eventHandler() const
Event handler.
Definition ClpModel.hpp:1003
ClpModel::createEmptyMatrix
void createEmptyMatrix()
Create empty ClpPackedMatrix.
ClpModel::isIterationLimitReached
bool isIterationLimitReached() const
Iteration limit reached?
Definition ClpModel.hpp:485
ClpModel::getRowObjCoefficients
const double * getRowObjCoefficients() const
Definition ClpModel.hpp:750
ClpModel::getColumnName
std::string getColumnName(int iColumn) const
Return name or Cnnnnnnn.
ClpModel::addColumns
int addColumns(CoinModel &modelObject, bool tryPlusMinusOne=false, bool checkDuplicates=true)
Add columns from a model object.
ClpModel::getRowUpper
const double * getRowUpper() const
Definition ClpModel.hpp:553
ClpModel::hitMaximumIterations
bool hitMaximumIterations() const
Returns true if hit maximum iterations (or time).
ClpModel::ray_
double * ray_
Infeasible/unbounded ray.
Definition ClpModel.hpp:1287
ClpModel::copyNames
void copyNames(const std::vector< std::string > &rowNames, const std::vector< std::string > &columnNames)
Copies in names.
ClpModel::replaceMatrix
void replaceMatrix(CoinPackedMatrix *newmatrix, bool deleteCurrent=false)
Replace Clp Matrix (current is not deleted unless told to and new is used) So up to user to delete cu...
Definition ClpModel.hpp:836
ClpModel::setRandomSeed
void setRandomSeed(int value)
Set seed for thread specific random number generator.
Definition ClpModel.hpp:1018
ClpModel::copy
void copy(const ClpMatrixBase *from, ClpMatrixBase *&to)
Copy contents - resizing if necessary - otherwise re-use memory.
ClpModel::createCoinModel
CoinModel * createCoinModel() const
This creates a coinModel object.
ClpModel::whatsChanged
int whatsChanged() const
What has changed in model (only for masochistic users).
Definition ClpModel.hpp:919
ClpModel::deleteRay
void deleteRay()
just delete ray if exists
Definition ClpModel.hpp:874
ClpModel::smallElement_
double smallElement_
Small element value.
Definition ClpModel.hpp:1251
ClpModel::setInteger
void setInteger(int index)
Set the index-th variable to be an integer variable.
ClpModel::borrowModel
void borrowModel(ClpModel &otherModel)
Borrow model.
ClpModel::setRowName
void setRowName(int rowIndex, std::string &name)
Set name of row.
ClpModel::getRowPrice
const double * getRowPrice() const
Definition ClpModel.hpp:526
ClpModel::statusCopy
unsigned char * statusCopy() const
Return copy of status (i.e.
ClpModel::columnScale
const double * columnScale() const
Definition ClpModel.hpp:653
ClpModel::dual_
double * dual_
Duals.
Definition ClpModel.hpp:1265
ClpModel::isAbandoned
bool isAbandoned() const
Are there a numerical difficulties?
Definition ClpModel.hpp:461
ClpModel::rowNames_
std::vector< std::string > rowNames_
Row names.
Definition ClpModel.hpp:1370
ClpModel::specialOptions_
unsigned int specialOptions_
For advanced options See get and set for meaning.
Definition ClpModel.hpp:1359
ClpModel::messageHandler
CoinMessageHandler * messageHandler() const
Return handler.
Definition ClpModel.hpp:955
ClpModel::getTrustedUserPointer
ClpTrustedData * getTrustedUserPointer() const
Definition ClpModel.hpp:914
ClpModel::ClpModel
ClpModel(const ClpModel &rhs, int scalingMode=-1)
Copy constructor.
ClpModel::mutableInverseRowScale
double * mutableInverseRowScale() const
Definition ClpModel.hpp:673
ClpModel::setClpScaledMatrix
void setClpScaledMatrix(ClpPackedMatrix *scaledMatrix)
Sets pointer to scaled ClpPackedMatrix.
Definition ClpModel.hpp:813
ClpModel::setWhatsChanged
void setWhatsChanged(int value)
Definition ClpModel.hpp:923
ClpModel::dropNames
void dropNames()
Drops names - makes lengthnames 0 and names empty.
ClpModel::setProblemStatus
void setProblemStatus(int problemStatusNew)
Set problem status.
Definition ClpModel.hpp:432
ClpObjective
Objective Abstract Base Class.
Definition ClpObjective.hpp:18
ClpPackedMatrix
Definition ClpPackedMatrix.hpp:23
ClpTrustedData
For a structure to be used by trusted code.
Definition ClpParameters.hpp:124