Get actual paths for every entry in a matrix.
This commit is contained in:
parent
02712cd513
commit
350bc6f756
@ -46,6 +46,7 @@ module.exports = function () {
|
|||||||
// setup output logging
|
// setup output logging
|
||||||
let logDir = path.join(this.LOGS_PATH, this.featureID);
|
let logDir = path.join(this.LOGS_PATH, this.featureID);
|
||||||
this.scenarioLogFile = path.join(logDir, this.scenarioID) + '.log';
|
this.scenarioLogFile = path.join(logDir, this.scenarioID) + '.log';
|
||||||
|
console.log(this.scenarioLogFile);
|
||||||
d3.queue(1)
|
d3.queue(1)
|
||||||
.defer(mkdirp, logDir)
|
.defer(mkdirp, logDir)
|
||||||
.defer(rimraf, this.scenarioLogFile)
|
.defer(rimraf, this.scenarioLogFile)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "engine/routing_algorithms/many_to_many.hpp"
|
#include "engine/routing_algorithms/many_to_many.hpp"
|
||||||
#include "engine/routing_algorithms/routing_base_ch.hpp"
|
#include "engine/routing_algorithms/routing_base_ch.hpp"
|
||||||
|
#include "engine/routing_algorithms/direct_shortest_path.hpp"
|
||||||
|
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/range/iterator_range_core.hpp>
|
#include <boost/range/iterator_range_core.hpp>
|
||||||
@ -161,6 +162,7 @@ std::vector<EdgeDuration> manyToManySearch(SearchEngineData<ch::Algorithm> &engi
|
|||||||
const std::vector<std::size_t> &source_indices,
|
const std::vector<std::size_t> &source_indices,
|
||||||
const std::vector<std::size_t> &target_indices)
|
const std::vector<std::size_t> &target_indices)
|
||||||
{
|
{
|
||||||
|
std::cout << 'Im in many to many search' << std::endl;
|
||||||
const auto number_of_sources = source_indices.size();
|
const auto number_of_sources = source_indices.size();
|
||||||
const auto number_of_targets = target_indices.size();
|
const auto number_of_targets = target_indices.size();
|
||||||
const auto number_of_entries = number_of_sources * number_of_targets;
|
const auto number_of_entries = number_of_sources * number_of_targets;
|
||||||
@ -168,6 +170,25 @@ std::vector<EdgeDuration> manyToManySearch(SearchEngineData<ch::Algorithm> &engi
|
|||||||
std::vector<EdgeWeight> weights_table(number_of_entries, INVALID_EDGE_WEIGHT);
|
std::vector<EdgeWeight> weights_table(number_of_entries, INVALID_EDGE_WEIGHT);
|
||||||
std::vector<EdgeDuration> durations_table(number_of_entries, MAXIMAL_EDGE_DURATION);
|
std::vector<EdgeDuration> durations_table(number_of_entries, MAXIMAL_EDGE_DURATION);
|
||||||
|
|
||||||
|
for (std::uint32_t column_idx = 0; column_idx < target_indices.size(); ++column_idx)
|
||||||
|
{
|
||||||
|
const auto &target = phantom_nodes[target_indices[column_idx]];
|
||||||
|
|
||||||
|
for (std::uint32_t row_idx = 0; row_idx < source_indices.size(); ++row_idx)
|
||||||
|
{
|
||||||
|
const auto &source = phantom_nodes[source_indices[row_idx]];
|
||||||
|
|
||||||
|
PhantomNodes pair = {source, target};
|
||||||
|
|
||||||
|
InternalRouteResult result = directShortestPathSearch(engine_working_data, facade, pair);
|
||||||
|
|
||||||
|
std::cout << 'column_idx ' << column_idx;
|
||||||
|
std::cout << ' row_idx ' << row_idx;
|
||||||
|
std::cout << ' duration' << result.duration() << std::endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<NodeBucket> search_space_with_buckets;
|
std::vector<NodeBucket> search_space_with_buckets;
|
||||||
|
|
||||||
// Populate buckets with paths from all accessible nodes to destinations via backward searches
|
// Populate buckets with paths from all accessible nodes to destinations via backward searches
|
||||||
|
Loading…
Reference in New Issue
Block a user