huff 1.5.6__py3-none-any.whl → 1.5.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
huff/models.py
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# Author: Thomas Wieland
|
5
5
|
# ORCID: 0000-0001-5168-9846
|
6
6
|
# mail: geowieland@googlemail.com
|
7
|
-
# Version: 1.5.
|
8
|
-
# Last update: 2025-
|
7
|
+
# Version: 1.5.6
|
8
|
+
# Last update: 2025-08-01 14:00
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
10
10
|
#-----------------------------------------------------------------------
|
11
11
|
|
@@ -590,6 +590,12 @@ class InteractionMatrix:
|
|
590
590
|
if interaction_matrix_metadata["fit"]["function"] == "huff_ml_fit":
|
591
591
|
print("Fit method " + interaction_matrix_metadata["fit"]["method"] + " (Converged: " + str(interaction_matrix_metadata["fit"]["minimize_success"]) + ")")
|
592
592
|
|
593
|
+
return [
|
594
|
+
customer_origins_metadata,
|
595
|
+
supply_locations_metadata,
|
596
|
+
interaction_matrix_metadata
|
597
|
+
]
|
598
|
+
|
593
599
|
def transport_costs(
|
594
600
|
self,
|
595
601
|
network: bool = True,
|
@@ -1642,6 +1648,8 @@ class HuffModel:
|
|
1642
1648
|
|
1643
1649
|
print("----------------------------------")
|
1644
1650
|
|
1651
|
+
huff_modelfit = None
|
1652
|
+
|
1645
1653
|
if interaction_matrix_metadata != {} and "fit" in interaction_matrix_metadata and interaction_matrix_metadata["fit"]["function"] is not None:
|
1646
1654
|
print("Parameter estimation")
|
1647
1655
|
print("Fit function " + interaction_matrix_metadata["fit"]["function"])
|
@@ -1682,6 +1690,13 @@ class HuffModel:
|
|
1682
1690
|
|
1683
1691
|
print("----------------------------------")
|
1684
1692
|
|
1693
|
+
return [
|
1694
|
+
customer_origins_metadata,
|
1695
|
+
supply_locations_metadata,
|
1696
|
+
interaction_matrix_metadata,
|
1697
|
+
huff_modelfit
|
1698
|
+
]
|
1699
|
+
|
1685
1700
|
def mci_fit(
|
1686
1701
|
self,
|
1687
1702
|
cols: list = ["A_j", "t_ij"],
|
@@ -2341,6 +2356,7 @@ class MCIModel:
|
|
2341
2356
|
|
2342
2357
|
customer_origins_metadata = interaction_matrix.get_customer_origins().get_metadata()
|
2343
2358
|
supply_locations_metadata = interaction_matrix.get_supply_locations().get_metadata()
|
2359
|
+
interaction_matrix_metadata = interaction_matrix.get_metadata()
|
2344
2360
|
|
2345
2361
|
print("Multiplicative Competitive Interaction Model")
|
2346
2362
|
print("--------------------------------------------")
|
@@ -2371,7 +2387,10 @@ class MCIModel:
|
|
2371
2387
|
|
2372
2388
|
print("--------------------------------------------")
|
2373
2389
|
|
2390
|
+
mci_modelfit = None
|
2391
|
+
|
2374
2392
|
mci_modelfit = self.modelfit()
|
2393
|
+
|
2375
2394
|
if mci_modelfit is not None:
|
2376
2395
|
|
2377
2396
|
print ("Goodness-of-fit for probabilities")
|
@@ -2402,6 +2421,13 @@ class MCIModel:
|
|
2402
2421
|
print(APE_df.to_string(index=False))
|
2403
2422
|
|
2404
2423
|
print("--------------------------------------------")
|
2424
|
+
|
2425
|
+
return [
|
2426
|
+
customer_origins_metadata,
|
2427
|
+
supply_locations_metadata,
|
2428
|
+
interaction_matrix_metadata,
|
2429
|
+
mci_modelfit
|
2430
|
+
]
|
2405
2431
|
|
2406
2432
|
def utility(
|
2407
2433
|
self,
|
huff/tests/tests_huff.py
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# Author: Thomas Wieland
|
5
5
|
# ORCID: 0000-0001-5168-9846
|
6
6
|
# mail: geowieland@googlemail.com
|
7
|
-
# Version: 1.5.
|
8
|
-
# Last update: 2025-
|
7
|
+
# Version: 1.5.7
|
8
|
+
# Last update: 2025-08-01 14:01
|
9
9
|
# Copyright (c) 2025 Thomas Wieland
|
10
10
|
#-----------------------------------------------------------------------
|
11
11
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: huff
|
3
|
-
Version: 1.5.
|
3
|
+
Version: 1.5.7
|
4
4
|
Summary: huff: Huff Model Market Area Analysis
|
5
5
|
Author: Thomas Wieland
|
6
6
|
Author-email: geowieland@googlemail.com
|
@@ -28,11 +28,9 @@ Thomas Wieland [ORCID](https://orcid.org/0000-0001-5168-9846) [EMail](mailto:geo
|
|
28
28
|
See the /tests directory for usage examples of most of the included functions.
|
29
29
|
|
30
30
|
|
31
|
-
## Updates v1.5.
|
31
|
+
## Updates v1.5.7
|
32
32
|
- Extensions:
|
33
|
-
-
|
34
|
-
- Other
|
35
|
-
- map_with_basemap() now belongs to huff.gistools
|
33
|
+
- InteractionMatrix.summary(), MCIModel.summary() and HuffModel.summary() now return metadata and model fit (if available)
|
36
34
|
|
37
35
|
|
38
36
|
## Features
|
@@ -1,10 +1,10 @@
|
|
1
1
|
huff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
huff/gistools.py,sha256=cffGqNRaCaIE0f52j5bGpgbdxMxy8zmeMQqPhrVSfOE,12890
|
3
|
-
huff/models.py,sha256=
|
3
|
+
huff/models.py,sha256=KBey1HLPKDHLfT6WkDofeF3XGhp8c19FfAyhietvM8U,135564
|
4
4
|
huff/ors.py,sha256=JlO2UEishQX87PIiktksOrVT5QdB-GEWgjXcxoR_KuA,11929
|
5
5
|
huff/osm.py,sha256=1a74HkKgAJYLWdthnAslOEJiHYz7qI3dk7u4ku6Jq0o,3563
|
6
6
|
huff/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
huff/tests/tests_huff.py,sha256=
|
7
|
+
huff/tests/tests_huff.py,sha256=ntSiRoqPv57NkSLYFhUeh9f6uwVlfHul1wO1PipLrPU,13095
|
8
8
|
huff/tests/data/Haslach.cpg,sha256=OtMDH1UDpEBK-CUmLugjLMBNTqZoPULF3QovKiesmCQ,5
|
9
9
|
huff/tests/data/Haslach.dbf,sha256=GVPIt05OzDO7UrRDcsMhiYWvyXAPg6Z-qkiysFzj-fc,506
|
10
10
|
huff/tests/data/Haslach.prj,sha256=2Jy1Vlzh7UxQ1MXpZ9UYLs2SxfrObj2xkEkZyLqmGTY,437
|
@@ -24,7 +24,7 @@ huff/tests/data/Haslach_supermarkets.qmd,sha256=JlcOYzG4vI1NH1IuOpxwIPnJsCyC-pDR
|
|
24
24
|
huff/tests/data/Haslach_supermarkets.shp,sha256=X7QbQ0BTMag_B-bDRbpr-go2BQIXo3Y8zMAKpYZmlps,324
|
25
25
|
huff/tests/data/Haslach_supermarkets.shx,sha256=j23QHX-SmdAeN04rw0x8nUOran-OCg_T6r_LvzzEPWs,164
|
26
26
|
huff/tests/data/Wieland2015.xlsx,sha256=H4rxCFlctn44-O6mIyeFf67FlgvznLX7xZqpoWYS41A,25788
|
27
|
-
huff-1.5.
|
28
|
-
huff-1.5.
|
29
|
-
huff-1.5.
|
30
|
-
huff-1.5.
|
27
|
+
huff-1.5.7.dist-info/METADATA,sha256=1sLuRb8CQ-RtYaA2kpUxoNBWRWuH5BEzMmi78_NNj-0,6021
|
28
|
+
huff-1.5.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
29
|
+
huff-1.5.7.dist-info/top_level.txt,sha256=nlzX-PxZNFmIxANIJMySuIFPihd6qOBkRlhIC28NEsQ,5
|
30
|
+
huff-1.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|