Skip to main content

UXsim++: Fast and simple traffic simulator for Python

Project description

UXsim++: Fast and simple traffic simulator for Python

UXsim++ (or uxsimpp) is a free, open-source mesoscopic network traffic flow simulator for Python. It simulates the movements of car travelers and traffic congestion in road networks. It is suitable for simulating large-scale (e.g., city-scale) traffic phenomena. UXsim++ would be especially useful for scientific and educational purposes because of its fast, simple, lightweight, and customizable features, but users are free to use UXsim++ for any purpose.

UXsim++ is a significantly faster variation of UXsim, a pure Python-based traffic simulator. Its functionalities and syntax are almost equivalent to UXsim. Meanwhile, the internal simulation engine is thoroughly written in C++, making it 20 to 30 times faster than UXsim. Thanks to pybind11, the C++ engine is fully accessible from Python codes without any dependencies.

This is alpha stage. The codes and docs are work in progress.

Main Features

Examples

Install

Getting Started

from uxsimpp import newWorld, Analyzer

W = newWorld(
    name="basic",
    deltan=5,
    tmax=1200,
    random_seed=42
)

W.addNode("orig1", 0, 0)
W.addNode("orig2", 0, 2)
W.addNode("merge", 1, 1)
W.addNode("dest", 2, 1)

W.addLink("link1", "orig1", "merge", 1000, 20, 0.2, 1)
W.addLink("link2", "orig2", "merge", 1000, 20, 0.2, 1)
W.addLink("link3", "merge", "dest", 1000, 20, 0.2, 1)

W.adddemand("orig1", "dest", 0, 1000, 0.45)
W.adddemand("orig2", "dest", 400, 1000, 0.6)

W.print_scenario_stats()

W.exec_simulation()
W.print_simple_results()

ana = Analyzer(W)
ana.plot_time_space_trajectories(["link1", "link3"])
ana.network_fancy()

Further Reading

ArXiv preprint will be added

Terms of Use & License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uxsimpp-0.0.1-cp313-cp313-win_amd64.whl (159.6 kB view details)

Uploaded CPython 3.13Windows x86-64

uxsimpp-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

uxsimpp-0.0.1-cp313-cp313-macosx_10_13_universal2.whl (289.5 kB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

uxsimpp-0.0.1-cp312-cp312-win_amd64.whl (159.5 kB view details)

Uploaded CPython 3.12Windows x86-64

uxsimpp-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

uxsimpp-0.0.1-cp312-cp312-macosx_10_13_universal2.whl (289.4 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

uxsimpp-0.0.1-cp311-cp311-win_amd64.whl (158.3 kB view details)

Uploaded CPython 3.11Windows x86-64

uxsimpp-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

uxsimpp-0.0.1-cp311-cp311-macosx_10_9_universal2.whl (289.1 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

uxsimpp-0.0.1-cp310-cp310-win_amd64.whl (156.8 kB view details)

Uploaded CPython 3.10Windows x86-64

uxsimpp-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (193.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

uxsimpp-0.0.1-cp310-cp310-macosx_10_9_universal2.whl (286.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

uxsimpp-0.0.1-cp39-cp39-win_amd64.whl (154.7 kB view details)

Uploaded CPython 3.9Windows x86-64

uxsimpp-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

uxsimpp-0.0.1-cp39-cp39-macosx_10_9_universal2.whl (286.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file uxsimpp-0.0.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: uxsimpp-0.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 159.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for uxsimpp-0.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a661e6e15931a03a8851a0fdba4ae124e49e365813bb8160cb93a727cb7b937f
MD5 14e9fe62a24f3644277de4c748ae72d1
BLAKE2b-256 13da2f3726dcb9335ff0a53d1fe509b3c6df0264e5c89d8ae135df21e6d26b0d

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a3ecfbfddde5e755243d625d90a0604561b7a0d32d6d3a602441619cc9a0904
MD5 08cb935ca69afb875c6235e1ffa53b7c
BLAKE2b-256 4da0c44b8135620f53aca58fce6fe12687e8c80a6cee675f61022a989df0940a

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ddb8d318e8712120b2ce7a17d9f1e3eb48c28c9b7543ab19ec295faffe3b38f9
MD5 569dea39f02ac7e7558649b0707159cf
BLAKE2b-256 804f551dc0a29602aec91762d4ff5c0fae42af77f6e8183df37a06c9712daa21

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: uxsimpp-0.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 159.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for uxsimpp-0.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c1284336b80ad00667bcb0fdd0ea96bc4efae7715765a719f11872742507848d
MD5 1d7f083db7b7ab3455ea0341eb827864
BLAKE2b-256 6d2ecc28b620b627733678b305ef39805599fa2f06e7d4d7cbc86cf8e10aabfb

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f98ef604f55f0ac42f53be9339bbc66bedf7283fcaaa7d3ae074f0bc1f360687
MD5 f931442b840193e568c103f973582eaa
BLAKE2b-256 a382733d1f16c55086ede70a99800522b80b4d865ea062961110bfce4012f6bb

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 acd588b3bc5360111de923c3ce077a2e964ddfb64d75401c747e7c0d4c47768e
MD5 bed29b7d068fd2b17ed20777a9c6aee3
BLAKE2b-256 9245d9ba2b4eb12ab21edce29839f928e231d306295dd4d411a216aeb5f8f2d1

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: uxsimpp-0.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 158.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for uxsimpp-0.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 985eaf2265720fdc3c69c02b904a7a2b7d5d3984edc96a0f28ca671ff2d87eeb
MD5 0387f505029f61ba42383dc00a141ea8
BLAKE2b-256 8834b5b0f7899d89328381be50e4936ec2cf9b61d1c185230402970b4baca083

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f923439587d5b5355950476dc3523136fc9ebe7f0a06b48809d929f0e1e1ec5e
MD5 1b71a3147cdc499d43cffe18e4941aca
BLAKE2b-256 36c55007c12be2864fcfbf28fb69e5d85bf557d325f7799367cdb7053c6f430f

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cf27a49ea9a349c2c8b761a4af29f2eac5b81fc587276eca0645a42e1f0d7aa8
MD5 b75ea8b4f5d3705eab5fbf864754c140
BLAKE2b-256 58110e79e719ab7452d4278cdb3059b015cddd27f52e1ce2725e36da68280cd2

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: uxsimpp-0.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 156.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for uxsimpp-0.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 215471daceac9f75e654940e592f77e2c273c20291252b706cc1149e91536cd7
MD5 48d9d7a800376ccc171c1bbe56089371
BLAKE2b-256 a7bb7aa0813e3c7aa76a6e11fb29b8497261a5f5d7d7e6408b65927dbdf00098

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 36935590993a18cf020190b00800f36aba19fedb5f0b18e88d67a7cb646e14e9
MD5 31ee317b0c1c0f038e1df68a59eed00c
BLAKE2b-256 e8a8449dc841d71211aac2b5ebb7f08e5c45e9003d0ba998f1fb843ed9812b26

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e992164cf5b1e9278296cb7c3a3491b24d05c38276a3d7486f92f319ac8f8f82
MD5 839e6f67458e3e28b3c6017c88104095
BLAKE2b-256 ddaa9e3a6ffe75291e51eb8e527ed9da6c1cf2be4079aef4adbcd8bd6c1b5c01

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: uxsimpp-0.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 154.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for uxsimpp-0.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ed511d2c24cb3274ece2d34d11491861b9ad862a2fff1823be7e6adb26b4c1bd
MD5 f7370f6533a0f72d8cb09f1d4e2e10bb
BLAKE2b-256 f4635616434fed11a09e67333cde4ff85fd2d6a283fa3f416c894d11b46e83df

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f126c542a6dc1dda9fd8390b026df51e346ef94b1eb3eaf0ccce29efdada3fdf
MD5 6eb1eb441dce48ca282b43152cef50e1
BLAKE2b-256 bc4962f3973da067644fe7b83e52620760e1045d87513ef7cfb761506beca2d3

See more details on using hashes here.

File details

Details for the file uxsimpp-0.0.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for uxsimpp-0.0.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 15aab74abee675c91a6b7d52a0ddea6d2b29577e7072ed1d42f667a7ee71d88c
MD5 c9fc014e68e3e0ef433ee8d6855f3195
BLAKE2b-256 4ac5d8667718a1d2729965bc7253ee736b4d8a45e6cad6b083249029327f573a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page