zsum {orloca}R Documentation

zsum and zsumgra at orloca package

Description

The objective function and the gradient function for the mini-sum objective location problem are given.

Usage

zsum(o, x=0, y=0)
zsumgra(o, x=0, y=0)

Arguments

o An object of loca.p class.
x The x coordinate of the point to be evaluated.
y The y coordinate of the point to be evaluated.

Value

zsum returns the objective function of the mini-sum location problem, sum_{a_i in o} w_i d(a_i, (x,y)), where d(a_i, (x,y)) gives the euclidean distances between a_i and (x,y).
zsumgra returns the gradient vector of the function zsum.

See Also

See also orloca-package and zsummin.

Examples

# An unweigthed new loca.p object
loca <- new("loca.p", x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1))

# Evaluation of zsum at (0, 0)
zsum(loca)

# Evaluation of zsum at (1, 3)
zsum(loca, 1, 3)

# The gradient function
zsumgra(loca, 1, 3)

[Package orloca version 1.0 Index]