Skip to main content
This code is to solve traveling salesman problem by using simulated annealing meta heuristic.

```
import numpy
import pytspsa


solver = pytspsa.Tsp_sa()
c = [
[0, 0],
[0, 1],
[0, 2],
[0, 3]
]
c = numpy.asarray(c, dtype=numpy.float32)
solver.set_num_nodes(4)
solver.add_by_coordinates(c)
solver.set_t_v_factor(4.0)

# solver.sa() or sa_auto_parameter() will solve the problem.
solver.sa_auto_parameter(12)

# getting result
solution = solver.getBestSolution()

print('Length={}'.format(solution.getlength()))
print('Path= {}'.format(solution.getRoute()))
```

See github page.

Metadata

Release files for pytspsa 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytspsa 0.1.14
File Size Uploaded Provenance Actions
pytspsa-0.1.14.tar.gz 18.6 kB Without provenance Details for pytspsa-0.1.14.tar.gz

Release files / pytspsa-0.1.14.tar.gz

Download URL pytspsa-0.1.14.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e10b6313ed8e98f1bf639d34aa7792d9689b22a4dd9c14990ee428fe24ad4ef
BLAKE2b-256 checksum
How to use checksums
ba1405e340c9e86e872d10ef41ff7d849bc25a72b3d9e52feb94ffee5eb9ca2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pytspsa 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.14 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page