<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Follows the code:<br>
#include <coin/OsiSymSolverInterface.hpp><br>
#include <coin/symphony.h><br>
#include <sym_constants.h><br>
#include <sym_macros.h><br>
#include <sym_cg_u.h><br>
<br>
int user_find_cuts(void *user, int varnum, int iter_num, int level,<br>
int index, double objval, int *indices, double
*values,<br>
double ub, double etol, int *num_cuts, int
*alloc_cuts,<br>
cut_data ***cuts);<br>
<br>
<br>
int main(int argc, char **argv)<br>
{<br>
OsiSymSolverInterface *sym = new OsiSymSolverInterface();<br>
<br>
sym->parseCommandLine( argc, argv );<br>
<br>
sym->loadProblem();<br>
<br>
sym->branchAndBound();<br>
<br>
return(0);<br>
}<br>
<br>
int user_find_cuts(void *user, int varnum, int iter_num, int level,<br>
int index, double objval, int *indices, double
*values,<br>
double ub, double etol, int *num_cuts, int
*alloc_cuts,<br>
cut_data ***cuts)<br>
{<br>
printf("hello.\n");<br>
<br>
return USER_SUCCESS;<br>
}<br>
<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" cellpadding="0"
cellspacing="0" border="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
<td>Compiling symphony with one callback</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Wed, 11 Jan 2012 17:12:21 -0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>Haroldo Gambini Santos <a class="moz-txt-link-rfc2396E" href="mailto:haroldo.santos@gmail.com"><haroldo.santos@gmail.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:symphony@list.coin-or.org">symphony@list.coin-or.org</a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Hi,
I'm starting to build a code with SYMPHONY, mainly based in the
"Walkthrough..." example of Michael Trick.
To start I've just included a callback to insert cuts, but it appears
that is is not being called.
In Trick's example it only defines the function, but there is no
sym_set_user_callback (something like that) as I expected.
Although my (small) code compiles fine, the callback is not being called
(put a printf inside it).
What additional step should I do ?
Cheers,
Haroldo
--
=============================================================
Haroldo Gambini Santos
Computing Department - Universidade Federal de Ouro Preto - UFOP
email: haroldo [at ] iceb.ufop.br
home/research page: <a class="moz-txt-link-abbreviated" href="http://www.decom.ufop.br/haroldo/">www.decom.ufop.br/haroldo/</a>
sy
</pre>
</body>
</html>