Kinetica C# API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
kinetica.SolveGraphRequest Class Reference

A set of parameters for Kinetica.solveGraph(string,IList{string},IList{string},string,IList{string},IList{string},string,IDictionary{string, string}). More...

+ Inheritance diagram for kinetica.SolveGraphRequest:
+ Collaboration diagram for kinetica.SolveGraphRequest:

Classes

struct  Options
 Additional parameters

More...
 
struct  SolverType
 The type of solver to use for the graph. More...
 

Public Member Functions

 SolveGraphRequest ()
 Constructs a SolveGraphRequest object with default parameters. More...
 
 SolveGraphRequest (string graph_name, IList< string > weights_on_edges=null, IList< string > restrictions=null, string solver_type=null, IList< string > source_nodes=null, IList< string > destination_nodes=null, string solution_table=null, IDictionary< string, string > options=null)
 Constructs a SolveGraphRequest object with the specified parameters. More...
 
- Public Member Functions inherited from kinetica.KineticaData
 KineticaData (KineticaType type)
 Constructor from Kinetica Type More...
 
 KineticaData (System.Type type=null)
 Default constructor, with optional System.Type More...
 
object Get (int fieldPos)
 Retrieve a specific property from this object More...
 
void Put (int fieldPos, object fieldValue)
 Write a specific property to this object More...
 

Properties

string graph_name [get, set]
 Name of the graph resource to solve. More...
 
IList< string > weights_on_edges [get, set]
 Additional weights to apply to the edges of an existing graph. More...
 
IList< string > restrictions = new List<string>() [get, set]
 Additional restrictions to apply to the nodes/edges of an existing graph. More...
 
string solver_type = new List<string>() [get, set]
 The type of solver to use for the graph. More...
 
IList< string > source_nodes = SolverType.SHORTEST_PATH [get, set]
 It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. More...
 
IList< string > destination_nodes = new List<string>() [get, set]
 It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes. More...
 
string solution_table = new List<string>() [get, set]
 Name of the table to store the solution. More...
 
IDictionary< string, string > options = "graph_solutions" [get, set]
 Additional parameters

More...
 
- Properties inherited from kinetica.KineticaData
Schema Schema [get]
 Avro Schema for this class More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kinetica.KineticaData
static RecordSchema SchemaFromType (System.Type t, KineticaType ktype=null)
 Create an Avro Schema from a System.Type and a KineticaType. More...
 

Detailed Description

A set of parameters for Kinetica.solveGraph(string,IList{string},IList{string},string,IList{string},IList{string},string,IDictionary{string, string}).


Solves an existing graph for a type of problem (e.g., shortest path, page rank, travelling salesman, etc.) using source nodes, destination nodes, and additional, optional weights and restrictions.
IMPORTANT: It's highly recommended that you review the Network Graphs & Solvers concepts documentation, the Graph REST Tutorial, and/or some /solve/graph examples before using this endpoint.

Definition at line 33 of file SolveGraph.cs.

Constructor & Destructor Documentation

kinetica.SolveGraphRequest.SolveGraphRequest ( )
inline

Constructs a SolveGraphRequest object with default parameters.

Definition at line 901 of file SolveGraph.cs.

kinetica.SolveGraphRequest.SolveGraphRequest ( string  graph_name,
IList< string >  weights_on_edges = null,
IList< string >  restrictions = null,
string  solver_type = null,
IList< string >  source_nodes = null,
IList< string >  destination_nodes = null,
string  solution_table = null,
IDictionary< string, string >  options = null 
)
inline

Constructs a SolveGraphRequest object with the specified parameters.

Parameters
graph_nameName of the graph resource to solve.
weights_on_edgesAdditional 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 empty List.
restrictionsAdditional 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 is set to true, any provided restrictions will replace the existing restrictions. If remove_previous_restrictions is set to false, 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 empty List.
solver_typeThe 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 travelling 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 shoudl be >= shortest_path cost.
The default value is SHORTEST_PATH.
source_nodesIt can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. For BACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an empty List.
destination_nodesIt can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes. For BACKHAUL_ROUTING, this list depicts the remote assets. The default value is an empty List.
solution_tableName of the table to store the solution. The default value is 'graph_solutions'.
optionsAdditional parameters
  • MAX_SOLUTION_RADIUS: For SHORTEST_PATH and INVERSE_SHORTEST_PATH solvers only. Sets the maximum solution cost radius, which ignores the list 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: For SHORTEST_PATH and INVERSE_SHORTEST_PATH solvers only. Applicable only when max_solution_radius is set. Sets the minimum solution cost radius, which ignores the list 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: For SHORTEST_PATH and INVERSE_SHORTEST_PATH solvers only. Sets the maximum number of solution targets, which ignores the list 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 '0'.
  • EXPORT_SOLVE_RESULTS: Returns solution results inside the <member name="result_per_destination_node"> array in the response if set to true. Supported values: The default value is FALSE.
  • REMOVE_PREVIOUS_RESTRICTIONS: Ignore the restrictions applied to the graph during the creation stage and only use the restrictions specified in this request if set to true. Supported values: The default value is FALSE.
  • RESTRICTION_THRESHOLD_VALUE: Value-based restriction comparison. Any node or edge with a RESTRICTIONS_VALUECOMPARED value greater than the restriction_threshold_value will not be included in the solution.
  • UNIFORM_WEIGHTS: When specified, assigns the given value to all the edges in the graph. Note that weights provided in will override this value.
  • LEFT_TURN_PENALTY: This will add an additonal weight over the edges labelled as 'left turn' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'.
  • RIGHT_TURN_PENALTY: This will add an additonal weight over the edges labelled as' right turn' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'.
  • INTERSECTION_PENALTY: This will add an additonal weight over the edges labelled as 'intersection' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'.
  • SHARP_TURN_PENALTY: This will add an additonal weight over the edges labelled as 'sharp turn' or 'u-turn' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'.
  • NUM_BEST_PATHS: For MULTIPLE_ROUTING solvers 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: For MULTIPLE_ROUTING solvers 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'.
  • ACCURATE_SNAPS: Valid for single source destination pair solves if points are described in NODE_WKTPOINT identifier types: When true (default), it snaps to the nearest node of the graph; otherwise, it searches for the closest entity that could be an edge. For the latter case (false), the solver modifies the resulting cost with the weights proportional to the ratio of the snap location within the edge. This may be an over-kill when the performance is considered and the difference is well less than 1 percent. In batch runs, since the performance is of utmost importance, the option is always considered 'false'. Supported values: The default value is TRUE.
  • 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 is FALSE.
  • 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 is TRUE.
The default value is an empty Dictionary.

Definition at line 1241 of file SolveGraph.cs.

Property Documentation

IList<string> kinetica.SolveGraphRequest.destination_nodes = new List<string>()
getset

It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes.

For BACKHAUL_ROUTING, this list depicts the remote assets. The default value is an empty List.

Definition at line 678 of file SolveGraph.cs.

string kinetica.SolveGraphRequest.graph_name
getset

Name of the graph resource to solve.

Definition at line 552 of file SolveGraph.cs.

IDictionary<string, string> kinetica.SolveGraphRequest.options = "graph_solutions"
getset

Additional parameters

Sets the maximum solution cost radius, which ignores the list 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: For SHORTEST_PATH and INVERSE_SHORTEST_PATH solvers only. Applicable only when max_solution_radius is set. Sets the minimum solution cost radius, which ignores the list 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: For SHORTEST_PATH and INVERSE_SHORTEST_PATH solvers only. Sets the maximum number of solution targets, which ignores the list 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 '0'. EXPORT_SOLVE_RESULTS: Returns solution results inside the <member name="result_per_destination_node"> array in the response if set to true. Supported values:

The default value is FALSE. REMOVE_PREVIOUS_RESTRICTIONS: Ignore the restrictions applied to the graph during the creation stage and only use the restrictions specified in this request if set to true. Supported values:

The default value is FALSE. RESTRICTION_THRESHOLD_VALUE: Value-based restriction comparison. Any node or edge with a RESTRICTIONS_VALUECOMPARED value greater than the restriction_threshold_value will not be included in the solution. UNIFORM_WEIGHTS: When specified, assigns the given value to all the edges in the graph. Note that weights provided in will override this value. LEFT_TURN_PENALTY: This will add an additonal weight over the edges labelled as 'left turn' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'. RIGHT_TURN_PENALTY: This will add an additonal weight over the edges labelled as' right turn' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'. INTERSECTION_PENALTY: This will add an additonal weight over the edges labelled as 'intersection' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'. SHARP_TURN_PENALTY: This will add an additonal weight over the edges labelled as 'sharp turn' or 'u-turn' if the 'add_turn' option parameter of the /create/graph was invoked at graph creation. The default value is '0.0'. NUM_BEST_PATHS: For MULTIPLE_ROUTING solvers 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: For MULTIPLE_ROUTING solvers 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'. ACCURATE_SNAPS: Valid for single source destination pair solves if points are described in NODE_WKTPOINT identifier types: When true (default), it snaps to the nearest node of the graph; otherwise, it searches for the closest entity that could be an edge. For the latter case (false), the solver modifies the resulting cost with the weights proportional to the ratio of the snap location within the edge. This may be an over-kill when the performance is considered and the difference is well less than 1 percent. In batch runs, since the performance is of utmost importance, the option is always considered 'false'. Supported values:

The default value is TRUE. 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 is FALSE. 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 is TRUE.

The default value is an empty Dictionary.

Definition at line 896 of file SolveGraph.cs.

IList<string> kinetica.SolveGraphRequest.restrictions = new List<string>()
getset

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 is set to true, any provided restrictions will replace the existing restrictions. If remove_previous_restrictions is set to false, 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 empty List.

Definition at line 599 of file SolveGraph.cs.

string kinetica.SolveGraphRequest.solution_table = new List<string>()
getset

Name of the table to store the solution.

The default value is 'graph_solutions'.

Definition at line 682 of file SolveGraph.cs.

string kinetica.SolveGraphRequest.solver_type = new List<string>()
getset

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 travelling 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 shoudl be >= shortest_path cost.

The default value is SHORTEST_PATH.

Definition at line 666 of file SolveGraph.cs.

IList<string> kinetica.SolveGraphRequest.source_nodes = SolverType.SHORTEST_PATH
getset

It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes.

For BACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an empty List.

Definition at line 672 of file SolveGraph.cs.

IList<string> kinetica.SolveGraphRequest.weights_on_edges
getset

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 empty List.

Definition at line 574 of file SolveGraph.cs.


The documentation for this class was generated from the following file: