This function creates a new DemandPoints object

DemandPoints(coords, weights)

Arguments

coords

base::matrix() of coordinates for each demand point.

weights

numeric weights for each demand point.

Value

A new DemandPoints object.

See also

Examples

# \dontrun{
# make demand points
dps <- DemandPoints(
 matrix(rnorm(100), ncol=2),
 runif(50)
)

# print object
print(dps)
#> An object of class "DemandPoints"
#> Slot "coords":
#>              [,1]         [,2]
#>  [1,]  1.47073203 -1.258018766
#>  [2,]  0.33366123 -1.332680870
#>  [3,]  1.13611968 -0.832239487
#>  [4,]  1.17919925 -1.353292397
#>  [5,]  0.63157306 -0.393176375
#>  [6,] -1.88270851  1.171874830
#>  [7,]  0.18757829 -0.006887564
#>  [8,]  1.12796118  1.284925119
#>  [9,]  0.53471390 -1.025075340
#> [10,] -0.82085270  0.227347974
#> [11,]  1.17541526  0.495358342
#> [12,]  0.35879898 -1.524380509
#> [13,] -0.13852087  0.217900158
#> [14,] -0.63629149  0.704308207
#> [15,] -0.57720226 -0.751992375
#> [16,] -1.18694775  0.785776414
#> [17,] -1.36514061 -0.055205115
#> [18,] -0.16790986 -0.414880583
#> [19,]  0.57037504 -0.184065453
#> [20,] -0.01518033 -0.810975339
#> [21,] -2.03234214 -1.566672264
#> [22,]  1.87315052 -0.392646716
#> [23,]  0.38788201  0.004858200
#> [24,]  1.10628317  0.965011766
#> [25,]  0.63434750 -1.312012816
#> [26,]  0.51302944 -1.918013703
#> [27,] -0.16015063  0.093832010
#> [28,]  0.56062405 -1.076149483
#> [29,]  0.20452969  2.200127302
#> [30,] -0.17630018 -0.005071820
#> [31,] -1.16687235 -1.602550243
#> [32,] -0.87506108 -0.003713870
#> [33,]  0.40671129  1.940001439
#> [34,] -0.61199550  0.232542318
#> [35,] -0.94199232 -0.653319147
#> [36,]  0.75895377  0.511247243
#> [37,] -1.43957235  1.790971027
#> [38,] -0.46082657 -0.602038436
#> [39,]  1.25034476 -2.060321384
#> [40,]  0.33285069 -1.543311814
#> [41,] -1.58280576 -0.050266381
#> [42,] -0.38496189  0.774456939
#> [43,] -0.66045568  1.378186654
#> [44,]  0.85612181 -2.024294882
#> [45,]  0.03994205 -0.350415784
#> [46,] -2.28752220 -0.521105521
#> [47,] -0.47208936  0.118951478
#> [48,]  1.55625271 -0.036027174
#> [49,]  1.15045509  1.214186053
#> [50,] -0.45332157 -0.380823535
#> 
#> Slot "weights":
#>  [1] 0.02721305 0.48958724 0.99499331 0.93060837 0.46788487 0.29207875
#>  [7] 0.41057292 0.15333049 0.49687816 0.37071024 0.70375219 0.95706132
#> [13] 0.67041750 0.53405550 0.92381556 0.46644003 0.98437345 0.21427925
#> [19] 0.04642168 0.19822015 0.58173241 0.39944537 0.95886370 0.23000955
#> [25] 0.11466910 0.03061763 0.72477981 0.15822648 0.78181034 0.57540717
#> [31] 0.44643628 0.11877352 0.68460706 0.61563837 0.67630997 0.39455456
#> [37] 0.48096725 0.30485306 0.23352605 0.27429248 0.70524684 0.09099607
#> [43] 0.05443510 0.90300795 0.38210081 0.05637002 0.25011004 0.89465186
#> [49] 0.22081772 0.68882898
#> 
# }