Upgraded speed profile to the one of ORS
This commit is contained in:
parent
51cc0bb209
commit
49a088ac87
@ -24,23 +24,23 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
/* Default Speed Profile:
|
/* Default Speed Profile:
|
||||||
motorway 120
|
motorway 110
|
||||||
motorway_link 80
|
motorway_link 90
|
||||||
trunk 100
|
trunk 90
|
||||||
trunk_link 80
|
trunk_link 70
|
||||||
secondary 100
|
primary 70
|
||||||
|
primary_link 60
|
||||||
|
secondary 60
|
||||||
secondary_link 50
|
secondary_link 50
|
||||||
primary 100
|
tertiary 55
|
||||||
primary_link 50
|
|
||||||
tertiary 100
|
|
||||||
unclassified 50
|
unclassified 50
|
||||||
residential 50
|
residential 40
|
||||||
living_street 30
|
living_street 10
|
||||||
service 20
|
service 30
|
||||||
*/
|
*/
|
||||||
|
|
||||||
string names[13] = { "motorway", "motorway_link", "trunk", "trunk_link", "secondary", "secondary_link", "primary", "primary_link", "tertiary", "unclassified", "residential", "living_street", "service" };
|
string names[13] = { "motorway", "motorway_link", "trunk", "trunk_link", "primary", "primary_link", "secondary", "secondary_link", "tertiary", "unclassified", "residential", "living_street", "service" };
|
||||||
double speeds[13] = { 120, 80, 100, 80, 100, 50, 100, 50, 100, 50, 50 , 30, 20};
|
double speeds[13] = { 110, 90, 90, 70, 70, 60, 60, 50, 55, 50, 40 , 10, 30};
|
||||||
|
|
||||||
struct _Node : NodeInfo{
|
struct _Node : NodeInfo{
|
||||||
bool trafficSignal;
|
bool trafficSignal;
|
||||||
|
@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
or see http://www.gnu.org/licenses/agpl.txt.
|
or see http://www.gnu.org/licenses/agpl.txt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -106,9 +106,8 @@ int main (int argc, char *argv[])
|
|||||||
cout << "in " << get_timestamp() - time << "s" << endl;
|
cout << "in " << get_timestamp() - time << "s" << endl;
|
||||||
|
|
||||||
time = get_timestamp();
|
time = get_timestamp();
|
||||||
cout << "building search graph ..." << flush;
|
|
||||||
StaticGraph<EdgeData> * graph = new StaticGraph<EdgeData>(kdtreeService->getNumberOfNodes()-1, edgelist);
|
StaticGraph<EdgeData> * graph = new StaticGraph<EdgeData>(kdtreeService->getNumberOfNodes()-1, edgelist);
|
||||||
cout << "checking sanity ..." << flush;
|
cout << "checking data sanity ..." << flush;
|
||||||
NodeID numberOfNodes = graph->GetNumberOfNodes();
|
NodeID numberOfNodes = graph->GetNumberOfNodes();
|
||||||
for ( NodeID node = 0; node < numberOfNodes; ++node ) {
|
for ( NodeID node = 0; node < numberOfNodes; ++node ) {
|
||||||
for ( StaticGraph<EdgeData>::EdgeIterator edge = graph->BeginEdges( node ), endEdges = graph->EndEdges( node ); edge != endEdges; ++edge ) {
|
for ( StaticGraph<EdgeData>::EdgeIterator edge = graph->BeginEdges( node ), endEdges = graph->EndEdges( node ); edge != endEdges; ++edge ) {
|
||||||
@ -132,7 +131,8 @@ int main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cout << "ok" << endl;
|
cout << "in " << get_timestamp() - time << "s" << endl;
|
||||||
|
cout << "building search graph ..." << flush;
|
||||||
|
|
||||||
SearchEngine<EdgeData, StaticGraph<EdgeData> > * sEngine = new SearchEngine<EdgeData, StaticGraph<EdgeData> >(graph, kdtreeService);
|
SearchEngine<EdgeData, StaticGraph<EdgeData> > * sEngine = new SearchEngine<EdgeData, StaticGraph<EdgeData> >(graph, kdtreeService);
|
||||||
cout << "in " << get_timestamp() - time << "s" << endl;
|
cout << "in " << get_timestamp() - time << "s" << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user