loca.p {orloca}R Documentation

loca.p class for Operations Research LOCational Analysis

Description

An object of class loca.p represents a weighted location problem with a finite demand points set. The orloca-package is mainly devoted to deals with location problems.

Arguments

x

is a vector of the x coordinates of the demand points.

y

is a vector of the y coordinates of the demand points.

w

is a vector of weights of the demand points. If w is omitted then all weights are considered as 1.

label

If given, it is the label of the new object.

Details

The main generator of the loca.p class is loca.p(x, y, w = numeric(0), label = ""). An alternative form is new("loca.p", x, y, w = numeric(0), label = "").

The lengths of x and y vector must be equals. The length of w must be equal to the previous ones or must be 0, or should be omitted. NA's values are not allowed at any of the arguments.

summary(x) returns a summary of the x loca.p object and print(x) prints the x loca.p object in table format.

Value

If the arguments have valid values, it returns a new object of class loca.p, else it returns an error.

See Also

See also orloca-package.

Examples

# A new unweighted loca.p object
loca <- loca.p(x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1))
# or
loca <- new("loca.p", x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1))

# An example with weights and name
locb <- new("loca.p", x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1),
w = c(1, 2, 1, 2), label = "Weighted case")


[Package orloca version 5.6 Index]