[SCIP] Number of heuristic's calls
Gregor Hendel
hendel at zib.de
Wed May 9 20:16:21 CEST 2018
Hi Andre,
the properties look good for the purpose you describe, although I would
suggest to use the letter 'M' to indicate a heuristic of that name :)
Most likely, SCIP decides to restart the solution process, such that
effectively not only 1, but 2 root nodes are evaluated. Can you verify
whether SCIP actually restarted from some log file output?
If you really want to run only once, you have to include a statement
into the heurExec callback to return immediately if
SCIPheurGetNCalls(heur) > 0.
Hope this helps,
Gregor
Am 09.05.2018 um 16:33 schrieb André Filipe Lanca Serrano:
> Hi to all,
>
> I created an heuristic and I would like to call it just once, in the
> root node, as the first heuristic. I'm using the following properties
> in my heuristic.
>
> #define HEUR_NAME "myheuristic"
> #define HEUR_DESC "My heuristic"
> #define HEUR_DISPCHAR 'g'
> #define HEUR_PRIORITY 99999999
> #define HEUR_FREQ 0
> #define HEUR_FREQOFS 0
> #define HEUR_MAXDEPTH -1
> #define HEUR_TIMING SCIP_HEURTIMING_BEFORENODE
> #define HEUR_USESSUBSCIP FALSE
>
> After running my project I get two calls from my heuristic using the
> method SCIPheurGetNCalls(heur). What am I doing wrong here? Am I
> missing smth? I followed all the instructions on how to add primal
> heuristics and I guess it's smth to do with the properties...
>
> Thank you in advance.
>
> Kind regards,
> André Serrano
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
More information about the Scip
mailing list