0
4
0
... | ... |
@@ -519,12 +519,16 @@ |
519 | 519 |
void GlpkBase::_clear() { |
520 | 520 |
glp_erase_prob(lp); |
521 | 521 |
rows.clear(); |
522 | 522 |
cols.clear(); |
523 | 523 |
} |
524 | 524 |
|
525 |
void GlpkBase::freeEnv() { |
|
526 |
glp_free_env(); |
|
527 |
} |
|
528 |
|
|
525 | 529 |
// GlpkLp members |
526 | 530 |
|
527 | 531 |
GlpkLp::GlpkLp() |
528 | 532 |
: LpBase(), GlpkBase(), LpSolver() { |
529 | 533 |
messageLevel(MESSAGE_NO_OUTPUT); |
530 | 534 |
} |
... | ... |
@@ -99,12 +99,20 @@ |
99 | 99 |
virtual Sense _getSense() const; |
100 | 100 |
|
101 | 101 |
virtual void _clear(); |
102 | 102 |
|
103 | 103 |
public: |
104 | 104 |
|
105 |
/// \brief Deallocates the globally allocated memory of GLPK. |
|
106 |
|
|
107 |
/// Deallocates the globally allocated memory of GLPK. \note |
|
108 |
/// Usually, it do not have to be called, because the GLPK use |
|
109 |
/// only a small amount of global memory, and it is deallocated |
|
110 |
/// automatically at the end of program. |
|
111 |
static void freeEnv(); |
|
112 |
|
|
105 | 113 |
///Pointer to the underlying GLPK data structure. |
106 | 114 |
LPX *lpx() {return lp;} |
107 | 115 |
///Const pointer to the underlying GLPK data structure. |
108 | 116 |
const LPX *lpx() const {return lp;} |
109 | 117 |
|
110 | 118 |
///Returns the constraint identifier understood by GLPK. |
... | ... |
@@ -363,12 +363,13 @@ |
363 | 363 |
#ifdef HAVE_GLPK |
364 | 364 |
{ |
365 | 365 |
GlpkLp lp_glpk1,lp_glpk2; |
366 | 366 |
lpTest(lp_glpk1); |
367 | 367 |
aTest(lp_glpk2); |
368 | 368 |
} |
369 |
GlpkLp::freeEnv(); |
|
369 | 370 |
#endif |
370 | 371 |
|
371 | 372 |
#ifdef HAVE_CPLEX |
372 | 373 |
try { |
373 | 374 |
CplexLp lp_cplex1,lp_cplex2; |
374 | 375 |
lpTest(lp_cplex1); |
0 comments (0 inline)