[FlopCpp] Model->writeLp("OsiSchedule"); crashes om CoinAll 1.3.0: solved

Michal Kaut m_kaut at hotmail.com
Thu Nov 26 10:55:32 EST 2009


A bit more info, just in case:

The writeLp() method you are using is an Osi method, not a FlopC++ 
method, so it must be called after FlopC++ actually makes an Osi object 
out of its internal data structures.
(Remember that the '->' operator of MP_model is overloaded to point to 
the associated Osi object, i.e. the solver.)

As Tim says, the Osi object is created using the attach() method.
Since minimize() needs the Osi object to call the solver, it will call 
attach() automatically - which explains why writeLp() works after 
calling it...


Hope this helped.

Michal


Tim Hultberg wrote:
> You can use the attach method to generate the problem without solving it.
> 
> Tim
> 
> -----Original Message-----
> From: flopcpp-bounces at list.coin-or.org [mailto:flopcpp-bounces at list.coin-or.org] On Behalf Of Peter Sels
> Sent: Thursday, November 26, 2009 11:52 AM
> To: flopcpp at list.coin-or.org
> Subject: [FlopCpp] Model->writeLp("OsiSchedule"); crashes om CoinAll 1.3.0: solved
> 
> Hello All,
> 
> To make Model->writeLp("file", "txt") work, seems I needed to call
> Model->minimize(obj);
> first. The same seems to be true for Model->getNumRows() and the like.
> There may be a good technical reason for this, but from a user perspective it
> is nice to be able to check the model in an LP  file before actually
> having to solve it, especially if solving time is hours, days, weeks, ...
> 
> Maybe there is a better solution?
> 
> thanks and best regards,
> 

 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20091126/5fc1f583/attachment.html 


More information about the FlopCpp mailing list