Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeNetwork

Generate network based on coordinates.


Description

Create a (clustered) network object.

Usage

makeNetwork(coordinates, distance.matrix = NULL, name = NULL,
  comment = NULL, membership = NULL, edge.weight.type = NULL,
  depot.coordinates = NULL, lower = NULL, upper = NULL,
  opt.tour.length = NULL, opt.tour = NULL, node.weights = NULL)

Arguments

coordinates

[matrix]
Numeric matrix of 2D coordinates.

distance.matrix

[matrix]
Optional distance matrix.

name

[character(1) | NULL]
Optional name of the network.

comment

[character | NULL]
Optional additional comments on instance.

membership

[numeric | NULL]
Optional vector of memberships for clustered networks.

edge.weight.type

[character(1) | NULL] The edge weight type indicates how edge weights are represented in the TSPlib format. If distance.matrix is NULL, the passed value is ignored and EUC\_2D is assigned. Otherwise the edge weight type must be one of the following {EUC\_2D, EUC\_3D, MAX\_2D, MAX\_3D, MAN\_2D, MAN\_3D, CEIL\_2D, GEO, ATT, EXPLICIT}.

depot.coordinates

[matrix | NULL]
Numeric matrix of 2D coordinates of depots. Default is NULL, which means no depots at all.

lower

[numeric(1)]
Lower box constraint of cube.

upper

[numeric(1)]
Upper box constraint of cube.

opt.tour.length

[numeric(1)]
Optional length of the optimal roundtrip tour. Default is NULL, which means the tour length is unknown.

opt.tour

[integer]
Optional optimal permutation of node indizes. Default is NULL, which means the optimal tour is unknown.

node.weights

[numeric]
Vector of node weights (for weighted version of TSP). Default is NULL, i.e., no node weights at all.

Value

[Network]


netgen

Network Generator for Combinatorial Graph Problems

v1.3.2
BSD_3_clause + file LICENSE
Authors
Jakob Bossek [aut, cre]
Initial release
2020-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.