<br>Virginia, <br><br><font size="2">Try this: <br><br></font>wij = new double[nnz]  --&gt;     wij = new double[n_cols]; <br><br>Menal.<br><br clear="all">Menal Guzelsoy<br>1610 4620455<br>
<br><br><div class="gmail_quote">On Thu, Dec 3, 2009 at 6:41 PM, Virginia Costa <span dir="ltr">&lt;<a href="mailto:virscosta@gmail.com">virscosta@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes,<br>
I&#39;m going to send you the first option, because I&#39;ve found a error in the second one.<br>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&#39;m not be able to find a solution.<br>

<br>It returns the following error for gr177:<br><br>Starting Preprocessing...<br>Preprocessing finished...<br>      bounds improved: 392<br>Problem has <br>     301 constraints <br>     273 variables <br>     1050 nonzero coefficients<br>

<br>Total Presolve Time: 0.001253...<br><br>Solving...<br><br>solving root lp relaxation<br>The LP value is: 1033.000 [0,95]<br><br><br>****************************************************<br>* Optimal Solution Found                           *<br>

* Now displaying stats and best solution found...  *<br>****************************************************<br><br>======================= CP Timing ===========================<br>  Cut Pool                  0.000<br>====================== LP/CG Timing =========================<br>

  LP Solution Time          0.008<br>  LP Setup Time             0.000<br>  Variable Fixing           0.000<br>  Pricing                   0.000<br>  Strong Branching          0.000<br>  Separation                0.012<br>

  Primal Heuristics         0.000<br>  Communication             0.000<br>  Total User Time              0.020<br>  Total Wallclock Time         0.022<br><br>====================== Statistics =========================<br>

Number of created nodes :       1<br>Number of analyzed nodes:       1<br>Depth of tree:                  0<br>Size of the tree:               1<br>Number of solutions found:      1<br>Number of solutions in pool:    1<br>

Number of Chains:               1<br>Number of Diving Halts:         0<br>Number of cuts in cut pool:     0<br><br>======================= LP Solver =========================<br>Number of times LP solver called:               4<br>

Number of calls from feasibility pump:          0<br>Number of calls from strong branching:          0<br>Number of solutions found by LP solve:          1<br>Number of bounds changed by strong branching:   0<br>Number of nodes pruned by strong branching:     0<br>

<br>==================== Feasibility Pump =====================<br>Number of times feasibility pump called:        0<br>Number of solutions found by feasibility pump:  0<br>Time spent in feasibility pump:                 0.00<br>

<br>=========================== Cuts ==========================<br>total cuts accepted:                   18<br>total cuts added to LPs:               9<br>total cuts deleted from LPs:           5<br>total gomory cuts generated:           0<br>

total knapsack cuts generated:         0<br>total oddhole cuts generated:          0<br>total clique cuts generated:           0<br>total probing cuts generated:          0<br>total mir cuts generated:              0<br>
total twomir cuts generated:           18<br>
total flow and cover cuts generated:   0<br>total rounding cuts generated:         0<br>total lift and project cuts generated: 0<br>total landp cuts generated:            0<br><br>cuts removed because of bad coeffs:    9<br>

cuts removed because of duplicacy:     0<br>insufficiently violated cuts:          0<br><br>cuts in root:                          18<br>gomory cuts in root:                   0<br>knapsack cuts in root:                 0<br>

oddhole cuts in root:                  0<br>clique cuts in root:                   0<br>probing cuts in root:                  0<br>mir cuts in root:                      0<br>twomir cuts in root:                   18<br>

flow and cover cuts in root:           0<br>rounding cuts in root:                 0<br>lift and project cuts in root:         0<br>landp cuts in root:                    0<br><br>time in cut generation: 0.01<br>time in gomory cuts in 3 calls: 0.00<br>

time in knapsack cuts in 3 calls: 0.00<br>time in oddhole cuts in 0 calls: 0.00<br>time in clique cuts in 3 calls: 0.00<br>time in probing cuts in 3 calls: 0.00<br>time in mir cuts in 0 calls: 0.00<br>time in twomir cuts in 3 calls: 0.00<br>

time in flow and cover cuts in 3 calls: 0.00<br>time in rounding cuts in 0 calls: 0.00<br>time in lift and project cuts in 0 calls: 0.00<br>time in landp cuts in 0 calls: 0.00<br>time in redsplit cuts in 0 calls: 0.00<br>

time in checking quality and adding: 0.00<br><br>Solution Found: Node 0, Level 0<br>Solution Cost: 1346.000<br>+++++++++++++++++++++++++++++++++++++++++++++++++++<br>User indices and values of nonzeros in the solution<br>

+++++++++++++++++++++++++++++++++++++++++++++++++++<br>      2      1.000<br>      3      1.000<br>      7      1.000<br>      9      1.000<br>     12      1.000<br>     15      1.000<br>     20      1.000<br>     23      1.000<br>

     33      1.000<br>     41      1.000<br>     57      1.000<br>     75      1.000<br>     83      1.000<br>     99      1.000<br>    129      1.000<br>    149      1.000<br>    159      1.000<br>    167      1.000<br>
    175      1.000<br>
    183      1.000<br>    209      1.000<br>    225      1.000<br>    267      1.000<br><br>Solucao otima encontrada!<br>O valor da funcao objetivo e 1346<br>*** glibc detected *** ./tsp: free(): invalid pointer: 0x0000000001f04f30 ***<br>

======= Backtrace: =========<br>/lib/libc.so.6[0x7f76eed3ccb8]<br>/lib/libc.so.6(cfree+0x76)[0x7f76eed3f276]<br>./tsp[0x401be1]<br>/lib/libc.so.6(__libc_start_main+0xe6)[0x7f76eece35a6]<br>./tsp[0x401539]<br>======= Memory map: ========<br>

00400000-00404000 r-xp 00000000 08:11 3932470                            /home/virginia/teoiv/tsp-backup021209/tsp<br>00603000-00604000 r--p 00003000 08:11 3932470                            /home/virginia/teoiv/tsp-backup021209/tsp<br>

00604000-00605000 rw-p 00004000 08:11 3932470                            /home/virginia/teoiv/tsp-backup021209/tsp<br>01efb000-020da000 rw-p 01efb000 00:00 0                                  [heap]<br>7f76e8000000-7f76e8021000 rw-p 7f76e8000000 00:00 0 <br>

7f76e8021000-7f76ec000000 ---p 7f76e8021000 00:00 0 <br>7f76ee9e9000-7f76eeac3000 r-xp 00000000 08:02 164587                     /usr/lib/libgfortran.so.3.0.0<br>7f76eeac3000-7f76eecc2000 ---p 000da000 08:02 164587                     /usr/lib/libgfortran.so.3.0.0<br>

7f76eecc2000-7f76eecc3000 r--p 000d9000 08:02 164587                     /usr/lib/libgfortran.so.3.0.0<br>7f76eecc3000-7f76eecc4000 rw-p 000da000 08:02 164587                     /usr/lib/libgfortran.so.3.0.0<br>7f76eecc4000-7f76eecc5000 rw-p 7f76eecc4000 00:00 0 <br>

7f76eecc5000-7f76eee2d000 r-xp 00000000 08:02 7735                       /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>7f76eee2d000-7f76ef02d000 ---p 00168000 08:02 7735                       /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>

7f76ef02d000-7f76ef031000 r--p 00168000 08:02 7735                       /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>7f76ef031000-7f76ef032000 rw-p 0016c000 08:02 7735                       /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>

7f76ef032000-7f76ef037000 rw-p 7f76ef032000 00:00 0 <br>7f76ef037000-7f76ef04d000 r-xp 00000000 08:02 2589                       /lib/libgcc_s.so.1<br>7f76ef04d000-7f76ef24d000 ---p 00016000 08:02 2589                       /lib/libgcc_s.so.1<br>

7f76ef24d000-7f76ef24e000 r--p 00016000 08:02 2589                       /lib/libgcc_s.so.1<br>7f76ef24e000-7f76ef24f000 rw-p 00017000 08:02 2589                       /lib/libgcc_s.so.1<br>7f76ef24f000-7f76ef340000 r-xp 00000000 08:02 9960                       /usr/lib/libstdc++.so.6.0.10<br>

7f76ef340000-7f76ef540000 ---p 000f1000 08:02 9960                       /usr/lib/libstdc++.so.6.0.10<br>7f76ef540000-7f76ef547000 r--p 000f1000 08:02 9960                       /usr/lib/libstdc++.so.6.0.10<br>7f76ef547000-7f76ef549000 rw-p 000f8000 08:02 9960                       /usr/lib/libstdc++.so.6.0.10<br>

7f76ef549000-7f76ef55c000 rw-p 7f76ef549000 00:00 0 <br>7f76ef55c000-7f76efd0f000 r-xp 00000000 08:02 224865                     /usr/lib/atlas/libblas.so.3gf.0<br>7f76efd0f000-7f76eff0e000 ---p 007b3000 08:02 224865                     /usr/lib/atlas/libblas.so.3gf.0<br>

7f76eff0e000-7f76eff13000 r--p 007b2000 08:02 224865                     /usr/lib/atlas/libblas.so.3gf.0<br>7f76eff13000-7f76eff19000 rw-p 007b7000 08:02 224865                     /usr/lib/atlas/libblas.so.3gf.0<br>7f76eff19000-7f76f06f2000 r-xp 00000000 08:02 224866                     /usr/lib/atlas/liblapack.so.3gf.0<br>

7f76f06f2000-7f76f08f1000 ---p 007d9000 08:02 224866                     /usr/lib/atlas/liblapack.so.3gf.0<br>7f76f08f1000-7f76f08f2000 r--p 007d8000 08:02 224866                     /usr/lib/atlas/liblapack.so.3gf.0<br>
7f76f08f2000-7f76f08f6000 rw-p 007d9000 08:02 224866                     /usr/lib/atlas/liblapack.so.3gf.0<br>
7f76f08f6000-7f76f0a04000 rw-p 7f76f08f6000 00:00 0 <br>7f76f0a04000-7f76f0b1a000 r-xp 00000000 08:02 445917                     /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>7f76f0b1a000-7f76f0d1a000 ---p 00116000 08:02 445917                     /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>

7f76f0d1a000-7f76f0d1c000 r--p 00116000 08:02 445917                     /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>7f76f0d1c000-7f76f0d1e000 rw-p 00118000 08:02 445917                     /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>

7f76f0d1e000-7f76f0d70000 r-xp 00000000 08:02 446084                     /opt/cCancelado<br>virginia@virginia-pc:~/teoiv/tsp-backup021209$ <br><br>Thanks a lot for the answer.<br>Virginia.<br><br><div class="gmail_quote">

2009/12/3 Menal Guzelsoy <span dir="ltr">&lt;<a href="mailto:megb@lehigh.edu" target="_blank">megb@lehigh.edu</a>&gt;</span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>Virginia, <br><br>Could you send me a sample code to reproduce the problem? <br><br>Menal.<br><br clear="all">Menal Guzelsoy<br>1610 4620455<br>
<br><br></div><div class="gmail_quote"><div>On Thu, Dec 3, 2009 at 1:08 PM, Virginia Costa <span dir="ltr">&lt;<a href="mailto:virscosta@gmail.com" target="_blank">virscosta@gmail.com</a>&gt;</span> wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Hi,<br><br>I&#39;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:<br><br>1) I used <table><tbody><tr><td>
<font size="2">virtual void OsiSymSolverInterface::loadProblem           </font></td>
          <td><font size="2">(</font></td>
          <td><font size="2">const <a href="http://www.coin-or.org/Doxygen/Osi/class_coin_packed_matrix.html" target="_blank">CoinPackedMatrix</a></font> &amp; </td>
          <td> <font size="2"><i>matrix</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>collb</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>colub</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>obj</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>rowlb</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>rowub</i></font></td><td><font size="2"> </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2">)</font></td>
          <td><br></td></tr></tbody></table><br>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&#39;s a tsp implementation),<br>This matrix returns a memory error.<br>



<br>2)<font size="2"> So, I tried to use<br></font><table><tbody><tr><td><font size="2">virtual void OsiSymSolverInterface::loadProblem           </font></td>
          <td><font size="2">(</font></td>
          <td><font size="2">const int </font></td>
          <td> <font size="2"><i>numcols</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const int </font></td>
          <td> <font size="2"><i>numrows</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const <a href="http://www.coin-or.org/Doxygen/Osi/_coin_finite_8hpp.html#1d91e832494d1d012e44c52e34d2340f" target="_blank">CoinBigIndex</a> * </font></td>
          <td> <font size="2"><i>start</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const int * </font></td>
          <td> <font size="2"><i>index</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>value</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>collb</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>colub</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>obj</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>rowlb</i>, </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2"><br></font></td>
          <td><font size="2">const double * </font></td>
          <td> <font size="2"><i>rowub</i></font></td><td><font size="2"> </font></td>
        </tr>
        <tr>
          <td><font size="2"><br></font></td>
          <td><font size="2">)</font></td>
          <td><font size="2"><br></font></td></tr></tbody></table><font size="2"><br clear="all"><br>Where, I think, we have to pass the matrix in a CCS format (</font><font size="2">Compressed Column Storage -- <a href="http://www.cs.utk.edu/%7Edongarra/etemplates/node374.html" target="_blank">http://www.cs.utk.edu/~dongarra/etemplates/node374.html</a>). But it returns the following error: terminate called after throwing an instance of &#39;CoinError&#39;. This error was returned when I try to run a problem that was solved by the loadProblem above.<br>



<br>Has anybody already seen these errors before?<br><br>Could somebody help me please?<br><br>Thanks.<br>Virginia S. Costa<br> </font><font size="2">-- </font><br>Programa de Engenharia de Sistemas e Computação<br>PESC/COPPE/UFRJ -- Rio de Janeiro/Brasil<br>



Visite nossa página web (<a href="http://www.cos.ufrj.br" target="_blank">http://www.cos.ufrj.br</a>)<br>
<br></div></div><div>_______________________________________________<br>
Symphony mailing list<br>
<a href="mailto:Symphony@list.coin-or.org" target="_blank">Symphony@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/symphony" target="_blank">http://list.coin-or.org/mailman/listinfo/symphony</a><br>
<br></div></blockquote></div><br>
</blockquote></div></div></div><div><div></div><div class="h5"><br><br clear="all"><br>-- <br>Programa de Engenharia de Sistemas e Computação<br>PESC/COPPE/UFRJ<br></div></div><div><div></div><div class="h5">Visite nossa página web (<a href="http://www.cos.ufrj.br" target="_blank">http://www.cos.ufrj.br</a>)<br>

</div></div></blockquote></div><br>