Hi, Menal.<br><br>That&#39;s it. I was so worried about the matrix of constraints that I forgot to see the objective function. :-)<br>Now it&#39;s work well. I read a file with 48 cities  (gr48.tsp -- tsplib) and the program returns the answer without troubles.<br>
Thank you.<br>Virginia S. Costa<br><br><div class="gmail_quote">2009/12/7  <span dir="ltr">&lt;<a href="mailto:symphony-request@list.coin-or.org">symphony-request@list.coin-or.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Send Symphony mailing list submissions to<br>
        <a href="mailto:symphony@list.coin-or.org">symphony@list.coin-or.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://list.coin-or.org/mailman/listinfo/symphony" target="_blank">http://list.coin-or.org/mailman/listinfo/symphony</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:symphony-request@list.coin-or.org">symphony-request@list.coin-or.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:symphony-owner@list.coin-or.org">symphony-owner@list.coin-or.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Symphony digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Problems with OsiSymSolverInterface -- loadProblem<br>
      (Menal Guzelsoy)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 7 Dec 2009 00:28:46 -0500<br>
From: Menal Guzelsoy &lt;<a href="mailto:megb@lehigh.edu">megb@lehigh.edu</a>&gt;<br>
Subject: Re: [Symphony] Problems with OsiSymSolverInterface --<br>
        loadProblem<br>
To: Virginia Costa &lt;<a href="mailto:virscosta@gmail.com">virscosta@gmail.com</a>&gt;<br>
Cc: <a href="mailto:symphony@list.coin-or.org">symphony@list.coin-or.org</a>, Nelson Maculan<br>
        &lt;<a href="mailto:nelson.maculan@gmail.com">nelson.maculan@gmail.com</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:56b792680912062128g380d02feh3903c33f3d3f8d67@mail.gmail.com">56b792680912062128g380d02feh3903c33f3d3f8d67@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Virginia,<br>
<br>
Try this:<br>
<br>
wij = new double[nnz]  --&gt;     wij = new double[n_cols];<br>
<br>
Menal.<br>
<br>
Menal Guzelsoy<br>
1610 4620455<br>
<br>
<br>
On Thu, Dec 3, 2009 at 6:41 PM, Virginia Costa &lt;<a href="mailto:virscosta@gmail.com">virscosta@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Yes,<br>
&gt; I&#39;m going to send you the first option, because I&#39;ve found a error in the<br>
&gt; second one.<br>
&gt; In the package you can find some tsp files. I got solutions for gr172 (4<br>
&gt; nodes), gr177 (7 nodes), gr179 (9 nodes) and gr1710 (10 nodes), but the<br>
&gt; program returns a error at the end of the solution. For gr1711 and gr17, I&#39;m<br>
&gt; not be able to find a solution.<br>
&gt;<br>
&gt; It returns the following error for gr177:<br>
&gt;<br>
&gt; Starting Preprocessing...<br>
&gt; Preprocessing finished...<br>
&gt;       bounds improved: 392<br>
&gt; Problem has<br>
&gt;      301 constraints<br>
&gt;      273 variables<br>
&gt;      1050 nonzero coefficients<br>
&gt;<br>
&gt; Total Presolve Time: 0.001253...<br>
&gt;<br>
&gt; Solving...<br>
&gt;<br>
&gt; solving root lp relaxation<br>
&gt; The LP value is: 1033.000 [0,95]<br>
&gt;<br>
&gt;<br>
&gt; ****************************************************<br>
&gt; * Optimal Solution Found                           *<br>
&gt; * Now displaying stats and best solution found...  *<br>
&gt; ****************************************************<br>
&gt;<br>
&gt; ======================= CP Timing ===========================<br>
&gt;   Cut Pool                  0.000<br>
&gt; ====================== LP/CG Timing =========================<br>
&gt;   LP Solution Time          0.008<br>
&gt;   LP Setup Time             0.000<br>
&gt;   Variable Fixing           0.000<br>
&gt;   Pricing                   0.000<br>
&gt;   Strong Branching          0.000<br>
&gt;   Separation                0.012<br>
&gt;   Primal Heuristics         0.000<br>
&gt;   Communication             0.000<br>
&gt;   Total User Time              0.020<br>
&gt;   Total Wallclock Time         0.022<br>
&gt;<br>
&gt; ====================== Statistics =========================<br>
&gt; Number of created nodes :       1<br>
&gt; Number of analyzed nodes:       1<br>
&gt; Depth of tree:                  0<br>
&gt; Size of the tree:               1<br>
&gt; Number of solutions found:      1<br>
&gt; Number of solutions in pool:    1<br>
&gt; Number of Chains:               1<br>
&gt; Number of Diving Halts:         0<br>
&gt; Number of cuts in cut pool:     0<br>
&gt;<br>
&gt; ======================= LP Solver =========================<br>
&gt; Number of times LP solver called:               4<br>
&gt; Number of calls from feasibility pump:          0<br>
&gt; Number of calls from strong branching:          0<br>
&gt; Number of solutions found by LP solve:          1<br>
&gt; Number of bounds changed by strong branching:   0<br>
&gt; Number of nodes pruned by strong branching:     0<br>
&gt;<br>
&gt; ==================== Feasibility Pump =====================<br>
&gt; Number of times feasibility pump called:        0<br>
&gt; Number of solutions found by feasibility pump:  0<br>
&gt; Time spent in feasibility pump:                 0.00<br>
&gt;<br>
&gt; =========================== Cuts ==========================<br>
&gt; total cuts accepted:                   18<br>
&gt; total cuts added to LPs:               9<br>
&gt; total cuts deleted from LPs:           5<br>
&gt; total gomory cuts generated:           0<br>
&gt; total knapsack cuts generated:         0<br>
&gt; total oddhole cuts generated:          0<br>
&gt; total clique cuts generated:           0<br>
&gt; total probing cuts generated:          0<br>
&gt; total mir cuts generated:              0<br>
&gt; total twomir cuts generated:           18<br>
&gt; total flow and cover cuts generated:   0<br>
&gt; total rounding cuts generated:         0<br>
&gt; total lift and project cuts generated: 0<br>
&gt; total landp cuts generated:            0<br>
&gt;<br>
&gt; cuts removed because of bad coeffs:    9<br>
&gt; cuts removed because of duplicacy:     0<br>
&gt; insufficiently violated cuts:          0<br>
&gt;<br>
&gt; cuts in root:                          18<br>
&gt; gomory cuts in root:                   0<br>
&gt; knapsack cuts in root:                 0<br>
&gt; oddhole cuts in root:                  0<br>
&gt; clique cuts in root:                   0<br>
&gt; probing cuts in root:                  0<br>
&gt; mir cuts in root:                      0<br>
&gt; twomir cuts in root:                   18<br>
&gt; flow and cover cuts in root:           0<br>
&gt; rounding cuts in root:                 0<br>
&gt; lift and project cuts in root:         0<br>
&gt; landp cuts in root:                    0<br>
&gt;<br>
&gt; time in cut generation: 0.01<br>
&gt; time in gomory cuts in 3 calls: 0.00<br>
&gt; time in knapsack cuts in 3 calls: 0.00<br>
&gt; time in oddhole cuts in 0 calls: 0.00<br>
&gt; time in clique cuts in 3 calls: 0.00<br>
&gt; time in probing cuts in 3 calls: 0.00<br>
&gt; time in mir cuts in 0 calls: 0.00<br>
&gt; time in twomir cuts in 3 calls: 0.00<br>
&gt; time in flow and cover cuts in 3 calls: 0.00<br>
&gt; time in rounding cuts in 0 calls: 0.00<br>
&gt; time in lift and project cuts in 0 calls: 0.00<br>
&gt; time in landp cuts in 0 calls: 0.00<br>
&gt; time in redsplit cuts in 0 calls: 0.00<br>
&gt; time in checking quality and adding: 0.00<br>
&gt;<br>
&gt; Solution Found: Node 0, Level 0<br>
&gt; Solution Cost: 1346.000<br>
&gt; +++++++++++++++++++++++++++++++++++++++++++++++++++<br>
&gt; User indices and values of nonzeros in the solution<br>
&gt; +++++++++++++++++++++++++++++++++++++++++++++++++++<br>
&gt;       2      1.000<br>
&gt;       3      1.000<br>
&gt;       7      1.000<br>
&gt;       9      1.000<br>
&gt;      12      1.000<br>
&gt;      15      1.000<br>
&gt;      20      1.000<br>
&gt;      23      1.000<br>
&gt;      33      1.000<br>
&gt;      41      1.000<br>
&gt;      57      1.000<br>
&gt;      75      1.000<br>
&gt;      83      1.000<br>
&gt;      99      1.000<br>
&gt;     129      1.000<br>
&gt;     149      1.000<br>
&gt;     159      1.000<br>
&gt;     167      1.000<br>
&gt;     175      1.000<br>
&gt;     183      1.000<br>
&gt;     209      1.000<br>
&gt;     225      1.000<br>
&gt;     267      1.000<br>
&gt;<br>
&gt; Solucao otima encontrada!<br>
&gt; O valor da funcao objetivo e 1346<br>
&gt; *** glibc detected *** ./tsp: free(): invalid pointer: 0x0000000001f04f30<br>
&gt; ***<br>
&gt; ======= Backtrace: =========<br>
&gt; /lib/libc.so.6[0x7f76eed3ccb8]<br>
&gt; /lib/libc.so.6(cfree+0x76)[0x7f76eed3f276]<br>
&gt; ./tsp[0x401be1]<br>
&gt; /lib/libc.so.6(__libc_start_main+0xe6)[0x7f76eece35a6]<br>
&gt; ./tsp[0x401539]<br>
&gt; ======= Memory map: ========<br>
&gt; 00400000-00404000 r-xp 00000000 08:11 3932470<br>
&gt; /home/virginia/teoiv/tsp-backup021209/tsp<br>
&gt; 00603000-00604000 r--p 00003000 08:11 3932470<br>
&gt; /home/virginia/teoiv/tsp-backup021209/tsp<br>
&gt; 00604000-00605000 rw-p 00004000 08:11 3932470<br>
&gt; /home/virginia/teoiv/tsp-backup021209/tsp<br>
&gt; 01efb000-020da000 rw-p 01efb000 00:00 0<br>
&gt; [heap]<br>
&gt; 7f76e8000000-7f76e8021000 rw-p 7f76e8000000 00:00 0<br>
&gt; 7f76e8021000-7f76ec000000 ---p 7f76e8021000 00:00 0<br>
&gt; 7f76ee9e9000-7f76eeac3000 r-xp 00000000 08:02 164587<br>
&gt; /usr/lib/libgfortran.so.3.0.0<br>
&gt; 7f76eeac3000-7f76eecc2000 ---p 000da000 08:02 164587<br>
&gt; /usr/lib/libgfortran.so.3.0.0<br>
&gt; 7f76eecc2000-7f76eecc3000 r--p 000d9000 08:02 164587<br>
&gt; /usr/lib/libgfortran.so.3.0.0<br>
&gt; 7f76eecc3000-7f76eecc4000 rw-p 000da000 08:02 164587<br>
&gt; /usr/lib/libgfortran.so.3.0.0<br>
&gt; 7f76eecc4000-7f76eecc5000 rw-p 7f76eecc4000 00:00 0<br>
&gt; 7f76eecc5000-7f76eee2d000 r-xp 00000000 08:02 7735<br>
&gt; /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>
&gt; 7f76eee2d000-7f76ef02d000 ---p 00168000 08:02 7735<br>
&gt; /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>
&gt; 7f76ef02d000-7f76ef031000 r--p 00168000 08:02 7735<br>
&gt; /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>
&gt; 7f76ef031000-7f76ef032000 rw-p 0016c000 08:02 7735<br>
&gt; /lib/<a href="http://libc-2.9.so" target="_blank">libc-2.9.so</a><br>
&gt; 7f76ef032000-7f76ef037000 rw-p 7f76ef032000 00:00 0<br>
&gt; 7f76ef037000-7f76ef04d000 r-xp 00000000 08:02 2589<br>
&gt; /lib/libgcc_s.so.1<br>
&gt; 7f76ef04d000-7f76ef24d000 ---p 00016000 08:02 2589<br>
&gt; /lib/libgcc_s.so.1<br>
&gt; 7f76ef24d000-7f76ef24e000 r--p 00016000 08:02 2589<br>
&gt; /lib/libgcc_s.so.1<br>
&gt; 7f76ef24e000-7f76ef24f000 rw-p 00017000 08:02 2589<br>
&gt; /lib/libgcc_s.so.1<br>
&gt; 7f76ef24f000-7f76ef340000 r-xp 00000000 08:02 9960<br>
&gt; /usr/lib/libstdc++.so.6.0.10<br>
&gt; 7f76ef340000-7f76ef540000 ---p 000f1000 08:02 9960<br>
&gt; /usr/lib/libstdc++.so.6.0.10<br>
&gt; 7f76ef540000-7f76ef547000 r--p 000f1000 08:02 9960<br>
&gt; /usr/lib/libstdc++.so.6.0.10<br>
&gt; 7f76ef547000-7f76ef549000 rw-p 000f8000 08:02 9960<br>
&gt; /usr/lib/libstdc++.so.6.0.10<br>
&gt; 7f76ef549000-7f76ef55c000 rw-p 7f76ef549000 00:00 0<br>
&gt; 7f76ef55c000-7f76efd0f000 r-xp 00000000 08:02 224865<br>
&gt; /usr/lib/atlas/libblas.so.3gf.0<br>
&gt; 7f76efd0f000-7f76eff0e000 ---p 007b3000 08:02 224865<br>
&gt; /usr/lib/atlas/libblas.so.3gf.0<br>
&gt; 7f76eff0e000-7f76eff13000 r--p 007b2000 08:02 224865<br>
&gt; /usr/lib/atlas/libblas.so.3gf.0<br>
&gt; 7f76eff13000-7f76eff19000 rw-p 007b7000 08:02 224865<br>
&gt; /usr/lib/atlas/libblas.so.3gf.0<br>
&gt; 7f76eff19000-7f76f06f2000 r-xp 00000000 08:02 224866<br>
&gt; /usr/lib/atlas/liblapack.so.3gf.0<br>
&gt; 7f76f06f2000-7f76f08f1000 ---p 007d9000 08:02 224866<br>
&gt; /usr/lib/atlas/liblapack.so.3gf.0<br>
&gt; 7f76f08f1000-7f76f08f2000 r--p 007d8000 08:02 224866<br>
&gt; /usr/lib/atlas/liblapack.so.3gf.0<br>
&gt; 7f76f08f2000-7f76f08f6000 rw-p 007d9000 08:02 224866<br>
&gt; /usr/lib/atlas/liblapack.so.3gf.0<br>
&gt; 7f76f08f6000-7f76f0a04000 rw-p 7f76f08f6000 00:00 0<br>
&gt; 7f76f0a04000-7f76f0b1a000 r-xp 00000000 08:02 445917<br>
&gt; /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>
&gt; 7f76f0b1a000-7f76f0d1a000 ---p 00116000 08:02 445917<br>
&gt; /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>
&gt; 7f76f0d1a000-7f76f0d1c000 r--p 00116000 08:02 445917<br>
&gt; /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>
&gt; 7f76f0d1c000-7f76f0d1e000 rw-p 00118000 08:02 445917<br>
&gt; /opt/coin-or/build/lib/libCoinUtils.so.0.0.0<br>
&gt; 7f76f0d1e000-7f76f0d70000 r-xp 00000000 08:02 446084<br>
&gt; /opt/cCancelado<br>
&gt; virginia@virginia-pc:~/teoiv/tsp-backup021209$<br>
&gt;<br>
&gt; Thanks a lot for the answer.<br>
&gt; Virginia.<br>
&gt;<br>
&gt; 2009/12/3 Menal Guzelsoy &lt;<a href="mailto:megb@lehigh.edu">megb@lehigh.edu</a>&gt;<br>
&gt;<br>
&gt; Virginia,<br>
&gt;&gt;<br>
&gt;&gt; Could you send me a sample code to reproduce the problem?<br>
&gt;&gt;<br>
&gt;&gt; Menal.<br>
&gt;&gt;<br>
&gt;&gt; Menal Guzelsoy<br>
&gt;&gt; 1610 4620455<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Dec 3, 2009 at 1:08 PM, Virginia Costa &lt;<a href="mailto:virscosta@gmail.com">virscosta@gmail.com</a>&gt;wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m a new user of Coin-or and I want to run a mixed integer problem with<br>
&gt;&gt;&gt; Symphony. However, I have a lot of problems with method loadProblem:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 1) I used virtual void OsiSymSolverInterface::loadProblem ( const<br>
&gt;&gt;&gt; CoinPackedMatrix&lt;<a href="http://www.coin-or.org/Doxygen/Osi/class_coin_packed_matrix.html" target="_blank">http://www.coin-or.org/Doxygen/Osi/class_coin_packed_matrix.html</a>&gt;&amp;<br>
&gt;&gt;&gt; *matrix*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *collb*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *colub*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *obj*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *rowlb*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *rowub*<br>
&gt;&gt;&gt; )<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I gave a CoinPackedMatrix to this function and everything works well, but<br>
&gt;&gt;&gt; when I try to run a problem with more than 10 cities (it&#39;s a tsp<br>
&gt;&gt;&gt; implementation),<br>
&gt;&gt;&gt; This matrix returns a memory error.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2) So, I tried to use<br>
&gt;&gt;&gt; virtual void OsiSymSolverInterface::loadProblem ( const int  *numcols*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const int  *numrows*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const CoinBigIndex&lt;<a href="http://www.coin-or.org/Doxygen/Osi/_coin_finite_8hpp.html#1d91e832494d1d012e44c52e34d2340f" target="_blank">http://www.coin-or.org/Doxygen/Osi/_coin_finite_8hpp.html#1d91e832494d1d012e44c52e34d2340f</a>&gt;*<br>

&gt;&gt;&gt; *start*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const int *  *index*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *value*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *collb*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *colub*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *obj*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *rowlb*,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; const double *  *rowub*<br>
&gt;&gt;&gt; )<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Where, I think, we have to pass the matrix in a CCS format (Compressed<br>
&gt;&gt;&gt; Column Storage --<br>
&gt;&gt;&gt; <a href="http://www.cs.utk.edu/%7Edongarra/etemplates/node374.html" target="_blank">http://www.cs.utk.edu/~dongarra/etemplates/node374.html</a>&lt;<a href="http://www.cs.utk.edu/%7Edongarra/etemplates/node374.html" target="_blank">http://www.cs.utk.edu/%7Edongarra/etemplates/node374.html</a>&gt;).<br>

&gt;&gt;&gt; But it returns the following error: terminate called after throwing an<br>
&gt;&gt;&gt; instance of &#39;CoinError&#39;. This error was returned when I try to run a problem<br>
&gt;&gt;&gt; that was solved by the loadProblem above.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Has anybody already seen these errors before?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Could somebody help me please?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks.<br>
&gt;&gt;&gt; Virginia S. Costa<br>
&gt;&gt;&gt;  --<br>
&gt;&gt;&gt; Programa de Engenharia de Sistemas e Computa??o<br>
&gt;&gt;&gt; PESC/COPPE/UFRJ -- Rio de Janeiro/Brasil<br>
&gt;&gt;&gt; Visite nossa p?gina web (<a href="http://www.cos.ufrj.br" target="_blank">http://www.cos.ufrj.br</a>)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Symphony mailing list<br>
&gt;&gt;&gt; <a href="mailto:Symphony@list.coin-or.org">Symphony@list.coin-or.org</a><br>
&gt;&gt;&gt; <a href="http://list.coin-or.org/mailman/listinfo/symphony" target="_blank">http://list.coin-or.org/mailman/listinfo/symphony</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Programa de Engenharia de Sistemas e Computa??o<br>
&gt; PESC/COPPE/UFRJ<br>
&gt; Visite nossa p?gina web (<a href="http://www.cos.ufrj.br" target="_blank">http://www.cos.ufrj.br</a>)<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://list.coin-or.org/pipermail/symphony/attachments/20091207/bd0395b0/attachment.html" target="_blank">http://list.coin-or.org/pipermail/symphony/attachments/20091207/bd0395b0/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Symphony mailing list<br>
<a href="mailto:Symphony@list.coin-or.org">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>
<br>
End of Symphony Digest, Vol 54, Issue 3<br>
***************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Programa de Engenharia de Sistemas e Computação<br>PESC/COPPE/UFRJ<br>Visite nossa página web (<a href="http://www.cos.ufrj.br">http://www.cos.ufrj.br</a>)<br>