makeNetwork: Generate network based on coordinates.

Description Usage Arguments Value

View source: R/makeNetwork.R

Description

Create a (clustered) network object.

Usage

1
2
3
4
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, get.distances = TRUE)

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.

get.distances

[logical(1)]
Should distances be loaded? For really large instances the distance matrix may be very large. In certain situations it is thus desirable to load the instance without loading/generating the distance matrix itself. Default is TRUE.

Value

[Network]


jakobbossek/salesperson documentation built on Dec. 11, 2021, 4:54 a.m.