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

addNodeWeights

Add node weights.


Description

This function adds node weights to an edge-weighted graph. This is of interest in the study of weighted TSP, where the distance between two nodes is not based on the actual distance but additionally is influenced by the weight of the starting node or all nodes prior in the permutation. This is indeed of practical interest. E.g. consider a garbage collecting vehicle which requires the more gas per mile the heavier its load.

Usage

addNodeWeights(x, weights = NULL)

Arguments

x

[Network]
Network.

weights

[numeric(1)]
Numeric vector of weights.

See Also


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.