Skip to content

Commit

Permalink
move to new moptipy and pycommons version
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasWeise committed Oct 23, 2024
1 parent 8c58509 commit f47503d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
19 changes: 19 additions & 0 deletions moptipyapps/tsp/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,25 @@
This instance can be used to validate and santity-test algorithms, as its
solution can easily be determined using exhaustive enumeration.
Interestingly, it holds that the calculated travel distance from
Harbin (哈尔滨) to Kunming (昆明) is longer than the travel distance
from Harbin (哈尔滨) to Xi'an (西安) and then from
Xi'an (西安) to Kunming (昆明).
- Harbin (哈尔滨) - Kunming (昆明) = 3781 km
- Harbin (哈尔滨) - Xi'an (西安) = 2291 km
- Xi'an (西安) - Kunming (昆明) = 1483 km
- 2291 km + 1483 km = 3774 km, which is less than 3781 km
This may be because BaiduMaps ranked the paths by travel time and not travel
distance, or by any other strange effect I cannot account for. Maybe it is
related to which lane of a road one would naturally drive on or lengths of
intersections depending on the direction one is coming from.
Either way, this shows that this simple instance `cn11` may already have
interesting properties. It violates the triangle equation and it is
non-Euclidean. It is also not based on Geo-coordinates, but on actual street
distances and times.
>>> inst = Instance.from_resource("cn11")
>>> inst[0, 0]
0
Expand Down
2 changes: 1 addition & 1 deletion moptipyapps/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""An internal file with the version of the `moptipyapps` package."""
from typing import Final

__version__: Final[str] = "0.8.57"
__version__: Final[str] = "0.8.58"
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
#

# pycommons provides lots of utilities
pycommons[dev] >= 0.8.52
pycommons[dev] >= 0.8.54
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

# `moptipy` provides the basic optimization infrastructure and the spaces and
# tools that we use for optimization.
moptipy == 0.9.128
moptipy == 0.9.129

# the common tools package
pycommons == 0.8.52
pycommons == 0.8.54

# `numpy` is needed for its efficient data structures.
numpy == 1.26.4
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ include_package_data = True
install_requires =
certifi >= 2024.8.30
defusedxml >= 0.7.1
moptipy >= 0.9.128
moptipy >= 0.9.129
numpy < 2
numba >= 0.60.0
matplotlib >= 3.9.2
pycommons >= 0.8.52
pycommons >= 0.8.54
scipy >= 1.14.1
urllib3 >= 2.2.3
packages = find:
Expand Down

0 comments on commit f47503d

Please sign in to comment.