lemon/lp_cplex.cc
changeset 2600 e5530c0a018c
parent 2553 bfced05fa852
child 2605 852361980706
equal deleted inserted replaced
25:14b0c166681d 26:8c95c537e123
    89     ///\bug Untested
    89     ///\bug Untested
    90     int storespace;
    90     int storespace;
    91     CPXgetcolname(env, lp, 0, 0, 0, &storespace, col, col);
    91     CPXgetcolname(env, lp, 0, 0, 0, &storespace, col, col);
    92 
    92 
    93     storespace *= -1;
    93     storespace *= -1;
    94     char buf[storespace];
    94     std::vector<char> buf(storespace);
    95     char *names[1];
    95     char *names[1];
    96     int dontcare;
    96     int dontcare;
    97     ///\bug return code unchecked for error
    97     ///\bug return code unchecked for error
    98     CPXgetcolname(env, lp, names, buf, storespace, &dontcare, col, col);
    98     CPXgetcolname(env, lp, names, &*buf.begin(), storespace, &dontcare, col, col);
    99     name = names[0];
    99     name = names[0];
   100   }
   100   }
   101   
   101   
   102   void LpCplex::_setColName(int col, const std::string &name)
   102   void LpCplex::_setColName(int col, const std::string &name)
   103   {
   103   {
   400     //printf("Objective value: %g \n",objval);
   400     //printf("Objective value: %g \n",objval);
   401     return objval;
   401     return objval;
   402   }
   402   }
   403   bool LpCplex::_isBasicCol(int i) const
   403   bool LpCplex::_isBasicCol(int i) const
   404   {
   404   {
   405     int cstat[CPXgetnumcols(env, lp)];
   405     std::vector<int> cstat(CPXgetnumcols(env, lp));
   406     CPXgetbase(env, lp, cstat, NULL);
   406     CPXgetbase(env, lp, &*cstat.begin(), NULL);
   407     return (cstat[i]==CPX_BASIC);
   407     return (cstat[i]==CPX_BASIC);
   408   }  
   408   }  
   409 
   409 
   410 //7.5-os cplex statusai (Vigyazat: a 9.0-asei masok!)
   410 //7.5-os cplex statusai (Vigyazat: a 9.0-asei masok!)
   411 // This table lists the statuses, returned by the CPXgetstat() routine, for solutions to LP problems or mixed integer problems. If no solution exists, the return value is zero.
   411 // This table lists the statuses, returned by the CPXgetstat() routine, for solutions to LP problems or mixed integer problems. If no solution exists, the return value is zero.