initIndividual: Individual initializer.

Description Usage Arguments Value

View source: R/individual.R

Description

Individual initializer.

Usage

1
2
3
initIndividual(instance, current.time = 0, init.tours = integer(),
  n.vehicles = 1L, template.ind = NULL,
  init.distribution = "binomial")

Arguments

instance

[Network]
Network instance.

current.time

[numeric(1)]
Current point in time. Default is 0.

init.tours

[integer]
List of fixed prefix tours, i.e., part of a vehicles tour which is already fixed, because time passed and vehicle already visited some customers.

n.vehicles

[integer(1)]
Number of vehicles. Defaults to 1.

template.ind

[integer]
Tour used as a “template” for a newly generated individual. Here, we aim to pass as much information from template.ind as possible.

init.distribution

[character(1)]
How shall available dynamic customers be sampled? Option “binomial”: each dynamic available customer is active with probability 0.5 independently. Option “uniform”: if there are n_d available dynamic customers, we have P(X = i) = \frac{1}{n_d} for i \in \{1, …, n_d\}. In a second step i positions are sampled at random.

Value

[VRPIndividual] List with following components:

b

Binary vector of length |V| - 2. b[i] is 1, if customer i is active, i.e., in tour.

t

Permutation vector.

p

Vector of mutation probablities. I.e., p[i] is the probability to flip b[i]. p[i] is zero if customer i is already fixed or not yet released.

it

Binary vector of length |V| - 2. it[i] is 1 if and only if customer i is in initial tour.

n.mandatory integer(1)

Number of mandatory customers.

idx.dynamic.available integer

IDs/positions of dynamic customers which already requested serving.

n.dynamic.active integer(1)

Number of active dynamic customers i (i.e., b[i] = 1)

n.dynamic.inactive integer(1)

Number of available, but not active dynamic customers i (i.e., b[i] = 0)

init.tours integer

Fixed tour part, i.e., sequence of nodes already visited.


jakobbossek/dynvrp documentation built on Jan. 19, 2020, 9:53 p.m.