6 #ifndef CoinStructuredModel_H 7 #define CoinStructuredModel_H 45 int addBlock(
const std::string &
rowBlock,
56 int addBlock(
const std::string &rowBlock,
57 const std::string &columnBlock,
61 int addBlock(
const std::string &rowBlock,
62 const std::string &columnBlock,
64 const double *rowLower,
const double *rowUpper,
65 const double *columnLower,
const double *columnUpper,
66 const double *objective);
93 int writeMps(
const char *filename,
int compression = 0,
94 int formatType = 0,
int numberAcross = 2,
bool keepStrings =
false);
96 int readSmps(
const char *filename,
97 bool keepNames =
false,
98 bool ignoreErrors =
false);
106 int decompose(
const CoinModel &model,
int type,
107 int maxBlocks = 50,
const char **starts = NULL);
115 const double *rowLower,
const double *rowUpper,
116 const double *columnLower,
const double *columnUpper,
117 const double *objective,
int type,
int maxBlocks = 50,
119 double objectiveOffset = 0.0);
125 inline int numberRowBlocks()
const 128 return numberRowBlocks_;
133 return numberColumnBlocks_;
138 return numberElementBlocks_;
145 return rowBlockNames_[i];
150 rowBlockNames_[i] = name;
153 int addRowBlock(
int numberRows,
const std::string &name);
155 int rowBlock(
const std::string &name)
const;
159 return columnBlockNames_[i];
164 columnBlockNames_[i] = name;
167 int addColumnBlock(
int numberColumns,
const std::string &name);
173 return blockType_[i];
187 int blockIndex(
int row,
int column)
const;
193 void setCoinModel(
CoinModel *block,
int iBlock);
195 void refresh(
int iBlock);
199 const double *&rowLower,
const double *&rowUpper,
200 const double *&columnLower,
const double *&columnUpper,
201 const double *&objective)
const;
205 return optimizationDirection_;
210 optimizationDirection_ = value;
247 int numberRowBlocks_;
This is a model which is made up of Coin(Structured)Model blocks.
int numberElementBlocks_
Current number of element blocks.
int numberElementBlocks() const
Return number of elementBlocks.
CoinBaseModel ** blocks_
Blocks.
This is a simple minded model which is stored in a format which makes it easier to construct and modi...
CoinModelBlockInfo * blockType_
Which parts of model are set in block.
const CoinModelBlockInfo & blockType(int i) const
Return i'th block type.
int maximumElementBlocks_
Maximum number of element blocks.
const std::string & getColumnBlock(int i) const
Return i'th the column block name.
struct CoinModelInfo2 CoinModelBlockInfo
This is a model which is made up of Coin(Structured)Model blocks.
double optimizationDirection() const
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
int numberColumnBlocks() const
Return number of column blocks.
CoinBaseModel * block(int i) const
Return i'th block.
std::vector< std::string > rowBlockNames_
Rowblock name.
void setRowBlock(int i, const std::string &name)
Set i'th row block name.
void setColumnBlock(int i, const std::string &name)
Set i'th column block name.
void setOptimizationDirection(double value)
Set direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
CoinModel ** coinModelBlocks_
CoinModel copies of blocks or NULL if original CoinModel.
Sparse Matrix Base Class.
std::vector< std::string > columnBlockNames_
Columnblock name.
int numberColumnBlocks_
Current number of column blocks.
const std::string & getRowBlock(int i) const
Return the i'th row block name.