SoPlex Documentation
Loading...
Searching...
No Matches
soplex_interface.cpp File Reference
#include "soplex.h"
#include "soplex_interface.h"
#include <iostream>

Go to the source code of this file.

Functions

voidSoPlex_create ()
 
void SoPlex_free (void *soplex)
 
void SoPlex_clearLPReal (void *soplex)
 
int SoPlex_numRows (void *soplex)
 
int SoPlex_numCols (void *soplex)
 
void SoPlex_setRational (void *soplex)
 
void SoPlex_setIntParam (void *soplex, int paramcode, int 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_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_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)
 
charSoPlex_getPrimalRationalString (void *soplex, int dim)
 
void SoPlex_getDualReal (void *soplex, double *dual, int dim)
 
int SoPlex_optimize (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_changeLhsRational (void *soplex, long *lhsnums, long *lhsdenoms, int dim)
 
void SoPlex_changeRhsReal (void *soplex, double *rhs, int dim)
 
void SoPlex_changeRhsRational (void *soplex, long *rhsnums, long *rhsdenoms, int dim)
 
void SoPlex_writeFileReal (void *soplex, char *filename)
 
double SoPlex_objValueReal (void *soplex)
 
charSoPlex_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_changeVarUpperReal (void *soplex, int colidx, double ub)
 
void SoPlex_getUpperReal (void *soplex, double *ub, int dim)
 

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 97 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 73 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 165 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 142 of file soplex_interface.cpp.

References DSVectorBase< R >::add().

◆ 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 377 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 292 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 284 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 263 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 255 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 321 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 313 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 393 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 386 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 418 of file soplex_interface.cpp.

◆ SoPlex_clearLPReal()

void SoPlex_clearLPReal ( void * soplex)

clears the (floating point) LP

Definition at line 22 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 241 of file soplex_interface.cpp.

◆ SoPlex_getIntParam()

int SoPlex_getIntParam ( void * soplex,
int paramcode )

returns value of integer parameter

Definition at line 66 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 214 of file soplex_interface.cpp.

References DataArray< T >::append().

◆ SoPlex_getPrimalReal()

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

gets primal solution

Definition at line 205 of file soplex_interface.cpp.

◆ SoPlex_getUpperReal()

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

changes upper bound vector of columns to ub

Definition at line 425 of file soplex_interface.cpp.

◆ SoPlex_numCols()

int SoPlex_numCols ( void * soplex)

returns number of columns

Definition at line 36 of file soplex_interface.cpp.

◆ SoPlex_numRows()

int SoPlex_numRows ( void * soplex)

returns number of rows

Definition at line 29 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 358 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 349 of file soplex_interface.cpp.

◆ SoPlex_optimize()

int SoPlex_optimize ( void * soplex)

optimizes the given LP

Definition at line 248 of file soplex_interface.cpp.

◆ SoPlex_setIntParam()

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

sets integer parameter value

Definition at line 59 of file soplex_interface.cpp.

◆ SoPlex_setRational()

◆ SoPlex_writeFileReal()

void SoPlex_writeFileReal ( void * soplex,
char * filename )

write LP to file

Definition at line 342 of file soplex_interface.cpp.