generateRandomNetwork: Generates a random graph in a hypercube.

Description Usage Arguments Value Examples

View source: R/generateRandomNetwork.R

Description

Generates a random graph in a hypercube.

Usage

1
2
generateRandomNetwork(n.points, n.dim = 2L, n.depots = NULL,
  lower = 0, upper = 100, name = NULL)

Arguments

n.points

[integer(1)]
Number of points.

n.dim

[integer(1)]
Number of dimensions. Default ist 2.

n.depots

[integer(1)]
Number of depots in instances for the Vehicle Routing Problem (VRP). Default is NULL, i. e., no depots. The proceeding is as follows: If n.depots is 1, a random cluster center is defined to be the depot. If n.depots is 2, the second depot has maximal distance to the first. By convention the depots are placed as the first nodes in the coordinates matrix.

lower

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

upper

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

name

[character(1) | NULL]
Optional name for the generated network. Default is NULL. In this case a random name is generated.

Value

[Network]

Examples

1
x = generateRandomNetwork(n.points = 100L, n.depots = 2L, upper = 50)

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