Scippy

SoPlex

Sequential object-oriented simPlex

soplex_interface.h File Reference

Go to the source code of this file.

Functions

void * SoPlex_create ()
 
void SoPlex_free (void *soplex)
 
int SoPlex_readInstanceFile (void *soplex, const char *filename)
 
int SoPlex_readBasisFile (void *soplex, const char *filename)
 
int SoPlex_readSettingsFile (void *soplex, const char *filename)
 
void SoPlex_clearLPReal (void *soplex)
 
int SoPlex_numRows (void *soplex)
 
int SoPlex_numCols (void *soplex)
 
void SoPlex_setRational (void *soplex)
 
void SoPlex_setBoolParam (void *soplex, int paramcode, int paramvalue)
 
void SoPlex_setIntParam (void *soplex, int paramcode, int paramvalue)
 
void SoPlex_setRealParam (void *soplex, int paramcode, double paramvalue)
 
int SoPlex_getIntParam (void *soplex, int paramcode)
 
void SoPlex_addColReal (void *soplex, double *colentries, int colsize, int nnonzeros, double objval, double lb, double ub)
 
void SoPlex_removeColReal (void *soplex, int colidx)
 
void SoPlex_addColRational (void *soplex, long *colnums, long *coldenoms, int colsize, int nnonzeros, long objvalnum, long objvaldenom, long lbnum, long lbdenom, long ubnum, long ubdenom)
 
void SoPlex_addRowReal (void *soplex, double *rowentries, int rowsize, int nnonzeros, double lb, double ub)
 
void SoPlex_removeRowReal (void *soplex, int rowidx)
 
void SoPlex_addRowRational (void *soplex, long *rownums, long *rowdenoms, int rowsize, int nnonzeros, long lbnum, long lbdenom, long ubnum, long ubdenom)
 
void SoPlex_getPrimalReal (void *soplex, double *primal, int dim)
 
char * SoPlex_getPrimalRationalString (void *soplex, int dim)
 
void SoPlex_getDualReal (void *soplex, double *dual, int dim)
 
void SoPlex_getRedCostReal (void *soplex, double *rc, int dim)
 
int SoPlex_optimize (void *soplex)
 
int SoPlex_getStatus (void *soplex)
 
double SoPlex_getSolvingTime (void *soplex)
 
int SoPlex_getNumIterations (void *soplex)
 
void SoPlex_changeObjReal (void *soplex, double *obj, int dim)
 
void SoPlex_changeObjRational (void *soplex, long *objnums, long *objdenoms, int dim)
 
void SoPlex_changeLhsReal (void *soplex, double *lhs, int dim)
 
void SoPlex_changeRowLhsReal (void *soplex, int rowidx, double lhs)
 
void SoPlex_changeLhsRational (void *soplex, long *lhsnums, long *lhsdenoms, int dim)
 
void SoPlex_changeRhsReal (void *soplex, double *rhs, int dim)
 
void SoPlex_changeRowRhsReal (void *soplex, int rowidx, double rhs)
 
void SoPlex_changeRhsRational (void *soplex, long *rhsnums, long *rhsdenoms, int dim)
 
void SoPlex_changeRangeReal (void *soplex, double *lhs, double *rhs, int dim)
 
void SoPlex_changeRowRangeReal (void *soplex, int rowidx, double lhs, double rhs)
 
void SoPlex_writeFileReal (void *soplex, char *filename)
 
double SoPlex_objValueReal (void *soplex)
 
char * SoPlex_objValueRationalString (void *soplex)
 
void SoPlex_changeBoundsReal (void *soplex, double *lb, double *ub, int dim)
 
void SoPlex_changeVarBoundsReal (void *soplex, int colidx, double lb, double ub)
 
void SoPlex_changeVarBoundsRational (void *soplex, int colidx, long lbnum, long lbdenom, long ubnum, long ubdenom)
 
void SoPlex_changeLowerReal (void *soplex, double *lb, int dim)
 
void SoPlex_changeVarLowerReal (void *soplex, int colidx, double lb)
 
void SoPlex_getLowerReal (void *soplex, double *lb, int dim)
 
void SoPlex_getObjReal (void *soplex, double *obj, int dim)
 
void SoPlex_changeUpperReal (void *soplex, double *ub, int dim)
 
void SoPlex_changeVarUpperReal (void *soplex, int colidx, double ub)
 
void SoPlex_getUpperReal (void *soplex, double *ub, int dim)
 
int SoPlex_basisRowStatus (void *soplex, int rowidx)
 
int SoPlex_basisColStatus (void *soplex, int colidx)
 
void SoPlex_getRowVectorReal (void *soplex, int i, int *nnonzeros, long *indices, double *coefs)
 
void SoPlex_getRowVectorRational (void *soplex, int i, int *nnonzeros, long *indices, long *coefsnum, long *coefsdenom)
 
void SoPlex_getRowBoundsReal (void *soplex, int i, double *lb, double *ub)
 
void SoPlex_getRowBoundsRational (void *soplex, int i, long *lbnum, long *lbdenom, long *ubnum, long *ubdenom)
 

Function Documentation

◆ SoPlex_addColRational()

void SoPlex_addColRational ( void *  soplex,
long *  colnums,
long *  coldenoms,
int  colsize,
int  nnonzeros,
long  objvalnum,
long  objvaldenom,
long  lbnum,
long  lbdenom,
long  ubnum,
long  ubdenom 
)

adds a single rational column

Definition at line 132 of file soplex_interface.cpp.

References DSVectorBase< R >::add().

◆ SoPlex_addColReal()

void SoPlex_addColReal ( void *  soplex,
double *  colentries,
int  colsize,
int  nnonzeros,
double  objval,
double  lb,
double  ub 
)

adds a single (floating point) column

Definition at line 108 of file soplex_interface.cpp.

References DSVectorBase< R >::add().

◆ SoPlex_addRowRational()

void SoPlex_addRowRational ( void *  soplex,
long *  rownums,
long *  rowdenoms,
int  rowsize,
int  nnonzeros,
long  lbnum,
long  lbdenom,
long  ubnum,
long  ubdenom 
)

adds a single rational row

Definition at line 190 of file soplex_interface.cpp.

References DSVectorBase< R >::add().

◆ SoPlex_addRowReal()

void SoPlex_addRowReal ( void *  soplex,
double *  rowentries,
int  rowsize,
int  nnonzeros,
double  lb,
double  ub 
)

adds a single (floating point) row

Definition at line 166 of file soplex_interface.cpp.

References DSVectorBase< R >::add().

◆ SoPlex_basisColStatus()

int SoPlex_basisColStatus ( void *  soplex,
int  colidx 
)

returns status of column 0 -> column is set to its upper bound 1 -> column is set to its lower bound 2 -> column is fixed to its identical bounds 3 -> column is free and fixed to zero 4 -> column is basic 5 -> nothing known about basis status

Definition at line 573 of file soplex_interface.cpp.

◆ SoPlex_basisRowStatus()

int SoPlex_basisRowStatus ( void *  soplex,
int  rowidx 
)

returns status of row 0 -> row is set to its upper bound 1 -> row is set to its lower bound 2 -> row is fixed to its identical bounds 4 -> row is basic 5 -> nothing known about basis status

Definition at line 558 of file soplex_interface.cpp.

◆ SoPlex_changeBoundsReal()

void SoPlex_changeBoundsReal ( void *  soplex,
double *  lb,
double *  ub,
int  dim 
)

changes vectors of column bounds to lb and ub

Definition at line 451 of file soplex_interface.cpp.

◆ SoPlex_changeLhsRational()

void SoPlex_changeLhsRational ( void *  soplex,
long *  lhsnums,
long *  lhsdenoms,
int  dim 
)

changes rational left-hand side vector for constraints to lhs

Definition at line 343 of file soplex_interface.cpp.

◆ SoPlex_changeLhsReal()

void SoPlex_changeLhsReal ( void *  soplex,
double *  lhs,
int  dim 
)

changes left-hand side vector for constraints to lhs

Definition at line 328 of file soplex_interface.cpp.

◆ SoPlex_changeLowerReal()

void SoPlex_changeLowerReal ( void *  soplex,
double *  lb,
int  dim 
)

changes vector of lower bounds to lb

Definition at line 486 of file soplex_interface.cpp.

◆ SoPlex_changeObjRational()

void SoPlex_changeObjRational ( void *  soplex,
long *  objnums,
long *  objdenoms,
int  dim 
)

changes rational objective function vector to obj

Definition at line 307 of file soplex_interface.cpp.

◆ SoPlex_changeObjReal()

void SoPlex_changeObjReal ( void *  soplex,
double *  obj,
int  dim 
)

changes objective function vector to obj

Definition at line 299 of file soplex_interface.cpp.

◆ SoPlex_changeRangeReal()

void SoPlex_changeRangeReal ( void *  soplex,
double *  lhs,
double *  rhs,
int  dim 
)

changes both sides for constraints to given lhs and rhs

Definition at line 379 of file soplex_interface.cpp.

◆ SoPlex_changeRhsRational()

void SoPlex_changeRhsRational ( void *  soplex,
long *  rhsnums,
long *  rhsdenoms,
int  dim 
)

changes rational right-hand side vector for constraints to rhs

Definition at line 395 of file soplex_interface.cpp.

◆ SoPlex_changeRhsReal()

void SoPlex_changeRhsReal ( void *  soplex,
double *  rhs,
int  dim 
)

changes right-hand side vector for constraints to rhs

Definition at line 364 of file soplex_interface.cpp.

◆ SoPlex_changeRowLhsReal()

void SoPlex_changeRowLhsReal ( void *  soplex,
int  rowidx,
double  lhs 
)

changes left-hand side of a row to lhs

Definition at line 336 of file soplex_interface.cpp.

◆ SoPlex_changeRowRangeReal()

void SoPlex_changeRowRangeReal ( void *  soplex,
int  rowidx,
double  lhs,
double  rhs 
)

changes both sides of a row to given lhs and rhs

Definition at line 388 of file soplex_interface.cpp.

◆ SoPlex_changeRowRhsReal()

void SoPlex_changeRowRhsReal ( void *  soplex,
int  rowidx,
double  rhs 
)

changes right-hand side of a row to rhs

Definition at line 372 of file soplex_interface.cpp.

◆ SoPlex_changeUpperReal()

void SoPlex_changeUpperReal ( void *  soplex,
double *  ub,
int  dim 
)

changes vector of upper bounds to ub

Definition at line 525 of file soplex_interface.cpp.

◆ SoPlex_changeVarBoundsRational()

void SoPlex_changeVarBoundsRational ( void *  soplex,
int  colidx,
long  lbnum,
long  lbdenom,
long  ubnum,
long  ubdenom 
)

changes rational bounds of a column to lbnum/lbdenom and ubnum/ubdenom

Definition at line 467 of file soplex_interface.cpp.

◆ SoPlex_changeVarBoundsReal()

void SoPlex_changeVarBoundsReal ( void *  soplex,
int  colidx,
double  lb,
double  ub 
)

changes bounds of a column to lb and ub

Definition at line 460 of file soplex_interface.cpp.

◆ SoPlex_changeVarLowerReal()

void SoPlex_changeVarLowerReal ( void *  soplex,
int  colidx,
double  lb 
)

changes lower bound of column to lb

changes lower bound of column to ub

Definition at line 494 of file soplex_interface.cpp.

◆ SoPlex_changeVarUpperReal()

void SoPlex_changeVarUpperReal ( void *  soplex,
int  colidx,
double  ub 
)

changes upper bound of column to ub

Definition at line 533 of file soplex_interface.cpp.

◆ SoPlex_clearLPReal()

void SoPlex_clearLPReal ( void *  soplex)

clears the (floating point) LP

Definition at line 43 of file soplex_interface.cpp.

◆ SoPlex_create()

void * SoPlex_create ( )

creates new SoPlex struct

Definition at line 8 of file soplex_interface.cpp.

◆ SoPlex_free()

void SoPlex_free ( void *  soplex)

frees SoPlex struct

Definition at line 15 of file soplex_interface.cpp.

◆ SoPlex_getDualReal()

void SoPlex_getDualReal ( void *  soplex,
double *  dual,
int  dim 
)

gets dual solution

Definition at line 257 of file soplex_interface.cpp.

◆ SoPlex_getIntParam()

int SoPlex_getIntParam ( void *  soplex,
int  paramcode 
)

returns value of integer parameter

Definition at line 101 of file soplex_interface.cpp.

◆ SoPlex_getLowerReal()

void SoPlex_getLowerReal ( void *  soplex,
double *  lb,
int  dim 
)

gets lower bound vector of columns into lb

Definition at line 501 of file soplex_interface.cpp.

◆ SoPlex_getNumIterations()

int SoPlex_getNumIterations ( void *  soplex)

returns the number of iteration in last call to solve

Definition at line 292 of file soplex_interface.cpp.

◆ SoPlex_getObjReal()

void SoPlex_getObjReal ( void *  soplex,
double *  obj,
int  dim 
)

gets objective vector into obj

Definition at line 513 of file soplex_interface.cpp.

◆ SoPlex_getPrimalRationalString()

char * SoPlex_getPrimalRationalString ( void *  soplex,
int  dim 
)

Returns rational primal solution in a char pointer. The caller needs to ensure the char array is freed.

Definition at line 230 of file soplex_interface.cpp.

◆ SoPlex_getPrimalReal()

void SoPlex_getPrimalReal ( void *  soplex,
double *  primal,
int  dim 
)

gets primal solution

Definition at line 221 of file soplex_interface.cpp.

◆ SoPlex_getRedCostReal()

void SoPlex_getRedCostReal ( void *  soplex,
double *  rc,
int  dim 
)

gets reduced cost vector

Definition at line 264 of file soplex_interface.cpp.

◆ SoPlex_getRowBoundsRational()

void SoPlex_getRowBoundsRational ( void *  soplex,
int  i,
long *  lbnum,
long *  lbdenom,
long *  ubnum,
long *  ubdenom 
)

get rational lower and upper bounds of row i

Definition at line 633 of file soplex_interface.cpp.

◆ SoPlex_getRowBoundsReal()

void SoPlex_getRowBoundsReal ( void *  soplex,
int  i,
double *  lb,
double *  ub 
)

get lower and upper bounds of row i

Definition at line 624 of file soplex_interface.cpp.

◆ SoPlex_getRowVectorRational()

void SoPlex_getRowVectorRational ( void *  soplex,
int  i,
int *  nnonzeros,
long *  indices,
long *  coefsnum,
long *  coefsdenom 
)

get non-zero entries and indices of rational row i

Definition at line 598 of file soplex_interface.cpp.

References SVectorBase< R >::index(), LPRowBase< R >::rowVector(), SVectorBase< R >::size(), and SVectorBase< R >::value().

◆ SoPlex_getRowVectorReal()

void SoPlex_getRowVectorReal ( void *  soplex,
int  i,
int *  nnonzeros,
long *  indices,
double *  coefs 
)

get non-zero entries and indices of row i

Definition at line 581 of file soplex_interface.cpp.

References SVectorBase< R >::index(), SVectorBase< R >::size(), and SVectorBase< R >::value().

◆ SoPlex_getSolvingTime()

double SoPlex_getSolvingTime ( void *  soplex)

returns the time spent in last call to solve

Definition at line 285 of file soplex_interface.cpp.

◆ SoPlex_getStatus()

int SoPlex_getStatus ( void *  soplex)

returns the current solver status

Definition at line 278 of file soplex_interface.cpp.

◆ SoPlex_getUpperReal()

void SoPlex_getUpperReal ( void *  soplex,
double *  ub,
int  dim 
)

gets upper bound vector of columns into ub

Definition at line 540 of file soplex_interface.cpp.

◆ SoPlex_numCols()

int SoPlex_numCols ( void *  soplex)

returns number of columns

Definition at line 57 of file soplex_interface.cpp.

◆ SoPlex_numRows()

int SoPlex_numRows ( void *  soplex)

returns number of rows

Definition at line 50 of file soplex_interface.cpp.

◆ SoPlex_objValueRationalString()

char * SoPlex_objValueRationalString ( void *  soplex)

Returns the rational objective value (as a string) if a primal solution is available. The caller needs to ensure the char array is freed.

Definition at line 432 of file soplex_interface.cpp.

◆ SoPlex_objValueReal()

double SoPlex_objValueReal ( void *  soplex)

returns the objective value if a primal solution is available

Definition at line 423 of file soplex_interface.cpp.

◆ SoPlex_optimize()

int SoPlex_optimize ( void *  soplex)

optimizes the given LP and returns solver status

optimizes the given LP

Definition at line 271 of file soplex_interface.cpp.

◆ SoPlex_readBasisFile()

int SoPlex_readBasisFile ( void *  soplex,
const char *  filename 
)

reads basis information from filename and returns true on success

Definition at line 29 of file soplex_interface.cpp.

◆ SoPlex_readInstanceFile()

int SoPlex_readInstanceFile ( void *  soplex,
const char *  filename 
)

reads LP file in LP or MPS format according to READMODE parameter; returns true on success

Definition at line 22 of file soplex_interface.cpp.

◆ SoPlex_readSettingsFile()

int SoPlex_readSettingsFile ( void *  soplex,
const char *  filename 
)

reads settings from filename and returns true on success

Definition at line 36 of file soplex_interface.cpp.

◆ SoPlex_removeColReal()

void SoPlex_removeColReal ( void *  soplex,
int  colidx 
)

removes a single (floating point) column

Definition at line 125 of file soplex_interface.cpp.

◆ SoPlex_removeRowReal()

void SoPlex_removeRowReal ( void *  soplex,
int  rowidx 
)

removes a single (floating point) row

Definition at line 183 of file soplex_interface.cpp.

◆ SoPlex_setBoolParam()

void SoPlex_setBoolParam ( void *  soplex,
int  paramcode,
int  paramvalue 
)

sets boolean parameter value

Definition at line 80 of file soplex_interface.cpp.

◆ SoPlex_setIntParam()

void SoPlex_setIntParam ( void *  soplex,
int  paramcode,
int  paramvalue 
)

sets integer parameter value

Definition at line 87 of file soplex_interface.cpp.

◆ SoPlex_setRational()

void SoPlex_setRational ( void *  soplex)

enables rational solving mode

enables rational solving mode

Definition at line 64 of file soplex_interface.cpp.

◆ SoPlex_setRealParam()

void SoPlex_setRealParam ( void *  soplex,
int  paramcode,
double  paramvalue 
)

sets real parameter value

Definition at line 94 of file soplex_interface.cpp.

◆ SoPlex_writeFileReal()

void SoPlex_writeFileReal ( void *  soplex,
char *  filename 
)

write LP to file; LP or MPS format is chosen from the extension in filename

Definition at line 416 of file soplex_interface.cpp.