debug cucumber accuracy errors
This commit is contained in:
parent
6d17b290fd
commit
d848a72bba
@ -51,7 +51,7 @@ module.exports = function () {
|
||||
.defer(rimraf, this.scenarioLogFile)
|
||||
.awaitAll(callback);
|
||||
// uncomment to get path to logfile
|
||||
// console.log(' Writing logging output to ' + this.scenarioLogFile);
|
||||
console.log(' Writing logging output to ' + this.scenarioLogFile);
|
||||
});
|
||||
|
||||
this.After((scenario, callback) => {
|
||||
|
||||
@ -5,21 +5,44 @@ Feature: Basic Distance Matrix
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
And the partition extra arguments "--small-component-size 1 --max-cell-sizes 2,4,8,16"
|
||||
# Scenario: Testbot - Travel distance matrix of small grid
|
||||
# Given the node map
|
||||
# """
|
||||
# a b c
|
||||
# d e f
|
||||
# """
|
||||
|
||||
# And the ways
|
||||
# | nodes |
|
||||
# | abc |
|
||||
# | def |
|
||||
# | ad |
|
||||
# | be |
|
||||
# | cf |
|
||||
|
||||
# When I request a travel distance matrix I should get
|
||||
# | | a | b | e | f |
|
||||
# | a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
||||
# | b | 100+-1 | 0 | 100+-1 | 200+-1 |
|
||||
# | e | 200+-1 | 100+-1 | 0 | 100+-1 |
|
||||
# | f | 300+-1 | 200+-1 | 100+-1 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel distance matrix of minimal network
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
a z
|
||||
b
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| az |
|
||||
| zb |
|
||||
|
||||
When I request a travel distance matrix I should get
|
||||
| | a | b |
|
||||
| a | 0 | 100+-1 |
|
||||
| b | 100+-1 | 0 |
|
||||
| a | 0 | 400+-1 |
|
||||
| b | 400+-1 | 0 |
|
||||
|
||||
Scenario: Testbot - Travel distance matrix of minimal network with toll exclude
|
||||
Given the query options
|
||||
|
||||
@ -64,6 +64,7 @@ void relaxOutgoingEdges(const DataFacade<mld::Algorithm> &facade,
|
||||
const auto &cell = cells.GetCell(metric, level, partition.GetCell(level, node));
|
||||
if (DIRECTION == FORWARD_DIRECTION)
|
||||
{ // Shortcuts in forward direction
|
||||
// std::cout << "FORWARD_DIRECTION relaxOutgoingEdges" << std::endl;
|
||||
auto destination = cell.GetDestinationNodes().begin();
|
||||
auto shortcut_durations = cell.GetOutDuration(node);
|
||||
auto shortcut_distances = cell.GetOutDistance(node);
|
||||
@ -272,8 +273,8 @@ oneToManySearch(SearchEngineData<Algorithm> &engine_working_data,
|
||||
const auto path_duration = duration + target_duration;
|
||||
const auto path_distance = distance + target_distance;
|
||||
|
||||
if (std::tie(path_weight, path_duration) <
|
||||
std::tie(weights[index], durations[index]))
|
||||
if (std::tie(path_weight, path_duration, path_distance) <
|
||||
std::tie(weights[index], durations[index], distances_table[index]))
|
||||
{
|
||||
weights[index] = path_weight;
|
||||
durations[index] = path_duration;
|
||||
@ -533,10 +534,13 @@ void forwardRoutingStep(const DataFacade<Algorithm> &facade,
|
||||
std::vector<NodeID> &middle_nodes_table,
|
||||
const PhantomNode &phantom_node)
|
||||
{
|
||||
std::cout << (DIRECTION == FORWARD_DIRECTION ? "forward_routing_step FORWARD_DIRECTION: " : "forward_routing_step REVERSE_DIRECTION: ") << std::endl;
|
||||
const auto node = query_heap.DeleteMin();
|
||||
const auto source_weight = query_heap.GetKey(node);
|
||||
const auto source_duration = query_heap.GetData(node).duration;
|
||||
const auto source_distance = query_heap.GetData(node).distance;
|
||||
std::cout << "source_duration: " << source_duration << std::endl;
|
||||
std::cout << "source_distance: " << source_distance << std::endl;
|
||||
|
||||
// Check if each encountered node has an entry
|
||||
const auto &bucket_list = std::equal_range(search_space_with_buckets.begin(),
|
||||
@ -550,6 +554,9 @@ void forwardRoutingStep(const DataFacade<Algorithm> &facade,
|
||||
const auto target_weight = current_bucket.weight;
|
||||
const auto target_duration = current_bucket.duration;
|
||||
const auto target_distance = current_bucket.distance;
|
||||
std::cout << "target_duration: " << target_duration << std::endl;
|
||||
std::cout << "target_distance: " << target_distance << std::endl;
|
||||
|
||||
|
||||
// Get the value location in the results tables:
|
||||
// * row-major direct (row_idx, column_idx) index for forward direction
|
||||
@ -574,6 +581,8 @@ void forwardRoutingStep(const DataFacade<Algorithm> &facade,
|
||||
current_duration = new_duration;
|
||||
current_distance = new_distance;
|
||||
middle_nodes_table[location] = node;
|
||||
std::cout << "new_duration: " << new_duration << std::endl;
|
||||
std::cout << "new_distance: " << new_distance << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -389,6 +389,7 @@ void ExtractionContainers::PrepareEdges(ScriptingEnvironment &scripting_environm
|
||||
|
||||
const auto accurate_distance =
|
||||
util::coordinate_calculation::fccApproximateDistance(source_coord, target_coord);
|
||||
std::cout << "accurate_distance: " << accurate_distance << std::endl;
|
||||
|
||||
ExtractionSegment segment(source_coord, target_coord, distance, weight, duration);
|
||||
scripting_environment.ProcessSegment(segment);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user