$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] time out for r_c_shortest_paths
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2013-02-21 14:57:17
On Thu, 21 Feb 2013, Brammert Ottens wrote:
> Hi,
>
> I want to be able to put a time out on the r_c_shortest_paths, and still 
> be able to get the optimal paths that have been found so far. Currently, 
> I changed the REF such that it always returns false as soon as the time 
> out has reach, in effect emptying the unprocessed_labels queue. The 
> problem with this is that the algorithm still needs quite some time to 
> actually empty the queue.
>
> I tried to have the on_label_popped(cur_label) throw an exception when 
> the timeout has been reached. The timeout itself works like a charm, but 
> because the pareto_optimal_solutions container is only filled after the 
> while loop I can't access the already found optimal solutions.
You might want to have on_label_popped(l, g) take l by reference and set 
l.b_is_dominated to true.  You'll still need to empty the queue, but (if 
that approach works) it should be faster that way.
-- Jeremiah Willcock