diff options
author | mvglasow <michael -at- vonglasow.com> | 2018-04-24 18:42:04 +0200 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2018-04-24 18:42:04 +0200 |
commit | 878c60807b6e35a8f1d7c49899fb4fce8c941cb3 (patch) | |
tree | f84d900a0b286867e722a0e9dae3fcd7f17c22b9 /navit/route_protected.h | |
parent | 4e400a641be740be4f3390dccff0c1193d91f9b4 (diff) | |
download | navit-878c60807b6e35a8f1d7c49899fb4fce8c941cb3.tar.gz |
Refactor:traffic:Definitions for dynamic route changes based on traffic
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/route_protected.h')
-rw-r--r-- | navit/route_protected.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/navit/route_protected.h b/navit/route_protected.h index 0aeb107e6..3f8ff6c90 100644 --- a/navit/route_protected.h +++ b/navit/route_protected.h @@ -34,6 +34,22 @@ extern "C" { #endif +/** Indicates that the cost of a node has increased. */ +#define TDC_INCREASED 1 + +/** Indicates that the cost of a node has decreased. */ +#define TDC_DECREASED 2 + +/** Indicates that the cost of a segment has increased. */ +#define TDC_SEG_INCREASED 4 + +/** Indicates that the cost of a segment has decreased. */ +#define TDC_SEG_DECREASED 8 + +/** Mask of flags which indicate that the cost of a segment has changed. */ +#define TDC_SEG_MASK TDC_SEG_INCREASED | TDC_SEG_DECREASED + + #define RSD_MAXSPEED(x) *((int *)route_segment_data_field_pos((x), attr_maxspeed)) /** @@ -144,6 +160,19 @@ struct route_graph { struct route_graph_point *hash[HASH_SIZE]; /**< A hashtable containing all route_graph_points in this graph */ }; +/** + * @brief Describes a traffic distortion that has been added, cleared or changed + */ +struct route_traffic_distortion_change { + struct route_graph_point *to; /**< A point whose cost has changed */ + struct route_graph_point *from; /**< If non-NULL, indicates that the changes affect the + segment linking `from` and `to` (the cost of `to` + may or may not have changed). If NULL, the cost of + `to` itself has changed and all segments leading + towards `to` must be evaluated. */ + int flags; /**< Flags to indicate how the cost has changed. */ +}; + /* prototypes */ struct route_graph_point * route_graph_add_point(struct route_graph *this, struct coord *f); |