data(Freiburg1)
data(Freiburg2)
data(Freiburg3)
# Loading the three Freiburg datasets
# NOTE: This may take a while!
# huff.attrac(Freiburg1, "district", "store", "salesarea", "distance", lambda = -2, dtype= "pow",
# lambda2 = NULL, Freiburg2, "ppower", Freiburg3, "store", "annualsales", tolerance = 5,
# output = "total")
# Local optimization of store attractivity using the function huff.attrac()
# returns a data frame with total values (observed and expected after optimization)
Run the code above in your browser using DataLab