Skip to main content

Constants for the fields of the /match/graph request.

Option fields

options

Constants for options.

pub const AGGREGATED_OUTPUT: &str = “aggregated_output”;

For the match_supply_demand solver only. When it is true (default), each record in the output table shows a particular truck’s scheduled cumulative round trip path (MULTILINESTRING) and the corresponding aggregated cost. Otherwise, each record shows a single scheduled truck route (LINESTRING) towards a particular demand location (store id) with its corresponding cost.

pub const BATCH_TSM_MODE: &str = “batch_tsm_mode”;

For the match_supply_demand solver only. When enabled, it sets the number of visits on each demand location by a single salesman at each trip is considered to be (one) 1, otherwise there is no bound.

pub const CHAIN_WIDTH: &str = “chain_width”;

For the markov_chain solver only. Length of the sample points lookahead window within the Markov kernel; the larger the number, the more accurate the solution.

pub const CHARGING_CANDIDATES: &str = “charging_candidates”;

For the match_charging_stations solver only. Solver searches for this many number of stations closest around each base charging location found by capacity.

pub const CHARGING_CAPACITY: &str = “charging_capacity”;

For the match_charging_stations solver only. This is the maximum ev-charging capacity of a vehicle (distance in meters or time in seconds depending on the unit of the graph weights).

pub const CHARGING_PENALTY: &str = “charging_penalty”;

For the match_charging_stations solver only. This is the penalty for full charging.

pub const CLUSTER_QUALITY_METRIC: &str = “cluster_quality_metric”;

For the match_clusters solver only. The quality metric for Louvain modularity optimization solver.

pub const DESTINATION: &str = “destination”;

WKT ending point from sample_points for the solver. The default behavior for the endpoint is to use time to determine the destination point.

pub const DETOUR_MARK_COST: &str = “detour_mark_cost”;

For the match_route_detour solver only. Cost along the route at which to search for nearby stations If zero, it solves along the trip sliding the 3 SSSP cycle kernel by radius amount.

pub const DETOUR_REENTRY_FACTOR: &str = “detour_reentry_factor”;

For the match_route_detour solver only. Multiplier on detour_mark_cost to determine the reentry point on the route (default 1.2 means 20% further along).

pub const DETOUR_SEARCH_LIMIT: &str = “detour_search_limit”;

For the match_route_detour solver only. Maximum number of nearby stations to consider within the search radius around the mark point.

pub const DETOUR_SEARCH_RADIUS: &str = “detour_search_radius”;

For the match_route_detour solver only. Search radius around the mark point for finding nearby prospective stations (e.g. cafes, pit stops, EV charging stations).

pub const EMBEDDING_WEIGHTS: &str = “embedding_weights”;

For the match_embedding solver only. User specified weights per sub feature in vector embeddings. The string contains the comma separated float values for each sub-feature in the vector space. These values will ONLY be used if ‘optimize_embedding_weights’ is false.

pub const ENABLE_REUSE: &str = “enable_reuse”;

For the match_supply_demand solver only. If specified (true), all supply actors can be scheduled for second rounds from their originating depots.

pub const EVEN: &str = “even”;

Applies odd/even rule restrictions to even tagged vehicles.

pub const FALSE: &str = “false”;
pub const FILTER_FOLDING_PATHS: &str = “filter_folding_paths”;

For the markov_chain solver only. When true (non-default), the paths per sequence combination is checked for folding over patterns and can significantly increase the execution time depending on the chain width and the number of GPS samples.

pub const FORCE_UNDIRECTED: &str = “force_undirected”;

For the match_pattern and match_embedding solvers only. Pattern matching will be using both pattern and graph as undirected if set to true.

pub const GIRVAN: &str = “girvan”;

Uses the Newman Girvan quality metric for cluster solver.

pub const GPS_NOISE: &str = “gps_noise”;

GPS noise value (in meters) to remove redundant sample points. Use -1 to disable noise reduction. The default value accounts for 95% of point variation (+ or -5 meters).

pub const INTERSECTION_PENALTY: &str = “intersection_penalty”;

This will add an additional weight over the edges labeled as ‘intersection’ if the ‘add_turn’ option parameter of the /create/graph was invoked at graph creation.

pub const INVERSE_SOLVE: &str = “inverse_solve”;

For the match_batch_solves solver only. Solves source-destination pairs using inverse shortest path solver.

pub const LEFT_TURN_PENALTY: &str = “left_turn_penalty”;

This will add an additional weight over the edges labeled as ‘left turn’ if the ‘add_turn’ option parameter of the /create/graph was invoked at graph creation.

pub const MAX_COMBINATIONS: &str = “max_combinations”;

For the match_supply_demand solver only. This is the cutoff for the number of generated combinations for sequencing the demand locations - can increase this up to 2M.

pub const MAX_HOPS: &str = “max_hops”;

For the match_similarity and match_embedding solvers only. Searches within this maximum hops for source and target node pairs to compute the Jaccard scores.

pub const MAX_LOOP_LEVEL: &str = “max_loop_level”;

For the match_loops solver only. Finds closed loops around each node deducible not more than this maximal hop (level) deep.

pub const MAX_NUM_CLUSTERS: &str = “max_num_clusters”;

For the match_clusters and match_embedding solvers only. If set (value greater than zero), it terminates when the number of clusters goes below than this number. For embedding solver the default is 8.

pub const MAX_NUM_THREADS: &str = “max_num_threads”;

For the markov_chain solver only. If specified (greater than zero), the maximum number of threads will not be greater than the specified value. It can be lower due to the memory and the number cores available. Default value of zero allows the algorithm to set the maximal number of threads within these constraints.

pub const MAX_RADIUS: &str = “max_radius”;

For the match_isochrone solver only. Sets the maximal reachability limit for computing isochrones. Zero means no limit.

pub const MAX_STOPS: &str = “max_stops”;

For the match_supply_demand solver only. If specified (greater than zero), a supply actor (truck) can at most have this many stops (demand locations) in one round trip. Otherwise, it is unlimited. If ‘enable_truck_reuse’ is on, this condition will be applied separately at each round trip use of the same truck.

pub const MAX_SUPPLY_COMBINATIONS: &str = “max_supply_combinations”;

For the match_supply_demand solver only. This is the cutoff for the number of generated combinations for sequencing the supply locations if/when ‘permute_supplies’ is true.

pub const MAX_TRIP_COST: &str = “max_trip_cost”;

For the match_supply_demand and match_pickup_dropoff solvers only. If this constraint is greater than zero (default) then the trucks/rides will skip traveling from one demand/pick location to another if the cost between them is greater than this number (distance or time). Zero (default) value means no check is performed.

pub const MAX_VECTOR_DIMENSION: &str = “max_vector_dimension”;

For the match_embedding solver only. Limits the number of dimensions in node vector embeddings.

pub const MIN_LOOP_LEVEL: &str = “min_loop_level”;

For the match_loops solver only. Finds closed loops around each node deducible not less than this minimal hop (level) deep.

pub const MULTI_STEP: &str = “multi_step”;

For the match_supply_demand solver only. Runs multiple supply demand solver repeatedly in a multi step cycle by switching supplies to demands until it reaches the main hub supply.

pub const NONE: &str = “none”;

Does not apply odd/even rule restrictions to any vehicles.

pub const NUM_CYCLES: &str = “num_cycles”;

For the match_clusters solver only. Terminates the cluster exchange iterations across 2-step-cycles (outer loop) when quality does not improve during iterations.

pub const NUM_LOOPS_PER_CYCLE: &str = “num_loops_per_cycle”;

For the match_clusters and match_embedding solvers only. Terminates the cluster exchanges within the first step iterations of a cycle (inner loop) unless convergence is reached.

pub const NUM_OUTPUT_CLUSTERS: &str = “num_output_clusters”;

For the match_clusters solver only. Limits the output to the top ‘num_output_clusters’ clusters based on density. Default value of zero outputs all clusters.

pub const NUM_SEGMENTS: &str = “num_segments”;

Maximum number of potentially matching road segments for each sample point. For the markov_chain solver, the default is 3.

pub const ODD: &str = “odd”;

Applies odd/even rule restrictions to odd tagged vehicles.

pub const OPTIMIZATION_ERROR_TOLERANCE: &str = “optimization_error_tolerance”;

For the match_embedding solver only. When the relative error between all of the weights’ consecutive iterations falls below this threshold the optimization cycle is interrupted unless the number of iterations reaches the limit set by the option ‘max_optimization_iterations’

pub const OPTIMIZATION_ITERATION_RATE: &str = “optimization_iteration_rate”;

For the match_embedding solver only. It is otherwise known as the learning rate, which is the proportionality constant in front of the gradient term in successive iterations.

pub const OPTIMIZATION_MAX_ITERATIONS: &str = “optimization_max_iterations”;

For the match_embedding solver only. When the iterations (epochs) for the convergence of the stochastic gradient descent algorithm reaches this number it bails out unless relative error between consecutive iterations is below the ‘optimization_error_tolerance’ option.

pub const OPTIMIZATION_SAMPLING_SIZE: &str = “optimization_sampling_size”;

For the match_embedding solver only. Sets the number of random nodes from the graph for solving the weights using stochastic gradient descent.

pub const OPTIMIZE_EMBEDDING_WEIGHTS: &str = “optimize_embedding_weights”;

For the match_embedding solvers only. Solves to find the optimal weights per sub feature in vector embeddings.

pub const OUTPUT_BATCH_SIZE: &str = “output_batch_size”;

For the match_loops solver only. Uses this value as the batch size of the number of loops in flushing(inserting) to the output table.

pub const OUTPUT_TRACKS: &str = “output_tracks”;

For the match_supply_demand solver only. When it is true (non-default), the output will be in tracks format for all the round trips of each truck in which the timestamps are populated directly from the edge weights starting from their originating depots.

pub const PAIRED_SIMILARITY: &str = “paired_similarity”;

For the match_similarity solver only. If true, it computes Jaccard score between each pair, otherwise it will compute Jaccard from the intersection set between the source and target nodes.

pub const PARTIAL_LOADING: &str = “partial_loading”;

For the match_supply_demand solver only. When false (non-default), trucks do not off-load at the demand (store) side if the remainder is less than the store’s need.

pub const PERMUTE_SUPPLIES: &str = “permute_supplies”;

For the match_supply_demand solver only. If specified (true), supply side actors are permuted for the demand combinations during MSDO optimization - note that this option increases optimization time significantly - use of ‘max_combinations’ option is recommended to prevent prohibitively long runs.

pub const RESTRICTED_TYPE: &str = “restricted_type”;

For the match_supply_demand solver only. Optimization is performed by restricting routes labeled by ‘MSDO_ODDEVEN_RESTRICTED’ only for this supply actor (truck) type.

pub const RIGHT_TURN_PENALTY: &str = “right_turn_penalty”;

This will add an additional weight over the edges labeled as’ right turn’ if the ‘add_turn’ option parameter of the /create/graph was invoked at graph creation.

pub const ROUND_TRIP: &str = “round_trip”;

For the match_supply_demand solver only. When enabled, the supply will have to return back to the origination location.

pub const SEARCH_LIMIT: &str = “search_limit”;

For the match_loops solver only. Searches within this limit of nodes per vertex to detect loops. The value zero means there is no limit.

pub const SEARCH_RADIUS: &str = “search_radius”;

Maximum search radius used when snapping sample points onto potentially matching surrounding segments. The default value corresponds to approximately 100 meters.

pub const SERVER_ID: &str = “server_id”;

Indicates which graph server(s) to send the request to. Default is to send to the server, amongst those containing the corresponding graph, that has the most computational bandwidth.

pub const SERVICE_LIMIT: &str = “service_limit”;

For the match_supply_demand solver only. If specified (greater than zero), any supply actor’s total service cost (distance or time) will be limited by the specified value including multiple rounds (if set).

pub const SERVICE_RADIUS: &str = “service_radius”;

For the match_supply_demand and match_pickup_dropoff solvers only. If specified (greater than zero), it filters the demands/picks outside this radius centered around the supply actor/ride’s originating location (distance or time).

pub const SHARP_TURN_PENALTY: &str = “sharp_turn_penalty”;

This will add an additional weight over the edges labeled as ‘sharp turn’ or ‘u-turn’ if the ‘add_turn’ option parameter of the /create/graph was invoked at graph creation.

pub const SOURCE: &str = “source”;

WKT starting point from sample_points for the solver. The default behavior for the endpoint is to use time to determine the starting point.

pub const SPECTRAL: &str = “spectral”;

Applies recursive spectral bisection (RSB) partitioning solver.

pub const TRAVERSAL_NODE_LIMIT: &str = “traversal_node_limit”;

For the match_similarity solver only. Limits the traversal depth if it reaches this many number of nodes.

pub const TRUE: &str = “true”;
pub const UNIT_UNLOADING_COST: &str = “unit_unloading_cost”;

For the match_supply_demand solver only. The unit cost per load amount to be delivered. If this value is greater than zero (default) then the additional cost of this unit load multiplied by the total dropped load will be added over to the trip cost to the demand location.

solve_method

Constants for solve_method.

pub const MARKOV_CHAIN: &str = “markov_chain”;

Matches sample_points to the graph using the Hidden Markov Model (HMM)-based method, which conducts a range-tree closest-edge search to find the best combinations of possible road segments (num_segments) for each sample point to create the best route. The route is secured one point at a time while looking ahead chain_width number of points, so the prediction is corrected after each point. This solution type is the most accurate but also the most computationally intensive. Related options: num_segments and chain_width.

pub const MATCH_BATCH_SOLVES: &str = “match_batch_solves”;

Matches sample_points source and destination pairs for the shortest path solves in batch mode.

pub const MATCH_CHARGING_STATIONS: &str = “match_charging_stations”;

Matches an optimal path across a number of ev-charging stations between source and target locations.

pub const MATCH_CLUSTERS: &str = “match_clusters”;

Matches the graph nodes with a cluster index using Louvain clustering algorithm.

pub const MATCH_EMBEDDING: &str = “match_embedding”;

Creates vector node embeddings.

pub const MATCH_ISOCHRONE: &str = “match_isochrone”;

Solves for isochrones for a set of input sources.

pub const MATCH_LOOPS: &str = “match_loops”;

Matches closed loops (Eulerian paths) originating and ending at each graph node within min and max hops (levels).

pub const MATCH_OD_PAIRS: &str = “match_od_pairs”;

Matches sample_points to find the most probable path between origin and destination pairs with cost constraints.

pub const MATCH_PATTERN: &str = “match_pattern”;

Matches a pattern in the graph.

pub const MATCH_PICKUP_DROPOFF: &str = “match_pickup_dropoff”;

Matches the pickups and dropoffs by optimizing the total trip costs.

pub const MATCH_ROUTE_DETOUR: &str = “match_route_detour”;

Computes detour costs for nearby stations at a mark point along each source-target route.

pub const MATCH_SIMILARITY: &str = “match_similarity”;

Matches the intersection set(s) by computing the Jaccard similarity score between node pairs.

pub const MATCH_SUPPLY_DEMAND: &str = “match_supply_demand”;

Matches sample_points to optimize scheduling multiple supplies (trucks) with varying sizes to varying demand sites with varying capacities per depot. Related options: partial_loading and max_combinations.