Compare commits
No commits in common. "9ce5765192d4c533acb0de972309ee5c27b9f064" and "faa5d7ca4b9b16442de4bd3c3cc49567cfd56598" have entirely different histories.
9ce5765192
...
faa5d7ca4b
@ -488,8 +488,6 @@ void dijkstra_solver_free(struct dijkstra_solver *solver)
|
|||||||
for (l = solver->net_metas; l != NULL; l = l->next) {
|
for (l = solver->net_metas; l != NULL; l = l->next) {
|
||||||
net_meta = (struct dijkstra_net_meta*) l->data;
|
net_meta = (struct dijkstra_net_meta*) l->data;
|
||||||
free(net_meta->name);
|
free(net_meta->name);
|
||||||
if (net_meta->access)
|
|
||||||
free(net_meta->access);
|
|
||||||
free(net_meta);
|
free(net_meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,10 +549,7 @@ struct dijkstra_net_meta *dijkstra_net_meta_new(enum dijkstra_net_type net_type,
|
|||||||
if (net_meta) {
|
if (net_meta) {
|
||||||
net_meta->type = net_type;
|
net_meta->type = net_type;
|
||||||
net_meta->name = strdup(name);
|
net_meta->name = strdup(name);
|
||||||
if (access)
|
net_meta->access = access;
|
||||||
net_meta->access = strdup(access);
|
|
||||||
else
|
|
||||||
net_meta->access = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return net_meta;
|
return net_meta;
|
||||||
@ -573,9 +568,7 @@ struct dijkstra_net_meta *dijkstra_net_meta_new_to_list(struct dijkstra_solver *
|
|||||||
|
|
||||||
for (l = solver->net_metas; l != NULL; l = l->next) {
|
for (l = solver->net_metas; l != NULL; l = l->next) {
|
||||||
net_meta = l->data;
|
net_meta = l->data;
|
||||||
if (net_meta->type == net_type &&
|
if (net_meta->type == net_type && !strcmp(net_meta->name, name)) {
|
||||||
!strcmp(net_meta->name, name) &&
|
|
||||||
(net_meta->access && (!strcmp(net_meta->access, access)))) {
|
|
||||||
return net_meta;
|
return net_meta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ int add_geojson_to_dijkstra(struct dijkstra_solver *solver,
|
|||||||
z_last = 1000; // By default, let's assume 10x normal speed
|
z_last = 1000; // By default, let's assume 10x normal speed
|
||||||
break;
|
break;
|
||||||
case ACCESS:
|
case ACCESS:
|
||||||
z_last = 99; // TODO: By default, let's introduce a penalty to get on the train (ACCESS walk 10x slower)
|
z_last = 10; // By default, let's introduce a penalty to get on the train (ACCESS walk 10x slower)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
z_last = -1;
|
z_last = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user