[Osi] OsiCpx writeLp not working

Matthew Galati magh at lehigh.edu
Wed Jun 4 15:23:46 EDT 2008


What is the rationale for using KEEPCACHED_ROW in setRowSetTypes but 
KEEPCACHED_PROBLEM in setRowType?

Can we add a way for a user of OsiCpx to make their own decision on what 
caching to use? if they don't set it then it uses whatever logic it 
currently has, otherwise it follows the user's advice for all methods.

Thanks,
Matt


> Note/Warning: although using CPX's built-in LP works. It can be 
> extremely confusing if you plan to use it for debugging. CPX 
> apparently does a lot of internal matrix manipulation that can cause 
> your problem to look very different from one iteration to another -- 
> i.e., you could just change one row bound and go from 100 'L' 
> constraints to 100 'E' constraint with 100 extra slack vars.
>
> I suspect this, once again, is related to caching options.
>
>> If I addCols to my OsiCpx object -- it correctly keeps the 
>> information in memory, however when I call writeLp it calls the 
>> native Osi writer and does not seem to have my new columns - it only 
>> has the original problem. I assume this once again has something to 
>> do with cached information.
>>
>> One quick fix suggestion -- use Cpx's native LP writer just like we 
>> do for MPS. This is suggested in ticket 61.
>>
>> 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" );
>> }
>>
>>
>> _______________________________________________
>> Osi mailing list
>> Osi at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/osi
>>   
>





More information about the Osi mailing list