9 #ifndef __GAMSMODEL_HPP__
10 #define __GAMSMODEL_HPP__
14 #include "CoinPragma.hpp"
16 extern "C" struct dictRec;
163 void setInfinity(
const double& SolverMInf,
const double& SolverPInf);
468 #endif // __GAMSMODEL_HPP__
const char * getSystemDir()
Name of GAMS System directory.
double getMInfinity() const
Value used by GAMS for minus infinity.
int nNnz() const
The number of nonzeros in the matrix of the model.
ModelStatus
GAMS Model status codes.
Representation of a mixed-integer linear GAMS model read in from GAMS iolib.
int * RowIndicator()
Storage for row indicators.
const char * getOptionfile()
The name of the option file.
double getResUsed()
Gives the stored number of seconds used.
int getGamsInteger(int nr)
GAMS Parameter: Integers 1 to 5.
double getCutOff()
GAMS Parmeter: Implied upper/lower bound on objective function.
double * ColLb()
The column lower bounds.
int * RowBasis()
Initial basis status and storage for the solution basis status of the rows.
double * RowScale()
Scaling parameters for rows.
void TimerStart()
Starts the GAMS timer.
char * RowSense()
The sense of the rows.
void readMatrix()
Reads the LP from the GAMS matrix file and stores it into the data structures of this class...
VariableStatus
Column status indicator used in GAMS.
int * ColIndicator()
Storage for column indicators.
SolverStatus SolverStatus_
int nDCols() const
The number of discrete columns in the model.
ModelStatus getModelStatus()
The current GAMS model status.
GamsModel(const char *cntrfile)
Constructor.
bool isLP() const
Indicates whether we represent an LP or not.
int * matStart()
The column starts for the problem matrix.
int getNodeLim()
GAMS Parameter: Node limit for model run if using a branch-and-bound algorithm.
double * RowRhs()
The right-hand-side of the rows.
double * matValue()
The values for the problem matrix.
int * SOSIndicator()
The special ordered sets indicator.
SolverStatus
GAMS Solver status codes.
double ObjSense() const
The sense of the objective function or optimization, respectively.
double getOptCA()
GAMS Parameter: Allowed absolute difference between incumbent solution and best bound (for MIPs)...
double * ColUb()
The column upper bounds.
double ObjScale() const
Scaling parameter for objective function.
SolverStatus getSolverStatus()
The current GAMS solver status.
int nRows() const
The number of rows in the model.
void setObjBound(const double ObjBound)
Sets an bound (estimate) on the optimal value.
double getPInfinity() const
Value used by GAMS for plus infinity.
int nSOS1() const
The number of special ordered sets of type 1 in the model.
double SecondsSinceStart()
The number of seconds since the GAMS timer was started.
void PrintOut(PrintMask mask, const char *msg)
Log- and Statusfile print function.
int nCols() const
The number of columns in the model.
int nCols_
Indicates whether we have column and row names.
int getSysOut()
If SysOut is set, the solver should give plenty off output.
int * ColBasis()
Initial basis status and storage for the solution basis status of the columns.
double * RowLevel()
Initial values and storage for the solution levels of the rows (row activities).
void setStatus(const SolverStatus &newSolverStatus, const ModelStatus &newModelStatus)
Sets the GAMS solver and model status.
void setResUsed(const double ResUsed)
Sets the number of seconds used.
bool getPriorityOption()
GAMS Option: If set, then the solver should use the branching priorities in ColPriority().
void setNodesUsed(const int NodesUsed)
Sets the number of nodes used (in a branch-and-bound algorithm).
bool isReformulated() const
Tells whether the model has been reformulated by moving the objective equation into the objective and...
int getIterLim()
GAMS Parameter: Iteration limit for model run.
double * ObjCoef()
The coefficients of the objective function (dense format).
BasisStatus
Basis status indicator used in GAMS.
int nSOS2() const
The number of special ordered sets of type 2 in the model.
int nSemiContinuous() const
The number of semicontinuous variables.
void setSolution(const double *ColLevel=0, const double *ColMargin=0, const int *ColBasis=0, const int *ColIndicator=0, const double *RowLevel=0, const double *RowMargin=0, const int *RowBasis=0, const int *RowIndicator=0)
Sets the solution information and writes the solution file.
bool * ColDisc()
Indicates whether a variable is discrete (true) or not (false).
double ObjConstant()
A constant term in the objective function.
double getOptCR()
GAMS Parameter: Allowed relative difference between incumbent solution and best bound (for MIPs)...
double getObjVal()
Gives the stored objective function value.
double * ColPriority()
Branching priorities of columns.
bool getScaleOption()
GAMS Option: If set, then the solver should use the scaling parameters in ColScale() and RowScale()...
void setIterUsed(const int IterUsed)
Sets the number of iterations used.
PrintMask
Distinguishing between message types.
double getResLim()
GAMS Parameter: Time limit for model run in seconds.
int * matRowIdx()
The row indices for the problem matrix.
double * ColMargin()
Initial marginals and storage for the solution values of the dual variables corresponding to the colu...
int matSqueezeZeros()
Removes zero entries in the problem matrix.
void setObjVal(const double ObjVal)
Sets the objective function value in the solution.
double getCheat()
GAMS Parameter: A new valid solution must be at least this much better than incumbent integer solutio...
double * RowMargin()
Initial marginals and storage for the solution values of the dual variables corresponding to the rows...
void setInfinity(const double &SolverMInf, const double &SolverPInf)
Set values that GAMS should use for minus and plus infinity.
RowStatus
Row status indicator used in GAMS.
double * ColLevel()
Initial values and storage for the solution values of the primal variables.
double * ColScale()
Scaling parameters for columns.
bool * ColSemiContinuous()
Indicates whether a variable is semicontinuous or semiinteger (true) or not (false).