SoPlex Documentation
Loading...
Searching...
No Matches
soplex_interface.h
Go to the documentation of this file.
1
2#ifdef __cplusplus
3extern "C" {
4#endif
5
6/** creates new SoPlex struct **/
7void* SoPlex_create();
8
9/** frees SoPlex struct **/
10void SoPlex_free(void* soplex);
11
12/** clears the (floating point) LP **/
13void SoPlex_clearLPReal(void* soplex);
14
15/** returns number of rows **/
16int SoPlex_numRows(void* soplex);
17
18/** returns number of columns **/
19int SoPlex_numCols(void* soplex);
20
21/** enables rational solving mode **/
22void SoPlex_setRational(void* soplex);
23
24/** sets integer parameter value **/
25void SoPlex_setIntParam(void* soplex, int paramcode, int paramvalue);
26
27/** returns value of integer parameter **/
28int SoPlex_getIntParam(void* soplex, int paramcode);
29
30/** adds a single (floating point) column **/
32 void* soplex,
33 double* colentries,
34 int colsize,
35 int nnonzeros,
36 double objval,
37 double lb,
38 double ub
39);
40
41/** adds a single rational column **/
43 void* soplex,
44 long* colnums,
45 long* coldenoms,
46 int colsize,
47 int nnonzeros,
48 long objvalnum,
49 long objvaldenom,
50 long lbnum,
51 long lbdenom,
52 long ubnum,
53 long ubdenom
54);
55
56/** adds a single (floating point) column **/
58 void* soplex,
59 double* rowentries,
60 int rowsize,
61 int nnonzeros,
62 double lb,
63 double ub
64);
65
66/** adds a single rational row **/
68 void* soplex,
69 long* rownums,
70 long* rowdenoms,
71 int rowsize,
72 int nnonzeros,
73 long lbnum,
74 long lbdenom,
75 long ubnum,
76 long ubdenom
77);
78
79/** gets primal solution **/
80void SoPlex_getPrimalReal(void* soplex, double* primal, int dim);
81
82/** Returns rational primal solution in a char pointer.
83* The caller needs to ensure the char array is freed.
84**/
85char* SoPlex_getPrimalRationalString(void* soplex, int dim);
86
87/** gets dual solution **/
88void SoPlex_getDualReal(void* soplex, double* dual, int dim);
89
90/** optimizes the given LP **/
91int SoPlex_optimize(void* soplex);
92
93/** changes objective function vector to obj **/
94void SoPlex_changeObjReal(void* soplex, double* obj, int dim);
95
96/** changes rational objective function vector to obj **/
97void SoPlex_changeObjRational(void* soplex, long* objnums, long* objdenoms, int dim);
98
99/** changes left-hand side vector for constraints to lhs **/
100void SoPlex_changeLhsReal(void* soplex, double* lhs, int dim);
101
102/** changes rational left-hand side vector for constraints to lhs **/
103void SoPlex_changeLhsRational(void* soplex, long* lhsnums, long* lhsdenoms, int dim);
104
105/** changes right-hand side vector for constraints to rhs **/
106void SoPlex_changeRhsReal(void* soplex, double* rhs, int dim);
107
108/** changes rational right-hand side vector for constraints to rhs **/
109void SoPlex_changeRhsRational(void* soplex, long* rhsnums, long* rhsdenoms, int dim);
110
111/** write LP to file **/
112void SoPlex_writeFileReal(void* soplex, char* filename);
113
114/** returns the objective value if a primal solution is available **/
115double SoPlex_objValueReal(void* soplex);
116
117/** Returns the rational objective value (as a string) if a primal solution is available.
118* The caller needs to ensure the char array is freed.
119**/
121
122/** changes vectors of column bounds to lb and ub **/
123void SoPlex_changeBoundsReal(void* soplex, double* lb, double* ub, int dim);
124
125/** changes bounds of a column to lb and ub **/
126void SoPlex_changeVarBoundsReal(void* soplex, int colidx, double lb, double ub);
127
128/** changes rational bounds of a column to lbnum/lbdenom and ubnum/ubdenom **/
130 void* soplex,
131 int colidx,
132 long lbnum,
133 long lbdenom,
134 long ubnum,
135 long ubdenom
136);
137
138/** changes upper bound of column to ub **/
139void SoPlex_changeVarUpperReal(void* soplex, int colidx, double ub);
140
141/** changes upper bound vector of columns to ub **/
142void SoPlex_getUpperReal(void* soplex, double* ub, int dim);
143
144#ifdef __cplusplus
145}
146#endif
Everything should be within this namespace.
void SoPlex_getPrimalReal(void *soplex, double *primal, int dim)
int SoPlex_optimize(void *soplex)
void SoPlex_addRowRational(void *soplex, long *rownums, long *rowdenoms, int rowsize, int nnonzeros, long lbnum, long lbdenom, long ubnum, long ubdenom)
void SoPlex_addColReal(void *soplex, double *colentries, int colsize, int nnonzeros, double objval, double lb, double ub)
void SoPlex_clearLPReal(void *soplex)
void SoPlex_changeLhsRational(void *soplex, long *lhsnums, long *lhsdenoms, int dim)
char * SoPlex_getPrimalRationalString(void *soplex, int dim)
void SoPlex_addRowReal(void *soplex, double *rowentries, int rowsize, int nnonzeros, double lb, double ub)
void SoPlex_changeRhsRational(void *soplex, long *rhsnums, long *rhsdenoms, int dim)
char * SoPlex_objValueRationalString(void *soplex)
double SoPlex_objValueReal(void *soplex)
int SoPlex_numRows(void *soplex)
void SoPlex_changeVarBoundsReal(void *soplex, int colidx, double lb, double ub)
void SoPlex_setIntParam(void *soplex, int paramcode, int paramvalue)
int SoPlex_numCols(void *soplex)
int SoPlex_getIntParam(void *soplex, int paramcode)
void SoPlex_changeVarUpperReal(void *soplex, int colidx, 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_changeObjReal(void *soplex, double *obj, int dim)
void SoPlex_free(void *soplex)
void SoPlex_getDualReal(void *soplex, double *dual, int dim)
void SoPlex_changeLhsReal(void *soplex, double *lhs, int dim)
void SoPlex_changeRhsReal(void *soplex, double *rhs, int dim)
void SoPlex_changeObjRational(void *soplex, long *objnums, long *objdenoms, int dim)
void * SoPlex_create()
void SoPlex_writeFileReal(void *soplex, char *filename)
void SoPlex_changeBoundsReal(void *soplex, double *lb, double *ub, int dim)
void SoPlex_setRational(void *soplex)
void SoPlex_getUpperReal(void *soplex, double *ub, int dim)
void SoPlex_changeVarBoundsRational(void *soplex, int colidx, long lbnum, long lbdenom, long ubnum, long ubdenom)