[Symphony] Problems with OsiSymSolverInterface -- loadProblem
Menal Guzelsoy
megb at lehigh.edu
Mon Dec 7 00:28:46 EST 2009
Virginia,
Try this:
wij = new double[nnz] --> wij = new double[n_cols];
Menal.
Menal Guzelsoy
1610 4620455
On Thu, Dec 3, 2009 at 6:41 PM, Virginia Costa <virscosta at gmail.com> wrote:
> Yes,
> I'm going to send you the first option, because I've found a error in the
> second one.
> In the package you can find some tsp files. I got solutions for gr172 (4
> nodes), gr177 (7 nodes), gr179 (9 nodes) and gr1710 (10 nodes), but the
> program returns a error at the end of the solution. For gr1711 and gr17, I'm
> not be able to find a solution.
>
> It returns the following error for gr177:
>
> Starting Preprocessing...
> Preprocessing finished...
> bounds improved: 392
> Problem has
> 301 constraints
> 273 variables
> 1050 nonzero coefficients
>
> Total Presolve Time: 0.001253...
>
> Solving...
>
> solving root lp relaxation
> The LP value is: 1033.000 [0,95]
>
>
> ****************************************************
> * Optimal Solution Found *
> * Now displaying stats and best solution found... *
> ****************************************************
>
> ======================= CP Timing ===========================
> Cut Pool 0.000
> ====================== LP/CG Timing =========================
> LP Solution Time 0.008
> LP Setup Time 0.000
> Variable Fixing 0.000
> Pricing 0.000
> Strong Branching 0.000
> Separation 0.012
> Primal Heuristics 0.000
> Communication 0.000
> Total User Time 0.020
> Total Wallclock Time 0.022
>
> ====================== Statistics =========================
> Number of created nodes : 1
> Number of analyzed nodes: 1
> Depth of tree: 0
> Size of the tree: 1
> Number of solutions found: 1
> Number of solutions in pool: 1
> Number of Chains: 1
> Number of Diving Halts: 0
> Number of cuts in cut pool: 0
>
> ======================= LP Solver =========================
> Number of times LP solver called: 4
> Number of calls from feasibility pump: 0
> Number of calls from strong branching: 0
> Number of solutions found by LP solve: 1
> Number of bounds changed by strong branching: 0
> Number of nodes pruned by strong branching: 0
>
> ==================== Feasibility Pump =====================
> Number of times feasibility pump called: 0
> Number of solutions found by feasibility pump: 0
> Time spent in feasibility pump: 0.00
>
> =========================== Cuts ==========================
> total cuts accepted: 18
> total cuts added to LPs: 9
> total cuts deleted from LPs: 5
> total gomory cuts generated: 0
> total knapsack cuts generated: 0
> total oddhole cuts generated: 0
> total clique cuts generated: 0
> total probing cuts generated: 0
> total mir cuts generated: 0
> total twomir cuts generated: 18
> total flow and cover cuts generated: 0
> total rounding cuts generated: 0
> total lift and project cuts generated: 0
> total landp cuts generated: 0
>
> cuts removed because of bad coeffs: 9
> cuts removed because of duplicacy: 0
> insufficiently violated cuts: 0
>
> cuts in root: 18
> gomory cuts in root: 0
> knapsack cuts in root: 0
> oddhole cuts in root: 0
> clique cuts in root: 0
> probing cuts in root: 0
> mir cuts in root: 0
> twomir cuts in root: 18
> flow and cover cuts in root: 0
> rounding cuts in root: 0
> lift and project cuts in root: 0
> landp cuts in root: 0
>
> time in cut generation: 0.01
> time in gomory cuts in 3 calls: 0.00
> time in knapsack cuts in 3 calls: 0.00
> time in oddhole cuts in 0 calls: 0.00
> time in clique cuts in 3 calls: 0.00
> time in probing cuts in 3 calls: 0.00
> time in mir cuts in 0 calls: 0.00
> time in twomir cuts in 3 calls: 0.00
> time in flow and cover cuts in 3 calls: 0.00
> time in rounding cuts in 0 calls: 0.00
> time in lift and project cuts in 0 calls: 0.00
> time in landp cuts in 0 calls: 0.00
> time in redsplit cuts in 0 calls: 0.00
> time in checking quality and adding: 0.00
>
> Solution Found: Node 0, Level 0
> Solution Cost: 1346.000
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> User indices and values of nonzeros in the solution
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 1.000
> 3 1.000
> 7 1.000
> 9 1.000
> 12 1.000
> 15 1.000
> 20 1.000
> 23 1.000
> 33 1.000
> 41 1.000
> 57 1.000
> 75 1.000
> 83 1.000
> 99 1.000
> 129 1.000
> 149 1.000
> 159 1.000
> 167 1.000
> 175 1.000
> 183 1.000
> 209 1.000
> 225 1.000
> 267 1.000
>
> Solucao otima encontrada!
> O valor da funcao objetivo e 1346
> *** glibc detected *** ./tsp: free(): invalid pointer: 0x0000000001f04f30
> ***
> ======= Backtrace: =========
> /lib/libc.so.6[0x7f76eed3ccb8]
> /lib/libc.so.6(cfree+0x76)[0x7f76eed3f276]
> ./tsp[0x401be1]
> /lib/libc.so.6(__libc_start_main+0xe6)[0x7f76eece35a6]
> ./tsp[0x401539]
> ======= Memory map: ========
> 00400000-00404000 r-xp 00000000 08:11 3932470
> /home/virginia/teoiv/tsp-backup021209/tsp
> 00603000-00604000 r--p 00003000 08:11 3932470
> /home/virginia/teoiv/tsp-backup021209/tsp
> 00604000-00605000 rw-p 00004000 08:11 3932470
> /home/virginia/teoiv/tsp-backup021209/tsp
> 01efb000-020da000 rw-p 01efb000 00:00 0
> [heap]
> 7f76e8000000-7f76e8021000 rw-p 7f76e8000000 00:00 0
> 7f76e8021000-7f76ec000000 ---p 7f76e8021000 00:00 0
> 7f76ee9e9000-7f76eeac3000 r-xp 00000000 08:02 164587
> /usr/lib/libgfortran.so.3.0.0
> 7f76eeac3000-7f76eecc2000 ---p 000da000 08:02 164587
> /usr/lib/libgfortran.so.3.0.0
> 7f76eecc2000-7f76eecc3000 r--p 000d9000 08:02 164587
> /usr/lib/libgfortran.so.3.0.0
> 7f76eecc3000-7f76eecc4000 rw-p 000da000 08:02 164587
> /usr/lib/libgfortran.so.3.0.0
> 7f76eecc4000-7f76eecc5000 rw-p 7f76eecc4000 00:00 0
> 7f76eecc5000-7f76eee2d000 r-xp 00000000 08:02 7735
> /lib/libc-2.9.so
> 7f76eee2d000-7f76ef02d000 ---p 00168000 08:02 7735
> /lib/libc-2.9.so
> 7f76ef02d000-7f76ef031000 r--p 00168000 08:02 7735
> /lib/libc-2.9.so
> 7f76ef031000-7f76ef032000 rw-p 0016c000 08:02 7735
> /lib/libc-2.9.so
> 7f76ef032000-7f76ef037000 rw-p 7f76ef032000 00:00 0
> 7f76ef037000-7f76ef04d000 r-xp 00000000 08:02 2589
> /lib/libgcc_s.so.1
> 7f76ef04d000-7f76ef24d000 ---p 00016000 08:02 2589
> /lib/libgcc_s.so.1
> 7f76ef24d000-7f76ef24e000 r--p 00016000 08:02 2589
> /lib/libgcc_s.so.1
> 7f76ef24e000-7f76ef24f000 rw-p 00017000 08:02 2589
> /lib/libgcc_s.so.1
> 7f76ef24f000-7f76ef340000 r-xp 00000000 08:02 9960
> /usr/lib/libstdc++.so.6.0.10
> 7f76ef340000-7f76ef540000 ---p 000f1000 08:02 9960
> /usr/lib/libstdc++.so.6.0.10
> 7f76ef540000-7f76ef547000 r--p 000f1000 08:02 9960
> /usr/lib/libstdc++.so.6.0.10
> 7f76ef547000-7f76ef549000 rw-p 000f8000 08:02 9960
> /usr/lib/libstdc++.so.6.0.10
> 7f76ef549000-7f76ef55c000 rw-p 7f76ef549000 00:00 0
> 7f76ef55c000-7f76efd0f000 r-xp 00000000 08:02 224865
> /usr/lib/atlas/libblas.so.3gf.0
> 7f76efd0f000-7f76eff0e000 ---p 007b3000 08:02 224865
> /usr/lib/atlas/libblas.so.3gf.0
> 7f76eff0e000-7f76eff13000 r--p 007b2000 08:02 224865
> /usr/lib/atlas/libblas.so.3gf.0
> 7f76eff13000-7f76eff19000 rw-p 007b7000 08:02 224865
> /usr/lib/atlas/libblas.so.3gf.0
> 7f76eff19000-7f76f06f2000 r-xp 00000000 08:02 224866
> /usr/lib/atlas/liblapack.so.3gf.0
> 7f76f06f2000-7f76f08f1000 ---p 007d9000 08:02 224866
> /usr/lib/atlas/liblapack.so.3gf.0
> 7f76f08f1000-7f76f08f2000 r--p 007d8000 08:02 224866
> /usr/lib/atlas/liblapack.so.3gf.0
> 7f76f08f2000-7f76f08f6000 rw-p 007d9000 08:02 224866
> /usr/lib/atlas/liblapack.so.3gf.0
> 7f76f08f6000-7f76f0a04000 rw-p 7f76f08f6000 00:00 0
> 7f76f0a04000-7f76f0b1a000 r-xp 00000000 08:02 445917
> /opt/coin-or/build/lib/libCoinUtils.so.0.0.0
> 7f76f0b1a000-7f76f0d1a000 ---p 00116000 08:02 445917
> /opt/coin-or/build/lib/libCoinUtils.so.0.0.0
> 7f76f0d1a000-7f76f0d1c000 r--p 00116000 08:02 445917
> /opt/coin-or/build/lib/libCoinUtils.so.0.0.0
> 7f76f0d1c000-7f76f0d1e000 rw-p 00118000 08:02 445917
> /opt/coin-or/build/lib/libCoinUtils.so.0.0.0
> 7f76f0d1e000-7f76f0d70000 r-xp 00000000 08:02 446084
> /opt/cCancelado
> virginia at virginia-pc:~/teoiv/tsp-backup021209$
>
> Thanks a lot for the answer.
> Virginia.
>
> 2009/12/3 Menal Guzelsoy <megb at lehigh.edu>
>
> Virginia,
>>
>> Could you send me a sample code to reproduce the problem?
>>
>> Menal.
>>
>> Menal Guzelsoy
>> 1610 4620455
>>
>>
>> On Thu, Dec 3, 2009 at 1:08 PM, Virginia Costa <virscosta at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I'm a new user of Coin-or and I want to run a mixed integer problem with
>>> Symphony. However, I have a lot of problems with method loadProblem:
>>>
>>> 1) I used virtual void OsiSymSolverInterface::loadProblem ( const
>>> CoinPackedMatrix<http://www.coin-or.org/Doxygen/Osi/class_coin_packed_matrix.html>&
>>> *matrix*,
>>>
>>> const double * *collb*,
>>>
>>> const double * *colub*,
>>>
>>> const double * *obj*,
>>>
>>> const double * *rowlb*,
>>>
>>> const double * *rowub*
>>> )
>>>
>>> I gave a CoinPackedMatrix to this function and everything works well, but
>>> when I try to run a problem with more than 10 cities (it's a tsp
>>> implementation),
>>> This matrix returns a memory error.
>>>
>>> 2) So, I tried to use
>>> virtual void OsiSymSolverInterface::loadProblem ( const int *numcols*,
>>>
>>> const int *numrows*,
>>>
>>> const CoinBigIndex<http://www.coin-or.org/Doxygen/Osi/_coin_finite_8hpp.html#1d91e832494d1d012e44c52e34d2340f>*
>>> *start*,
>>>
>>> const int * *index*,
>>>
>>> const double * *value*,
>>>
>>> const double * *collb*,
>>>
>>> const double * *colub*,
>>>
>>> const double * *obj*,
>>>
>>> const double * *rowlb*,
>>>
>>> const double * *rowub*
>>> )
>>>
>>>
>>> Where, I think, we have to pass the matrix in a CCS format (Compressed
>>> Column Storage --
>>> http://www.cs.utk.edu/~dongarra/etemplates/node374.html<http://www.cs.utk.edu/%7Edongarra/etemplates/node374.html>).
>>> But it returns the following error: terminate called after throwing an
>>> instance of 'CoinError'. This error was returned when I try to run a problem
>>> that was solved by the loadProblem above.
>>>
>>> Has anybody already seen these errors before?
>>>
>>> Could somebody help me please?
>>>
>>> Thanks.
>>> Virginia S. Costa
>>> --
>>> Programa de Engenharia de Sistemas e Computação
>>> PESC/COPPE/UFRJ -- Rio de Janeiro/Brasil
>>> Visite nossa página web (http://www.cos.ufrj.br)
>>>
>>> _______________________________________________
>>> Symphony mailing list
>>> Symphony at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/symphony
>>>
>>>
>>
>
>
> --
> Programa de Engenharia de Sistemas e Computação
> PESC/COPPE/UFRJ
> Visite nossa página web (http://www.cos.ufrj.br)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/symphony/attachments/20091207/bd0395b0/attachment.html>
More information about the Symphony
mailing list