[Clp] How to get integral solution for totally unimodular matrix?

John J Forrest jjforre at us.ibm.com
Fri Jun 26 06:16:09 EDT 2009


Lasse,

Not sure why you are getting message with logLevel at 0.  If you want you
can send me code to reproduce problem.

With my modifications you are calling ClpSimplex directly.  If the code
thought it was being called from Osi (and probably therefore Cbc) it may
switch message off.  Try magic line

si->getModelPtr()->setSpecialOptions(si->getModelPtr()->specialOptions()|
32768); !!!!

and see if message goes away.

John


                                                                                              
  From:       Lasse Kliemann <lasse-list-clp-2009 at mail.plastictree.net>                       
                                                                                              
  To:         clp at list.coin-or.org                                                            
                                                                                              
  Date:       06/25/2009 03:42 PM                                                             
                                                                                              
  Subject:    Re: [Clp] How to get integral solution for totally unimodular matrix?           
                                                                                              





John, it's essentially the code you sent me, just with some
additional output for debugging. It appears however that despite
this warning message

   Clp3002W Empty problem - 250 rows, 0 columns and 0 elements

the problem is solved correctly. I also integrated your extra
code in my main application, and it works fine.

These two:

   si->getModelPtr()->numberRows()
   si->getModelPtr()->numberColumns()

also show correct numbers.

The only obvious problem left is that warning message itself,
which can be irritating.


* Message by -John J Forrest- from Thu 2009-06-25:
>
> Lasse,
>
> I don't see that the changes I suggested would cause that.  Try just
> replacing initialSolve by resolve - also print out size of model before
> resolve.  If you want to send me stuff directly do so (as long as it is
not
> too large).
>
> John Forrest
>
>
>
>   From:       Lasse Kliemann <lasse-list-coin-2009 at mail.plastictree.net>
>
>   To:         clp at list.coin-or.org
>
>   Date:       06/24/2009 02:53 PM
>
>   Subject:    Re: [Clp] How to get integral solution for totally
unimodular matrix?
>
>
>
>
>
>
> * Message by -John J Forrest- from Wed 2009-06-24:
>
> > If you replace the initialSolve by resolve, then the problem goes away.
> > However the long thin strategy is 50 times faster!
> >
> > To get good performance and normal simplex characteristics you need to
> add
> > ten lines.  I attach a modified integral.cpp.
>
> Thank you, John, for the explanation and the example code.
>
> I ran it, but it keeps complaining about an empty problem:
>
>    Clp3002W Empty problem - 250 rows, 0 columns and 0 elements
>
> The problem *is* loaded via 'assignProblem'; I also tried:
>
>    si->getModelPtr()->loadProblem(*matrix, col_lb, col_ub,
>         objective, row_lb, row_ub);
>
> to no avail.
>
>
> Thank you for a hint.
> Lasse
> [attachment "atthbeby.dat" deleted by John J Forrest/Watson/IBM]
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>



[attachment "att69tce.dat" deleted by John J Forrest/Watson/IBM]
_______________________________________________
Clp mailing list
Clp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/clp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20090626/dc1f2841/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20090626/dc1f2841/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20090626/dc1f2841/attachment-0001.gif>


More information about the Clp mailing list