Package com.gpudb.protocol
Class SolveGraphRequest
- java.lang.Object
-
- com.gpudb.protocol.SolveGraphRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class SolveGraphRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.solveGraph.Solves an existing graph for a type of problem (e.g., shortest path, page rank, traveling salesman, etc.) using source nodes, destination nodes, and additional, optional weights and restrictions.
IMPORTANT: It's highly recommended that you review the Graphs and Solvers concepts documentation, the Graph REST Tutorial, and/or some /solve/graph examples before using this endpoint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolveGraphRequest.OptionsA set of string constants for theSolveGraphRequestparameteroptions.static classSolveGraphRequest.SolverTypeA set of string constants for theSolveGraphRequestparametersolverType.
-
Constructor Summary
Constructors Constructor Description SolveGraphRequest()Constructs a SolveGraphRequest object with default parameters.SolveGraphRequest(String graphName, List<String> weightsOnEdges, List<String> restrictions, String solverType, List<String> sourceNodes, List<String> destinationNodes, String solutionTable, Map<String,String> options)Constructs a SolveGraphRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.List<String>getDestinationNodes()It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes.StringgetGraphName()Name of the graph resource to solve.Map<String,String>getOptions()Additional parameters.List<String>getRestrictions()Additional restrictions to apply to the nodes/edges of an existing graph.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetSolutionTable()Name of the table to store the solution, in [schema_name.]table_name format, using standard name resolution rules.StringgetSolverType()The type of solver to use for the graph.List<String>getSourceNodes()It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes.List<String>getWeightsOnEdges()Additional weights to apply to the edges of an existing graph.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.SolveGraphRequestsetDestinationNodes(List<String> destinationNodes)It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes.SolveGraphRequestsetGraphName(String graphName)Name of the graph resource to solve.SolveGraphRequestsetOptions(Map<String,String> options)Additional parameters.SolveGraphRequestsetRestrictions(List<String> restrictions)Additional restrictions to apply to the nodes/edges of an existing graph.SolveGraphRequestsetSolutionTable(String solutionTable)Name of the table to store the solution, in [schema_name.]table_name format, using standard name resolution rules.SolveGraphRequestsetSolverType(String solverType)The type of solver to use for the graph.SolveGraphRequestsetSourceNodes(List<String> sourceNodes)It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes.SolveGraphRequestsetWeightsOnEdges(List<String> weightsOnEdges)Additional weights to apply to the edges of an existing graph.StringtoString()
-
-
-
Constructor Detail
-
SolveGraphRequest
public SolveGraphRequest()
Constructs a SolveGraphRequest object with default parameters.
-
SolveGraphRequest
public SolveGraphRequest(String graphName, List<String> weightsOnEdges, List<String> restrictions, String solverType, List<String> sourceNodes, List<String> destinationNodes, String solutionTable, Map<String,String> options)
Constructs a SolveGraphRequest object with the specified parameters.- Parameters:
graphName- Name of the graph resource to solve.weightsOnEdges- Additional weights to apply to the edges of an existing graph. Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS_EDGE_ID', expressions, e.g., 'ST_LENGTH(wkt) AS WEIGHTS_VALUESPECIFIED', or constant values, e.g., '{4, 15, 2} AS WEIGHTS_VALUESPECIFIED'. Any provided weights will be added (in the case of 'WEIGHTS_VALUESPECIFIED') to or multiplied with (in the case of 'WEIGHTS_FACTORSPECIFIED') the existing weight(s). If using constant values in an identifier combination, the number of values specified must match across the combination. The default value is an emptyList.restrictions- Additional restrictions to apply to the nodes/edges of an existing graph. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED', or constant values, e.g., '{0, 0, 0, 1} AS RESTRICTIONS_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. If remove_previous_restrictions option is set to true, any provided restrictions will replace the existing restrictions. Otherwise, any provided restrictions will be added (in the case of 'RESTRICTIONS_VALUECOMPARED') to or replaced (in the case of 'RESTRICTIONS_ONOFFCOMPARED'). The default value is an emptyList.solverType- The type of solver to use for the graph. Supported values:SHORTEST_PATH: Solves for the optimal (shortest) path based on weights and restrictions from one source to destinations nodes. Also known as the Dijkstra solver.PAGE_RANK: Solves for the probability of each destination node being visited based on the links of the graph topology. Weights are not required to use this solver.PROBABILITY_RANK: Solves for the transitional probability (Hidden Markov) for each node based on the weights (probability assigned over given edges).CENTRALITY: Solves for the degree of a node to depict how many pairs of individuals that would have to go through the node to reach one another in the minimum number of hops. Also known as betweenness.MULTIPLE_ROUTING: Solves for finding the minimum cost cumulative path for a round-trip starting from the given source and visiting each given destination node once then returning to the source. Also known as the traveling salesman problem.INVERSE_SHORTEST_PATH: Solves for finding the optimal path cost for each destination node to route to the source node. Also known as inverse Dijkstra or the service man routing problem.BACKHAUL_ROUTING: Solves for optimal routes that connect remote asset nodes to the fixed (backbone) asset nodes.ALLPATHS: Solves for paths that would give costs between max and min solution radia - Make sure to limit by the 'max_solution_targets' option. Min cost should be >= shortest_path cost.STATS_ALL: Solves for graph statistics such as graph diameter, longest pairs, vertex valences, topology numbers, average and max cluster sizes, etc.CLOSENESS: Solves for the centrality closeness score per node as the sum of the inverse shortest path costs to all nodes in the graph.
SHORTEST_PATH.sourceNodes- It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. ForBACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an emptyList.destinationNodes- It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes. ForBACKHAUL_ROUTING, this list depicts the remote assets. The default value is an emptyList.solutionTable- Name of the table to store the solution, in [schema_name.]table_name format, using standard name resolution rules. The default value is 'graph_solutions'.options- Additional parameters.MAX_SOLUTION_RADIUS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Sets the maximum solution cost radius, which ignores thedestinationNodeslist and instead outputs the nodes within the radius sorted by ascending cost. If set to '0.0', the setting is ignored. The default value is '0.0'.MIN_SOLUTION_RADIUS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Applicable only whenMAX_SOLUTION_RADIUSis set. Sets the minimum solution cost radius, which ignores thedestinationNodeslist and instead outputs the nodes within the radius sorted by ascending cost. If set to '0.0', the setting is ignored. The default value is '0.0'.MAX_SOLUTION_TARGETS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Sets the maximum number of solution targets, which ignores thedestinationNodeslist and instead outputs no more than n number of nodes sorted by ascending cost where n is equal to the setting value. If set to 0, the setting is ignored. The default value is '1000'.UNIFORM_WEIGHTS: When specified, assigns the given value to all the edges in the graph. Note that weights provided inweightsOnEdgeswill override this value.LEFT_TURN_PENALTY: This will add an additional weight over the edges labeled as 'left turn' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.RIGHT_TURN_PENALTY: This will add an additional weight over the edges labeled as' right turn' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.INTERSECTION_PENALTY: This will add an additional weight over the edges labeled as 'intersection' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.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 theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.NUM_BEST_PATHS: ForMULTIPLE_ROUTINGsolvers only; sets the number of shortest paths computed from each node. This is the heuristic criterion. Default value of zero allows the number to be computed automatically by the solver. The user may want to override this parameter to speed-up the solver. The default value is '0'.MAX_NUM_COMBINATIONS: ForMULTIPLE_ROUTINGsolvers only; sets the cap on the combinatorial sequences generated. If the default value of two millions is overridden to a lesser value, it can potentially speed up the solver. The default value is '2000000'.OUTPUT_EDGE_PATH: If true then concatenated edge IDs will be added as the EDGE path column of the solution table for each source and target pair in shortest path solves. Supported values: The default value isFALSE.OUTPUT_WKT_PATH: If true then concatenated wkt line segments will be added as the Wktroute column of the solution table for each source and target pair in shortest path solves. Supported values: The default value isTRUE.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. For SHORTEST_PATH solver type, the input is split amongst the server containing the corresponding graph.CONVERGENCE_LIMIT: ForPAGE_RANKsolvers only; Maximum percent relative threshold on the page rank scores of each node between consecutive iterations to satisfy convergence. Default value is 1 (one) percent. The default value is '1.0'.MAX_ITERATIONS: ForPAGE_RANKsolvers only; Maximum number of page rank iterations for satisfying convergence. Default value is 100. The default value is '100'.MAX_RUNS: For allCENTRALITYsolvers only; Sets the maximum number of shortest path runs; maximum possible value is the number of nodes in the graph. Default value of 0 enables this value to be auto computed by the solver. The default value is '0'.OUTPUT_CLUSTERS: ForSTATS_ALLsolvers only; the cluster index for each node will be inserted as an additional column in the output. Supported values:TRUE: An additional column 'CLUSTER' will be added for each nodeFALSE: No extra cluster info per node will be available in the output
FALSE.SOLVE_HEURISTIC: Specify heuristic search criterion only for the geo graphs and shortest path solves towards a single target. Supported values:ASTAR: Employs A-STAR heuristics to speed up the shortest path traversalNONE: No heuristics are applied
NONE.ASTAR_RADIUS: For path solvers only when 'solve_heuristic' option is 'astar'. The shortest path traversal front includes nodes only within this radius (kilometers) as it moves towards the target location. The default value is '70'.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getGraphName
public String getGraphName()
Name of the graph resource to solve.- Returns:
- The current value of
graphName.
-
setGraphName
public SolveGraphRequest setGraphName(String graphName)
Name of the graph resource to solve.- Parameters:
graphName- The new value forgraphName.- Returns:
thisto mimic the builder pattern.
-
getWeightsOnEdges
public List<String> getWeightsOnEdges()
Additional weights to apply to the edges of an existing graph. Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS_EDGE_ID', expressions, e.g., 'ST_LENGTH(wkt) AS WEIGHTS_VALUESPECIFIED', or constant values, e.g., '{4, 15, 2} AS WEIGHTS_VALUESPECIFIED'. Any provided weights will be added (in the case of 'WEIGHTS_VALUESPECIFIED') to or multiplied with (in the case of 'WEIGHTS_FACTORSPECIFIED') the existing weight(s). If using constant values in an identifier combination, the number of values specified must match across the combination. The default value is an emptyList.- Returns:
- The current value of
weightsOnEdges.
-
setWeightsOnEdges
public SolveGraphRequest setWeightsOnEdges(List<String> weightsOnEdges)
Additional weights to apply to the edges of an existing graph. Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS_EDGE_ID', expressions, e.g., 'ST_LENGTH(wkt) AS WEIGHTS_VALUESPECIFIED', or constant values, e.g., '{4, 15, 2} AS WEIGHTS_VALUESPECIFIED'. Any provided weights will be added (in the case of 'WEIGHTS_VALUESPECIFIED') to or multiplied with (in the case of 'WEIGHTS_FACTORSPECIFIED') the existing weight(s). If using constant values in an identifier combination, the number of values specified must match across the combination. The default value is an emptyList.- Parameters:
weightsOnEdges- The new value forweightsOnEdges.- Returns:
thisto mimic the builder pattern.
-
getRestrictions
public List<String> getRestrictions()
Additional restrictions to apply to the nodes/edges of an existing graph. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED', or constant values, e.g., '{0, 0, 0, 1} AS RESTRICTIONS_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. If remove_previous_restrictions option is set to true, any provided restrictions will replace the existing restrictions. Otherwise, any provided restrictions will be added (in the case of 'RESTRICTIONS_VALUECOMPARED') to or replaced (in the case of 'RESTRICTIONS_ONOFFCOMPARED'). The default value is an emptyList.- Returns:
- The current value of
restrictions.
-
setRestrictions
public SolveGraphRequest setRestrictions(List<String> restrictions)
Additional restrictions to apply to the nodes/edges of an existing graph. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED', or constant values, e.g., '{0, 0, 0, 1} AS RESTRICTIONS_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. If remove_previous_restrictions option is set to true, any provided restrictions will replace the existing restrictions. Otherwise, any provided restrictions will be added (in the case of 'RESTRICTIONS_VALUECOMPARED') to or replaced (in the case of 'RESTRICTIONS_ONOFFCOMPARED'). The default value is an emptyList.- Parameters:
restrictions- The new value forrestrictions.- Returns:
thisto mimic the builder pattern.
-
getSolverType
public String getSolverType()
The type of solver to use for the graph. Supported values:SHORTEST_PATH: Solves for the optimal (shortest) path based on weights and restrictions from one source to destinations nodes. Also known as the Dijkstra solver.PAGE_RANK: Solves for the probability of each destination node being visited based on the links of the graph topology. Weights are not required to use this solver.PROBABILITY_RANK: Solves for the transitional probability (Hidden Markov) for each node based on the weights (probability assigned over given edges).CENTRALITY: Solves for the degree of a node to depict how many pairs of individuals that would have to go through the node to reach one another in the minimum number of hops. Also known as betweenness.MULTIPLE_ROUTING: Solves for finding the minimum cost cumulative path for a round-trip starting from the given source and visiting each given destination node once then returning to the source. Also known as the traveling salesman problem.INVERSE_SHORTEST_PATH: Solves for finding the optimal path cost for each destination node to route to the source node. Also known as inverse Dijkstra or the service man routing problem.BACKHAUL_ROUTING: Solves for optimal routes that connect remote asset nodes to the fixed (backbone) asset nodes.ALLPATHS: Solves for paths that would give costs between max and min solution radia - Make sure to limit by the 'max_solution_targets' option. Min cost should be >= shortest_path cost.STATS_ALL: Solves for graph statistics such as graph diameter, longest pairs, vertex valences, topology numbers, average and max cluster sizes, etc.CLOSENESS: Solves for the centrality closeness score per node as the sum of the inverse shortest path costs to all nodes in the graph.
SHORTEST_PATH.- Returns:
- The current value of
solverType.
-
setSolverType
public SolveGraphRequest setSolverType(String solverType)
The type of solver to use for the graph. Supported values:SHORTEST_PATH: Solves for the optimal (shortest) path based on weights and restrictions from one source to destinations nodes. Also known as the Dijkstra solver.PAGE_RANK: Solves for the probability of each destination node being visited based on the links of the graph topology. Weights are not required to use this solver.PROBABILITY_RANK: Solves for the transitional probability (Hidden Markov) for each node based on the weights (probability assigned over given edges).CENTRALITY: Solves for the degree of a node to depict how many pairs of individuals that would have to go through the node to reach one another in the minimum number of hops. Also known as betweenness.MULTIPLE_ROUTING: Solves for finding the minimum cost cumulative path for a round-trip starting from the given source and visiting each given destination node once then returning to the source. Also known as the traveling salesman problem.INVERSE_SHORTEST_PATH: Solves for finding the optimal path cost for each destination node to route to the source node. Also known as inverse Dijkstra or the service man routing problem.BACKHAUL_ROUTING: Solves for optimal routes that connect remote asset nodes to the fixed (backbone) asset nodes.ALLPATHS: Solves for paths that would give costs between max and min solution radia - Make sure to limit by the 'max_solution_targets' option. Min cost should be >= shortest_path cost.STATS_ALL: Solves for graph statistics such as graph diameter, longest pairs, vertex valences, topology numbers, average and max cluster sizes, etc.CLOSENESS: Solves for the centrality closeness score per node as the sum of the inverse shortest path costs to all nodes in the graph.
SHORTEST_PATH.- Parameters:
solverType- The new value forsolverType.- Returns:
thisto mimic the builder pattern.
-
getSourceNodes
public List<String> getSourceNodes()
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. ForBACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an emptyList.- Returns:
- The current value of
sourceNodes.
-
setSourceNodes
public SolveGraphRequest setSourceNodes(List<String> sourceNodes)
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. ForBACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an emptyList.- Parameters:
sourceNodes- The new value forsourceNodes.- Returns:
thisto mimic the builder pattern.
-
getDestinationNodes
public List<String> getDestinationNodes()
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes. ForBACKHAUL_ROUTING, this list depicts the remote assets. The default value is an emptyList.- Returns:
- The current value of
destinationNodes.
-
setDestinationNodes
public SolveGraphRequest setDestinationNodes(List<String> destinationNodes)
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes. ForBACKHAUL_ROUTING, this list depicts the remote assets. The default value is an emptyList.- Parameters:
destinationNodes- The new value fordestinationNodes.- Returns:
thisto mimic the builder pattern.
-
getSolutionTable
public String getSolutionTable()
Name of the table to store the solution, in [schema_name.]table_name format, using standard name resolution rules. The default value is 'graph_solutions'.- Returns:
- The current value of
solutionTable.
-
setSolutionTable
public SolveGraphRequest setSolutionTable(String solutionTable)
Name of the table to store the solution, in [schema_name.]table_name format, using standard name resolution rules. The default value is 'graph_solutions'.- Parameters:
solutionTable- The new value forsolutionTable.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Additional parameters.MAX_SOLUTION_RADIUS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Sets the maximum solution cost radius, which ignores thedestinationNodeslist and instead outputs the nodes within the radius sorted by ascending cost. If set to '0.0', the setting is ignored. The default value is '0.0'.MIN_SOLUTION_RADIUS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Applicable only whenMAX_SOLUTION_RADIUSis set. Sets the minimum solution cost radius, which ignores thedestinationNodeslist and instead outputs the nodes within the radius sorted by ascending cost. If set to '0.0', the setting is ignored. The default value is '0.0'.MAX_SOLUTION_TARGETS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Sets the maximum number of solution targets, which ignores thedestinationNodeslist and instead outputs no more than n number of nodes sorted by ascending cost where n is equal to the setting value. If set to 0, the setting is ignored. The default value is '1000'.UNIFORM_WEIGHTS: When specified, assigns the given value to all the edges in the graph. Note that weights provided inweightsOnEdgeswill override this value.LEFT_TURN_PENALTY: This will add an additional weight over the edges labeled as 'left turn' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.RIGHT_TURN_PENALTY: This will add an additional weight over the edges labeled as' right turn' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.INTERSECTION_PENALTY: This will add an additional weight over the edges labeled as 'intersection' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.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 theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.NUM_BEST_PATHS: ForMULTIPLE_ROUTINGsolvers only; sets the number of shortest paths computed from each node. This is the heuristic criterion. Default value of zero allows the number to be computed automatically by the solver. The user may want to override this parameter to speed-up the solver. The default value is '0'.MAX_NUM_COMBINATIONS: ForMULTIPLE_ROUTINGsolvers only; sets the cap on the combinatorial sequences generated. If the default value of two millions is overridden to a lesser value, it can potentially speed up the solver. The default value is '2000000'.OUTPUT_EDGE_PATH: If true then concatenated edge IDs will be added as the EDGE path column of the solution table for each source and target pair in shortest path solves. Supported values: The default value isFALSE.OUTPUT_WKT_PATH: If true then concatenated wkt line segments will be added as the Wktroute column of the solution table for each source and target pair in shortest path solves. Supported values: The default value isTRUE.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. For SHORTEST_PATH solver type, the input is split amongst the server containing the corresponding graph.CONVERGENCE_LIMIT: ForPAGE_RANKsolvers only; Maximum percent relative threshold on the page rank scores of each node between consecutive iterations to satisfy convergence. Default value is 1 (one) percent. The default value is '1.0'.MAX_ITERATIONS: ForPAGE_RANKsolvers only; Maximum number of page rank iterations for satisfying convergence. Default value is 100. The default value is '100'.MAX_RUNS: For allCENTRALITYsolvers only; Sets the maximum number of shortest path runs; maximum possible value is the number of nodes in the graph. Default value of 0 enables this value to be auto computed by the solver. The default value is '0'.OUTPUT_CLUSTERS: ForSTATS_ALLsolvers only; the cluster index for each node will be inserted as an additional column in the output. Supported values:TRUE: An additional column 'CLUSTER' will be added for each nodeFALSE: No extra cluster info per node will be available in the output
FALSE.SOLVE_HEURISTIC: Specify heuristic search criterion only for the geo graphs and shortest path solves towards a single target. Supported values:ASTAR: Employs A-STAR heuristics to speed up the shortest path traversalNONE: No heuristics are applied
NONE.ASTAR_RADIUS: For path solvers only when 'solve_heuristic' option is 'astar'. The shortest path traversal front includes nodes only within this radius (kilometers) as it moves towards the target location. The default value is '70'.
Map.- Returns:
- The current value of
options.
-
setOptions
public SolveGraphRequest setOptions(Map<String,String> options)
Additional parameters.MAX_SOLUTION_RADIUS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Sets the maximum solution cost radius, which ignores thedestinationNodeslist and instead outputs the nodes within the radius sorted by ascending cost. If set to '0.0', the setting is ignored. The default value is '0.0'.MIN_SOLUTION_RADIUS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Applicable only whenMAX_SOLUTION_RADIUSis set. Sets the minimum solution cost radius, which ignores thedestinationNodeslist and instead outputs the nodes within the radius sorted by ascending cost. If set to '0.0', the setting is ignored. The default value is '0.0'.MAX_SOLUTION_TARGETS: ForALLPATHS,SHORTEST_PATHandINVERSE_SHORTEST_PATHsolvers only. Sets the maximum number of solution targets, which ignores thedestinationNodeslist and instead outputs no more than n number of nodes sorted by ascending cost where n is equal to the setting value. If set to 0, the setting is ignored. The default value is '1000'.UNIFORM_WEIGHTS: When specified, assigns the given value to all the edges in the graph. Note that weights provided inweightsOnEdgeswill override this value.LEFT_TURN_PENALTY: This will add an additional weight over the edges labeled as 'left turn' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.RIGHT_TURN_PENALTY: This will add an additional weight over the edges labeled as' right turn' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.INTERSECTION_PENALTY: This will add an additional weight over the edges labeled as 'intersection' if the 'add_turn' option parameter of theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.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 theGPUdb.createGraphwas invoked at graph creation. The default value is '0.0'.NUM_BEST_PATHS: ForMULTIPLE_ROUTINGsolvers only; sets the number of shortest paths computed from each node. This is the heuristic criterion. Default value of zero allows the number to be computed automatically by the solver. The user may want to override this parameter to speed-up the solver. The default value is '0'.MAX_NUM_COMBINATIONS: ForMULTIPLE_ROUTINGsolvers only; sets the cap on the combinatorial sequences generated. If the default value of two millions is overridden to a lesser value, it can potentially speed up the solver. The default value is '2000000'.OUTPUT_EDGE_PATH: If true then concatenated edge IDs will be added as the EDGE path column of the solution table for each source and target pair in shortest path solves. Supported values: The default value isFALSE.OUTPUT_WKT_PATH: If true then concatenated wkt line segments will be added as the Wktroute column of the solution table for each source and target pair in shortest path solves. Supported values: The default value isTRUE.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. For SHORTEST_PATH solver type, the input is split amongst the server containing the corresponding graph.CONVERGENCE_LIMIT: ForPAGE_RANKsolvers only; Maximum percent relative threshold on the page rank scores of each node between consecutive iterations to satisfy convergence. Default value is 1 (one) percent. The default value is '1.0'.MAX_ITERATIONS: ForPAGE_RANKsolvers only; Maximum number of page rank iterations for satisfying convergence. Default value is 100. The default value is '100'.MAX_RUNS: For allCENTRALITYsolvers only; Sets the maximum number of shortest path runs; maximum possible value is the number of nodes in the graph. Default value of 0 enables this value to be auto computed by the solver. The default value is '0'.OUTPUT_CLUSTERS: ForSTATS_ALLsolvers only; the cluster index for each node will be inserted as an additional column in the output. Supported values:TRUE: An additional column 'CLUSTER' will be added for each nodeFALSE: No extra cluster info per node will be available in the output
FALSE.SOLVE_HEURISTIC: Specify heuristic search criterion only for the geo graphs and shortest path solves towards a single target. Supported values:ASTAR: Employs A-STAR heuristics to speed up the shortest path traversalNONE: No heuristics are applied
NONE.ASTAR_RADIUS: For path solvers only when 'solve_heuristic' option is 'astar'. The shortest path traversal front includes nodes only within this radius (kilometers) as it moves towards the target location. The default value is '70'.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-