Re: [eclipse-users] strategy:restart and report_success in bb_min

From: Joachim Schimpf (Independent Contractor) <"Joachim>
Date: Mon, 10 Dec 2007 19:54:03 +0800
Takis Stamatopoulos wrote:
>     Hello,
> 
> I am facing the following problem:
> 
> .....,
> bb_min(labeling(Nodes), Cost,
>        bb_options{strategy:continue, report_success:report(Nodes)}).
> 
> report(Nodes, Cost, _, _) :-
>    ...
> 
> In report/3, the variable Nodes has the value of an intermediate
> solution found. However, if I change strategy:continue to
> strategy:restart, Nodes is uninstantiated in report/3.
> 
> Any idea? Thank you very much in advance.

I have registered this as bug 584, it should be easy to fix.

In the meantime, you can work around this by using bb_min/6 and
getting the solution from the Handle, as follows:

.....,
bb_min(labeling(Nodes), Cost, Nodes, Nodes, Cost,
        bb_options{strategy:continue, report_success:report}).

report(Cost, Handle, _) :-
	bb_solution(Handle, Nodes),
	...



-- Joachim
Received on Mon Dec 10 2007 - 11:54:22 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST