Changeset 1436:e0beb94d08bf in lemon-0.x for lemon/lp_cplex.cc
- Timestamp:
- 05/26/05 14:16:16 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1910
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lp_cplex.cc
r1435 r1436 22 22 23 23 LpCplex::LpCplex() : LpSolverBase() { 24 env = NULL; 25 lp = NULL; 26 env = CPXopenCPLEXdevelop(&status); 27 // if (Env == NULL) 28 // { 29 // fprintf(stderr,"A CPLEX környezet megnyitása sikertelen.\n"); 30 // CPXgeterrorstring(Env, Status, ErrorMsg); 31 // fprintf(stderr,"%s",ErrorMsg); 32 // goto Terminate; 33 // } 34 35 // *** A problema létrehozása *** 24 25 // env = CPXopenCPLEXdevelop(&status); 26 env = CPXopenCPLEX(&status); 36 27 lp = CPXcreateprob(env, &status, "LP problem"); 37 38 // if (Problem == NULL) 39 // { 40 // fprintf(stderr,"Az LP létrehozása sikertelen"); 41 // goto Terminate; 42 // } 43 28 //CPXmsg (cpxresults, "Hello-bello\n"); 44 29 } 45 30 46 31 LpCplex::~LpCplex() { 47 status = CPXfreeprob(env,&lp); 48 // if (Status != 0) 49 // { 50 // fprintf(stderr,"A CPLEX feladat törlése sikertelen.\n"); 51 // CPXgeterrorstring(Env, Status, ErrorMsg); 52 // fprintf(stderr,"%s",ErrorMsg); 53 // goto Terminate; 54 // } 55 56 status = CPXcloseCPLEX(&env); 57 // if (Status != 0) 58 // { 59 // fprintf(stderr,"A CPLEX környezet bezárása sikertelen.\n"); 60 // CPXgeterrorstring(Env, Status, ErrorMsg); 61 // fprintf(stderr,"%s",ErrorMsg); 62 // goto Terminate; 63 // } 64 32 CPXfreeprob(env,&lp); 33 CPXcloseCPLEX(&env); 65 34 } 66 35 67 36 LpSolverBase &LpCplex::_newLp() 68 37 { 69 return *(LpSolverBase*)0; 70 } 38 //The first approach opens a new environment 39 LpCplex* newlp=new LpCplex(); 40 return *newlp; 41 } 42 71 43 LpSolverBase &LpCplex::_copyLp() { 72 return *(LpSolverBase*)0; 73 //Ez lesz majd CPXcloneprob (env, lp, &status); 44 //The first approach opens a new environment 45 LpCplex* newlp=new LpCplex(); 46 //The routine CPXcloneprob can be used to create a new CPLEX problem 47 //object and copy all the problem data from an existing problem 48 //object to it. Solution and starting information is not copied. 49 newlp->lp = CPXcloneprob (env, lp, &status); 50 return *newlp; 74 51 } 75 52 … … 83 60 return i; 84 61 } 62 85 63 86 64 int LpCplex::_addRow() … … 98 76 99 77 void LpCplex::_eraseCol(int i) { 100 ///\todo Not implemented yet78 CPXdelcols (env, lp, i, i); 101 79 } 102 80 103 81 void LpCplex::_eraseRow(int i) { 104 ///\todo Not implemented yet82 CPXdelrows (env, lp, i, i); 105 83 } 106 84
Note: See TracChangeset
for help on using the changeset viewer.