Clp 1.17.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CoinLpIO.hpp
Go to the documentation of this file.
1 /* $Id: CoinLpIO.hpp 2122 2019-04-08 03:26:16Z stefan $ */
2 // Last edit: 11/5/08
3 //
4 // Name: CoinLpIO.hpp; Support for Lp files
5 // Author: Francois Margot
6 // Tepper School of Business
7 // Carnegie Mellon University, Pittsburgh, PA 15213
8 // email: fmargot@andrew.cmu.edu
9 // Date: 12/28/03
10 //-----------------------------------------------------------------------------
11 // Copyright (C) 2003, Francois Margot, International Business Machines
12 // Corporation and others. All Rights Reserved.
13 // This code is licensed under the terms of the Eclipse Public License (EPL).
14
15 #ifndef CoinLpIO_H
16 #define CoinLpIO_H
17
18 #include <cstdio>
19
20 #include "CoinPackedMatrix.hpp"
21 #include "CoinMessage.hpp"
22 #include "CoinFileIO.hpp"
23 class CoinSet;
24
25 const int MAX_OBJECTIVES = 2;
26
27 typedef int COINColumnIndex;
28
105 class CoinLpIO {
106 friend void CoinLpIOUnitTest(const std::string &lpDir);
107
108 public:
111 CoinLpIO();
113
115 void gutsOfDestructor();
116
118 void gutsOfCopy(const CoinLpIO &);
119
121 CoinLpIO &operator=(const CoinLpIO &rhs);
122
124 CoinLpIO(const CoinLpIO &);
125
127 ~CoinLpIO();
128
134 void freePreviousNames(const int section);
135
137 void freeAll();
139
142 inline void
143 convertBoundToSense(const double lower, const double upper,
144 char &sense, double &right, double &range) const;
145
148
150 const char *getProblemName() const;
151
153 void setProblemName(const char *name);
154
156 int getNumCols() const;
157
159 int getNumRows() const;
160
162 CoinBigIndex getNumElements() const;
163
165 const double *getColLower() const;
166
168 const double *getColUpper() const;
169
171 const double *getRowLower() const;
172
174 const double *getRowUpper() const;
184 const char *getRowSense() const;
185
197 const double *getRightHandSide() const;
198
212 const double *getRowRange() const;
213
215 const int getNumObjectives() const;
216
218 const double *getObjCoefficients() const;
219
221 const double *getObjCoefficients(int j) const;
222
224 const CoinPackedMatrix *getMatrixByRow() const;
225
227 const CoinPackedMatrix *getMatrixByCol() const;
228
230 const char *getObjName() const;
231
233 const char *getObjName(int j) const;
234
240 void getPreviousRowNames(char const *const *prev,
241 int *card_prev) const;
242
247 void getPreviousColNames(char const *const *prev,
248 int *card_prev) const;
249
252 char const *const *getRowNames() const;
253
255 char const *const *getColNames() const;
256
260 const char *rowName(int index) const;
261
265 const char *columnName(int index) const;
266
270 int rowIndex(const char *name) const;
271
274 int columnIndex(const char *name) const;
275
277 double objectiveOffset() const;
278
280 double objectiveOffset(int j) const;
281
283 inline void setObjectiveOffset(double value)
284 {
285 objectiveOffset_[0] = value;
286 }
288 inline bool wasMaximization() const
289 {
290 return wasMaximization_;
291 }
292
294 inline void setObjectiveOffset(double value, int j)
295 {
296 objectiveOffset_[j] = value;
297 }
298
301 bool isInteger(int columnNumber) const;
302
304 const char *integerColumns() const;
306
309 double getInfinity() const;
311
314 void setInfinity(const double);
315
317 double getEpsilon() const;
318
321 void setEpsilon(const double);
322
324 int getNumberAcross() const;
325
328 void setNumberAcross(const int);
329
331 int getDecimals() const;
332
335 void setDecimals(const int);
337
350 void setLpDataWithoutRowAndColNames(
351 const CoinPackedMatrix &m,
352 const double *collb, const double *colub,
353 const double *obj_coeff,
354 const char *integrality,
355 const double *rowlb, const double *rowub);
356
357 void setLpDataWithoutRowAndColNames(
358 const CoinPackedMatrix &m,
359 const double *collb, const double *colub,
360 const double *obj_coeff[MAX_OBJECTIVES],
361 int num_objectives,
362 const char *integrality,
363 const double *rowlb, const double *rowub);
364
377 int is_invalid_name(const char *buff, const bool ranged) const;
378
395 int are_invalid_names(char const *const *vnames,
396 const int card_vnames,
397 const bool check_ranged) const;
398
401 void setDefaultRowNames();
402
404 void setDefaultColNames();
405
425 void setLpDataRowAndColNames(char const *const *const rownames,
426 char const *const *const colnames);
427
442 int writeLp(const char *filename,
443 const double epsilon,
444 const int numberAcross,
445 const int decimals,
446 const bool useRowNames = true);
447
462 int writeLp(FILE *fp,
463 const double epsilon,
464 const int numberAcross,
465 const int decimals,
466 const bool useRowNames = true);
467
470 int writeLp(const char *filename, const bool useRowNames = true);
471
474 int writeLp(FILE *fp, const bool useRowNames = true);
475
480 void readLp(const char *filename, const double epsilon);
481
486 void readLp(const char *filename);
487
493 void readLp(FILE *fp, const double epsilon);
494
499 void readLp(FILE *fp);
500
502 void readLp();
504 void print() const;
505
507 void loadSOS(int numberSets, const CoinSet *sets);
508
510 void loadSOS(int numberSets, const CoinSet **sets);
511
513 inline int numberSets() const
514 {
515 return numberSets_;
516 }
517
519 inline CoinSet **setInformation() const
520 {
521 return set_;
522 }
524
531 void passInMessageHandler(CoinMessageHandler *handler);
532
534 void newLanguage(CoinMessages::Language language);
535
537 inline void setLanguage(CoinMessages::Language language) { newLanguage(language); }
538
540 inline CoinMessageHandler *messageHandler() const { return handler_; }
541
543 inline CoinMessages messages() { return messages_; }
545 inline CoinMessages *messagesPointer() { return &messages_; }
547
548 protected:
550 char *problemName_;
551
553 CoinMessageHandler *handler_;
559 bool defaultHandler_;
561 CoinMessages messages_;
562
564 int numberRows_;
565
567 int numberColumns_;
568
570 CoinBigIndex numberElements_;
571
573 mutable CoinPackedMatrix *matrixByColumn_;
574
576 CoinPackedMatrix *matrixByRow_;
577
579 double *rowlower_;
580
582 double *rowupper_;
583
585 double *collower_;
586
588 double *colupper_;
589
591 mutable double *rhs_;
592
596 mutable double *rowrange_;
597
599 mutable char *rowsense_;
600
602 double *objective_[MAX_OBJECTIVES];
603
605 int num_objectives_;
606
608 double objectiveOffset_[MAX_OBJECTIVES];
609
612 char *integerType_;
613
615 CoinSet **set_;
616
618 int numberSets_;
619
621 char *fileName_;
622
624 double infinity_;
625
627 double epsilon_;
628
630 int numberAcross_;
631
633 int decimals_;
634
636 char *objName_[MAX_OBJECTIVES];
637
639 bool wasMaximization_;
640
647 char **previous_names_[2];
648
653 int card_previous_names_[2];
654
659 char **names_[2];
660
661 typedef struct {
662 int index, next;
663 } CoinHashLink;
664
668 int maxHash_[2];
669
673 int numberHash_[2];
674
678 mutable CoinHashLink *hash_[2];
679
681 mutable char inputBuffer_[1028];
683 mutable int bufferLength_;
685 mutable int bufferPosition_;
687 CoinFileInput *input_;
689 mutable bool eofFound_;
691 int fscanfLpIO(char *buff) const;
693 int newCardLpIO() const;
694
700 void startHash(char const *const *const names,
701 const COINColumnIndex number,
702 int section);
703
707 void stopHash(int section);
708
713 COINColumnIndex findHash(const char *name, int section) const;
714
719 void insertHash(const char *thisName, int section);
720
723 void out_coeff(FILE *fp, double v, int print_1) const;
724
728 int find_obj() const;
729
735 int is_subject_to(const char *buff) const;
736
739 int first_is_number(const char *buff) const;
740
743 int is_comment(const char *buff) const;
744
746 void skip_comment(char *buff) const;
747
750 int is_free(const char *buff) const;
751
754 int is_inf(const char *buff) const;
755
761 int is_sense(const char *buff) const;
762
774 int is_keyword(const char *buff) const;
775
778 int read_monom_obj(double *coeff, char **name, int *cnt,
779 char **obj_name, int *num_objectives, int *obj_starts);
780
785 int read_monom_row(char *start_str, double *coeff, char **name,
786 int cnt_coeff) const;
787
789 void realloc_coeff(double **coeff, char ***colNames, int *maxcoeff) const;
790
792 void realloc_row(char ***rowNames, CoinBigIndex **start, double **rhs,
793 double **rowlow, double **rowup, int *maxrow) const;
794
796 void realloc_col(double **collow, double **colup, char **is_int,
797 int *maxcol) const;
798
800 void read_row(char *buff, double **pcoeff, char ***pcolNames,
801 int *cnt_coeff, int *maxcoeff,
802 double *rhs, double *rowlow, double *rowup,
803 int *cnt_row, double inf) const;
804
818 void checkRowNames();
819
828 void checkColNames();
829 };
830
831 void CoinLpIOUnitTest(const std::string &lpDir);
832
833 #endif
834
835 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
836 */
CoinLpIO::getPreviousColNames
void getPreviousColNames(char const *const *prev, int *card_prev) const
Get pointer to array[*card_prev] of previous column names.
CoinLpIO::rowrange_
double * rowrange_
Pointer to dense vector of slack variable upper bounds for ranged constraints (undefined for non-rang...
Definition: CoinLpIO.hpp:596
CoinLpIO::newCardLpIO
int newCardLpIO() const
Get next line into inputBuffer_ (returns number in)
CoinLpIO::getMatrixByRow
const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of the coefficient matrix.
CoinLpIO::wasMaximization_
bool wasMaximization_
Maximization reformulation flag.
Definition: CoinLpIO.hpp:639
CoinLpIO::rowsense_
char * rowsense_
Pointer to dense vector of row senses.
Definition: CoinLpIO.hpp:599
CoinLpIO::getNumElements
CoinBigIndex getNumElements() const
Get number of nonzero elements.
CoinLpIO::print
void print() const
Dump the data. Low level method for debugging.
CoinLpIO::getRowNames
char const *const * getRowNames() const
Get pointer to array[getNumRows()+1] of row names, including objective function name as last entry...
CoinLpIO::getNumRows
int getNumRows() const
Get number of rows.
CoinLpIO::colupper_
double * colupper_
Pointer to dense vector of column upper bounds.
Definition: CoinLpIO.hpp:588
CoinLpIO::findHash
COINColumnIndex findHash(const char *name, int section) const
Return the index of the given name, return -1 if the name is not found.
CoinLpIO::numberElements_
CoinBigIndex numberElements_
Number of elements.
Definition: CoinLpIO.hpp:570
CoinLpIO::read_monom_obj
int read_monom_obj(double *coeff, char **name, int *cnt, char **obj_name, int *num_objectives, int *obj_starts)
Read a monomial of the objective function.
CoinLpIO::rowlower_
double * rowlower_
Pointer to dense vector of row lower bounds.
Definition: CoinLpIO.hpp:579
CoinLpIO::setEpsilon
void setEpsilon(const double)
Set epsilon.
CoinLpIO::CoinHashLink::next
int next
Definition: CoinLpIO.hpp:662
CoinLpIO::setProblemName
void setProblemName(const char *name)
Set problem name.
CoinLpIO::setInfinity
void setInfinity(const double)
Set infinity.
CoinLpIO::eofFound_
bool eofFound_
If already inserted one End.
Definition: CoinLpIO.hpp:689
CoinLpIO::operator=
CoinLpIO & operator=(const CoinLpIO &rhs)
assignment operator
CoinLpIO::previous_names_
char ** previous_names_[2]
Row names (including objective function name) and column names when stopHash() for the corresponding ...
Definition: CoinLpIO.hpp:647
CoinLpIO::readLp
void readLp()
Does work of readLp.
CoinLpIO::are_invalid_names
int are_invalid_names(char const *const *vnames, const int card_vnames, const bool check_ranged) const
Return 0 if each of the card_vnames entries of vnames is a valid name, return a positive number other...
CoinLpIO::read_monom_row
int read_monom_row(char *start_str, double *coeff, char **name, int cnt_coeff) const
Read a monomial of a constraint.
CoinLpIO::stopHash
void stopHash(int section)
Delete hash storage.
CoinLpIO::getColNames
char const *const * getColNames() const
Get pointer to array[getNumCols()] of column names.
CoinLpIO::num_objectives_
int num_objectives_
Number of objectives.
Definition: CoinLpIO.hpp:605
CoinLpIO::integerColumns
const char * integerColumns() const
Get characteristic vector of integer variables.
CoinLpIO::getEpsilon
double getEpsilon() const
Get epsilon.
CoinLpIO::rowName
const char * rowName(int index) const
Return the row name for the specified index.
CoinLpIO::getRowRange
const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
CoinLpIO::messagesPointer
CoinMessages * messagesPointer()
Return the messages pointer.
Definition: CoinLpIO.hpp:545
CoinLpIO::bufferPosition_
int bufferPosition_
Current buffer position.
Definition: CoinLpIO.hpp:685
CoinLpIO::isInteger
bool isInteger(int columnNumber) const
Return true if a column is an integer (binary or general integer) variable.
CoinLpIO::matrixByRow_
CoinPackedMatrix * matrixByRow_
Pointer to row-wise copy of problem matrix coefficients.
Definition: CoinLpIO.hpp:576
CoinLpIO::CoinLpIO
CoinLpIO()
Default Constructor.
CoinLpIO::~CoinLpIO
~CoinLpIO()
Destructor.
CoinLpIO::decimals_
int decimals_
Number of decimals printed for coefficients.
Definition: CoinLpIO.hpp:633
CoinLpIO::input_
CoinFileInput * input_
File handler.
Definition: CoinLpIO.hpp:687
CoinLpIO::skip_comment
void skip_comment(char *buff) const
Read the file fp until buff contains an end of line.
CoinLpIO::numberHash_
int numberHash_[2]
Number of entries in a hash table section.
Definition: CoinLpIO.hpp:673
CoinLpIO::getNumberAcross
int getNumberAcross() const
Get numberAcross, the number of monomials to be printed per line.
CoinLpIO::is_comment
int is_comment(const char *buff) const
Return 1 if the first character of buff is &#39;/&#39; or &#39;\&#39;.
CoinLpIO::getObjName
const char * getObjName() const
Get objective function name.
CoinLpIO::numberColumns_
int numberColumns_
Number of columns.
Definition: CoinLpIO.hpp:567
CoinLpIOUnitTest
void CoinLpIOUnitTest(const std::string &lpDir)
CoinLpIO::getColUpper
const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
CoinMessageHandler
Base class for message handling.
Definition: CoinMessageHandler.hpp:345
CoinLpIO::realloc_row
void realloc_row(char ***rowNames, CoinBigIndex **start, double **rhs, double **rowlow, double **rowup, int *maxrow) const
Reallocate vectors related to rows.
CoinLpIO::setDefaultRowNames
void setDefaultRowNames()
Set objective function name to the default &quot;obj&quot; and row names to the default &quot;cons0&quot;, &quot;cons1&quot;, ...
CoinLpIO::getNumCols
int getNumCols() const
Get number of columns.
CoinLpIO::getDecimals
int getDecimals() const
Get decimals, the number of digits to write after the decimal point.
CoinLpIO::hash_
CoinHashLink * hash_[2]
Hash tables with two sections.
Definition: CoinLpIO.hpp:678
CoinLpIO::is_subject_to
int is_subject_to(const char *buff) const
Return an integer indicating if the keyword &quot;subject to&quot; or one of its variants has been read...
CoinLpIO::handler_
CoinMessageHandler * handler_
Message handler.
Definition: CoinLpIO.hpp:553
CoinLpIO::problemName_
char * problemName_
Problem name.
Definition: CoinLpIO.hpp:550
CoinLpIO::names_
char ** names_[2]
Row names (including objective function name) and column names (linked to Hash tables).
Definition: CoinLpIO.hpp:659
CoinLpIO::epsilon_
double epsilon_
Value to use for epsilon.
Definition: CoinLpIO.hpp:627
CoinLpIO::is_free
int is_free(const char *buff) const
Return 1 if buff is the keyword &quot;free&quot; or one of its variants.
CoinLpIO::getMatrixByCol
const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of the coefficient matrix.
CoinLpIO::setLpDataRowAndColNames
void setLpDataRowAndColNames(char const *const *const rownames, char const *const *const colnames)
Set the row and column names.
CoinLpIO::infinity_
double infinity_
Value to use for infinity.
Definition: CoinLpIO.hpp:624
CoinLpIO::inputBuffer_
char inputBuffer_[1028]
Current buffer (needed so can get rid of blanks with :
Definition: CoinLpIO.hpp:681
CoinLpIO::getProblemName
const char * getProblemName() const
Get the problem name.
CoinLpIO::checkRowNames
void checkRowNames()
Check that current objective name and all row names are distinct including row names obtained by addi...
MAX_OBJECTIVES
const int MAX_OBJECTIVES
Definition: CoinLpIO.hpp:25
CoinLpIO::setLanguage
void setLanguage(CoinMessages::Language language)
Set the language for messages.
Definition: CoinLpIO.hpp:537
CoinLpIO::objName_
char * objName_[MAX_OBJECTIVES]
Objective function name.
Definition: CoinLpIO.hpp:636
CoinLpIO::is_inf
int is_inf(const char *buff) const
Return 1 if buff is the keyword &quot;inf&quot; or one of its variants.
CoinLpIO::integerType_
char * integerType_
Pointer to dense vector specifying if a variable is continuous (0) or integer (1).
Definition: CoinLpIO.hpp:612
CoinLpIO::numberSets
int numberSets() const
Number of SOS sets.
Definition: CoinLpIO.hpp:513
CoinLpIO::startHash
void startHash(char const *const *const names, const COINColumnIndex number, int section)
Build the hash table for the given names.
CoinFileIO.hpp
CoinLpIO::card_previous_names_
int card_previous_names_[2]
card_previous_names_[section] holds the number of entries in the vector previous_names_[section].
Definition: CoinLpIO.hpp:653
CoinLpIO::fileName_
char * fileName_
Current file name.
Definition: CoinLpIO.hpp:621
CoinLpIO::matrixByColumn_
CoinPackedMatrix * matrixByColumn_
Pointer to column-wise copy of problem matrix coefficients.
Definition: CoinLpIO.hpp:573
CoinLpIO::newLanguage
void newLanguage(CoinMessages::Language language)
Set the language for messages.
CoinLpIO::setLpDataWithoutRowAndColNames
void setLpDataWithoutRowAndColNames(const CoinPackedMatrix &m, const double *collb, const double *colub, const double *obj_coeff, const char *integrality, const double *rowlb, const double *rowub)
Set the data of the object.
CoinLpIO::writeLp
int writeLp(const char *filename, const double epsilon, const int numberAcross, const int decimals, const bool useRowNames=true)
Write the data in Lp format in the file with name filename.
CoinLpIO::numberAcross_
int numberAcross_
Number of monomials printed in a row.
Definition: CoinLpIO.hpp:630
CoinLpIO::getColLower
const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
CoinLpIO::first_is_number
int first_is_number(const char *buff) const
Return 1 if the first character of buff is a number.
CoinLpIO::gutsOfCopy
void gutsOfCopy(const CoinLpIO &)
Does the heavy lifting for copy and assignment.
CoinLpIO::bufferLength_
int bufferLength_
Current buffer length (negative if not got eol)
Definition: CoinLpIO.hpp:683
CoinLpIO::set_
CoinSet ** set_
Pointer to sets.
Definition: CoinLpIO.hpp:615
CoinLpIO::messages_
CoinMessages messages_
Messages.
Definition: CoinLpIO.hpp:561
CoinLpIO::getInfinity
double getInfinity() const
Get infinity.
CoinLpIO::getNumObjectives
const int getNumObjectives() const
Get pointer to array[getNumCols()] of objective function coefficients.
CoinLpIO::getRowSense
const char * getRowSense() const
Get pointer to array[getNumRows()] of constraint senses.
CoinLpIO::columnIndex
int columnIndex(const char *name) const
Return the index for the specified column name.
CoinLpIO::objectiveOffset_
double objectiveOffset_[MAX_OBJECTIVES]
Constant offset for objective value.
Definition: CoinLpIO.hpp:608
CoinLpIO::objective_
double * objective_[MAX_OBJECTIVES]
Pointer to dense vector of objective coefficients.
Definition: CoinLpIO.hpp:602
CoinLpIO::convertBoundToSense
void convertBoundToSense(const double lower, const double upper, char &sense, double &right, double &range) const
A quick inlined function to convert from lb/ub style constraint definition to sense/rhs/range style...
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
CoinLpIO::getPreviousRowNames
void getPreviousRowNames(char const *const *prev, int *card_prev) const
Get pointer to array[*card_prev] of previous row names.
CoinLpIO::columnName
const char * columnName(int index) const
Return the column name for the specified index.
CoinLpIO::insertHash
void insertHash(const char *thisName, int section)
Insert thisName in the hash table if not present yet; does nothing if the name is already in...
COINColumnIndex
int COINColumnIndex
Definition: CoinLpIO.hpp:27
CoinMessages::Language
Language
Supported languages.
Definition: CoinMessageHandler.hpp:148
CoinLpIO::getRowUpper
const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
CoinLpIO::setObjectiveOffset
void setObjectiveOffset(double value)
Set objective offset.
Definition: CoinLpIO.hpp:283
CoinLpIO::rowIndex
int rowIndex(const char *name) const
Return the index for the specified row name.
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
CoinLpIO::setObjectiveOffset
void setObjectiveOffset(double value, int j)
Set objective offset.
Definition: CoinLpIO.hpp:294
CoinFileInput
Abstract base class for file input classes.
Definition: CoinFileIO.hpp:40
CoinLpIO::messageHandler
CoinMessageHandler * messageHandler() const
Return the message handler.
Definition: CoinLpIO.hpp:540
CoinLpIO::out_coeff
void out_coeff(FILE *fp, double v, int print_1) const
Write a coefficient.
CoinLpIO::numberSets_
int numberSets_
Number of sets.
Definition: CoinLpIO.hpp:618
CoinLpIO::getRowLower
const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
CoinLpIO::objectiveOffset
double objectiveOffset() const
Returns the (constant) objective offset.
CoinLpIO::rhs_
double * rhs_
Pointer to dense vector of row rhs.
Definition: CoinLpIO.hpp:591
CoinLpIO::wasMaximization
bool wasMaximization() const
Return true if maximization problem reformulated as minimization.
Definition: CoinLpIO.hpp:288
CoinLpIO::read_row
void read_row(char *buff, double **pcoeff, char ***pcolNames, int *cnt_coeff, int *maxcoeff, double *rhs, double *rowlow, double *rowup, int *cnt_row, double inf) const
Read a constraint.
CoinLpIO::getRightHandSide
const double * getRightHandSide() const
Get pointer to array[getNumRows()] of constraint right-hand sides.
CoinLpIO::loadSOS
void loadSOS(int numberSets, const CoinSet *sets)
Load in SOS stuff.
CoinLpIO::setDefaultColNames
void setDefaultColNames()
Set column names to the default &quot;x0&quot;, &quot;x1&quot;, ...
CoinMessage.hpp
This file contains the enum for the standard set of Coin messages and a class definition whose sole p...
CoinLpIO::collower_
double * collower_
Pointer to dense vector of column lower bounds.
Definition: CoinLpIO.hpp:585
CoinLpIO::realloc_coeff
void realloc_coeff(double **coeff, char ***colNames, int *maxcoeff) const
Reallocate vectors related to number of coefficients.
CoinLpIO::maxHash_
int maxHash_[2]
Maximum number of entries in a hash table section.
Definition: CoinLpIO.hpp:668
CoinLpIO::numberRows_
int numberRows_
Number of rows.
Definition: CoinLpIO.hpp:564
CoinLpIO
Class to read and write Lp files.
Definition: CoinLpIO.hpp:105
CoinLpIO::gutsOfDestructor
void gutsOfDestructor()
Does the heavy lifting for destruct and assignment.
CoinLpIO::messages
CoinMessages messages()
Return the messages.
Definition: CoinLpIO.hpp:543
CoinLpIO::checkColNames
void checkColNames()
Check that current column names are distinct.
CoinLpIO::setDecimals
void setDecimals(const int)
Set decimals.
CoinLpIO::is_sense
int is_sense(const char *buff) const
Return an integer indicating the inequality sense read.
CoinLpIO::freeAll
void freeAll()
Free all memory (except memory related to hash tables and objName_).
CoinLpIO::is_invalid_name
int is_invalid_name(const char *buff, const bool ranged) const
Return 0 if buff is a valid name for a row, a column or objective function, return a positive number ...
CoinLpIO::rowupper_
double * rowupper_
Pointer to dense vector of row upper bounds.
Definition: CoinLpIO.hpp:582
CoinLpIO::setInformation
CoinSet ** setInformation() const
Set information.
Definition: CoinLpIO.hpp:519
CoinLpIO::realloc_col
void realloc_col(double **collow, double **colup, char **is_int, int *maxcol) const
Reallocate vectors related to columns.
CoinLpIO::CoinLpIOUnitTest
friend void CoinLpIOUnitTest(const std::string &lpDir)
CoinLpIO::find_obj
int find_obj() const
Locate the objective function.
CoinLpIO::passInMessageHandler
void passInMessageHandler(CoinMessageHandler *handler)
Pass in Message handler.
CoinLpIO::fscanfLpIO
int fscanfLpIO(char *buff) const
Get next string (returns number in)
CoinLpIO::getObjCoefficients
const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
CoinMessages
Class to hold and manipulate an array of massaged messages.
Definition: CoinMessageHandler.hpp:140
CoinPackedMatrix.hpp
CoinLpIO::is_keyword
int is_keyword(const char *buff) const
Return an integer indicating if one of the keywords &quot;Bounds&quot;, &quot;Integers&quot;, &quot;Generals&quot;, &quot;Binaries&quot;, &quot;Semi-continuous&quot;, &quot;Sos&quot;, &quot;End&quot;, or one of their variants has been read.
CoinLpIO::setNumberAcross
void setNumberAcross(const int)
Set numberAcross.
CoinLpIO::freePreviousNames
void freePreviousNames(const int section)
Free the vector previous_names_[section] and set card_previous_names_[section] to 0...
CoinLpIO::defaultHandler_
bool defaultHandler_
Flag to say if the message handler is the default handler.
Definition: CoinLpIO.hpp:559
CoinSet
Very simple class for containing data on set.
Definition: CoinMpsIO.hpp:269
CoinLpIO::CoinHashLink
Definition: CoinLpIO.hpp:661