dynamise: Add dynamic arrival times to nodes.

Description Usage Arguments Value See Also Examples

View source: R/dynamise.R

Description

Some variants of the Vehicle Routing Problem (VRP) consider static as well as dynamic customers (nodes). This function takes a Network and dynamises it, i. e., it adds dynamic arrival times to the customers via a Poisson process.

Usage

1
2
dynamise(x, n.dynamic = NULL, dyn.customers.ratio = NULL,
  arrival.limit)

Arguments

x

[Network]
Network.

n.dynamic

[integer(1) | NULL] Number of nodes, which should become dynamic. Ignored if dyn.customers.ratio is not NULL.

dyn.customers.ratio

[numeric(1) | NULL] Ratio of dynamic nodes. If this is set to a numeric value in (0, 1), the parameter n.dynamic is ignored.

arrival.limit

[numeric(1)]
Maximal arrival time.

Value

[Network] Modified network (now has an additional list element 'arrival.times') and the ratio of dynamic customers as an attribute.

See Also

generateRandomNetwork, generateClusteredNetwork, generateGridNetwork

Examples

1
2
3
x = generateClusteredNetwork(n.points = 100L, n.cluster = 4L, upper = 100, n.depots = 2L)
x = dynamise(x, dyn.customers.ratio = 0.3, arrival.limit = 400)
print(x)

Example output

Loading required package: BBmisc
Loading required package: mvtnorm
Loading required package: lhs
Loading required package: checkmate
Clustered 2-dimensional network.
Name:               CLUSTERED_n_100_cl_4_d_2_RqGyqf9TTC
Comment(s):         cl=4
Edge weight type:   EUC_2D
Number of nodes:    100
Number of clusters: 4
Number of depots:   2
Head of coordinate matrix:
        x1       x2 types membership
1 39.11473 33.68019 depot          0
2 61.13215 85.84677 depot          0
3 65.68000 90.11000  node          1
4 55.82000 85.45000  node          1
5 54.08000 85.43000  node          1
...

netgen documentation built on Jan. 9, 2020, 1:07 a.m.

Related to dynamise in netgen...