updateZK: updateZK called by lastPass

Description Usage Arguments Details Value Examples

Description

updateZK called by lastPass

Usage

1
2
updateZK(map, qProb, le, kk, listOfZ, crit, cost, costL, nz, mdist, K1, Z2,
  pErr = 0.9, optiCrit = 2, simplitol = 0.001)

Arguments

map

object returned by function genMap

qProb

probability vector used to generate quantile values

le

index of current level in list

kk

index of current zoning in level list

listOfZ

list of zoning objects

crit

list of criteria

cost

list of costs

costL

list of per label costs

nz

list of number of zones

mdist

list of distance matrices

K1

zoning to be replaced

Z2

xxxx

pErr

equality tolerance for distance calculations

optiCrit

xxxx

simplitol

xxxx

Details

Given a map object, a list of zonings, a current and a previous zoning, replaces a zoning in the list of zonings

Value

a list of zonings, criteria and costs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(mapTest)
# run zoning with 2 quantiles corresponding to probability values 0.4 and 0.7
criti=correctionTree(c(0.4,0.7),mapTest,LASTPASS=FALSE)
K1=criti$zk[[1]][[1]]#initial zoning
Z1=K1$zonePolygone
printZsurf(Z1) # 8 zones with 2 small zones (7 and 8)
Z2 = geozoning:::remove1FromZ(Z1,7,K1$zoneN)
printZsurf(Z2) #7 zones
newRes=geozoning:::updateZK(mapTest,c(0.4,0.7),1,1,criti$zk[1],criti$criterion[1],
       criti$cost[1],criti$costL[1],criti$nz[1],criti$mdist[1],K1,Z2)
newZ=newRes$listOfZ[[1]][[1]]$zonePolygone
printZsurf(newZ) #7 zones

hazaeljones/geozoning documentation built on May 30, 2019, 3:06 p.m.