[Osi-tickets] [COIN-OR Open Solver Interface] #61: writeLp

COIN-OR Open Solver Interface coin-trac at coin-or.org
Mon Jun 2 12:58:48 EDT 2008


#61: writeLp
---------------------+------------------------------------------------------
 Reporter:  mgalati  |       Owner:  mjs 
     Type:  defect   |      Status:  new 
 Priority:  minor    |   Milestone:      
Component:  OsiCpx   |     Version:  0.96
 Keywords:           |  
---------------------+------------------------------------------------------
 use native cplex writeLp: - something like

 {{{
 void OsiCpxSolverInterface::writeLp(const char *filename,
                                     const char *extension,
                                     double epsilon,
                                     int numberAcross,
                                     int decimals,
                                     double objSense,
                                     bool useRowNames) const
 {
   debugMessage("OsiCpxSolverInterface::writeLp(%s, %s, %g)\n", filename,
 extens\
 ion, objSense);

   // *FIXME* : this will not output ctype information to the MPS file
   char filetype[4] = "LP";
   std::string f(filename);
   std::string e(extension);
   std::string fullname = f + "." + e;
   int err = CPXwriteprob( env_, getMutableLpPtr(), const_cast<char*>(
 fullname.\
 c_str() ), filetype );
   checkCPXerror( err, "CPXwriteprob", "writeLp" );
 }
 }}}

-- 
Ticket URL: <https://projects.coin-or.org/Osi/ticket/61>
COIN-OR Open Solver Interface <http://projects.coin-or.org/Osi>
An API for a variety of LP and MIP solvers (and more).



More information about the Osi-tickets mailing list