[Coin-lpsolver] building a model correctly

John J Forrest jjforre at us.ibm.com
Thu Jul 28 04:26:33 EDT 2005


Scott,

I will look at it (it may take a day or two to get round to it).  I will
also send you an example using CoinModel which would be faster for large
problems.

John Forrest


                                                                           
             Scott Drader                                                  
             <sdrader at shaw.ca>                                             
             Sent by:                                                   To 
             coin-lpsolver-bou                                             
             nces at list.coin-or         coin-lpsolver at list.coin-or.org      
             .org                                                       cc 
                                                                           
                                                                           
             07/26/2005 08:17                                              
             PM                                                            
                                                                           
                                                                   Subject 
                                       [Coin-lpsolver] building a model    
                                       correctly                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi,

I'm using CLP to solve some geometry problems, but have had problems with
segmentation faults. These problems need only be loaded from memory and
never written to disk. I suspect my problem might be in how I'm building
and loading my model, but I am unsure. The sequence of operations I perform
are roughly:

1. Create bounds and objective arrays.
2. Create a CoinPackedMatrix and populate it with several appendRow()
operations.
3. Create a ClpSimplex model with loadProblem(), passing in the matrix and
bounds/objective arrays.
4. Do a solve with initialSolve().

I've attached a stripped-down source file demonstrating the above sequence
in more detail.

With the above procedure I get consistent segmentation faults. There are
however two ways that I have found will indefinitely prevent the
segmentation faults.

1. Writing the problem to a file and reading it back in with
writeMps()/readMps() before solving (inbetween step 3 and 4 above).
2. Disabling the presolve (this causes several of my problems to solve less
than ideally however, maybe beacause of their degenerate nature).

I'm currently using the read/write fix above, but this is less than ideal
since I'm doing iterative real-time solves (many many solves).

Is there an obvious problems with this means of constructing and solving a
problem?

Thanks,

Scott




(See attached file: coin_crash_example.cpp)
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver

-------------- next part --------------
A non-text attachment was scrubbed...
Name: coin_crash_example.cpp
Type: application/octet-stream
Size: 922 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20050728/cf9e7724/attachment.obj>


More information about the Clp mailing list