Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Vehicle run saving

Source:R/heumilkr_solution.R
milkr_saving.Rd

Measures the saving that was achieved by the heuristic optimizationalgorithmclarke_wright() compared to the naive vehicle run assignment,i.e. one run per site.

Usage

milkr_saving(solution, relative=FALSE)

Arguments

solution

A "heumilkr_solution" object, typically obtained byclarke_wright().

relative

Should the saving be given as dimensionful value (in units of distance asprovided toclarke_wright()), or as percentage relative to thenaive costs.Defaults toFALSE, i.e. a dimensionful value.

Value

The savings either as dimensionful value or as percentage relative to thenaive costs, depending onrelative.

Examples

demand<-c(3,2,4,2)positions<-data.frame(    pos_x=c(0,1,-1,2,3),    pos_y=c(0,1,1,2,3))solution<-clarke_wright(demand,dist(positions),data.frame(n=NA_integer_, caps=6))print(milkr_saving(solution))#> [1] 6.485281print(milkr_saving(solution, relative=TRUE))#> [1] 0.3275562

[8]ページ先頭

©2009-2025 Movatter.jp