Giter Site home page Giter Site logo

port_simulation's Introduction

🚢 Port Simulation 🚛

"A platform used for researching the coordination of autonomous vehicles to optimize the efficiency of transport and other collaborative tasks."

License: Apache2 Documentation

Install SUMO latest version:

sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools sumo-doc

Don't forget to set SUMO_HOME variable (default sumo installation path is /usr/share/sumo)

echo 'export SUMO_HOME="/usr/share/sumo"' >> ~/.bashrc
source ~/.bashrc

Important: for a huge performance boost (~8x) with Libsumo, you can declare the variable:

export LIBSUMO_AS_TRACI=1
export SUMO_HOME="/opt/homebrew/opt/sumo/share/sumo"

Notice that you will not be able to run with sumo-gui or with multiple simulations in parallel if this is active (more details).

Experiments

Check experiments for examples on how to instantiate an environment.

python3 experiments/simulator.py -config config/port.ini

| **[SUMO]** | | | | ------------------- | ----------------------------- | ----------- | | nets | 路网定义文件路径 | : .net.xml | | route | 路由定义文件路径 | : .rou.xml | | num_seconds | 仿真时间步step | :int | | | | | | delta_time | Env执行action的step间隔时间步 | default = 1 | | edges_start_default | 车辆默认初始位置(边) | | | begin_time | sumo仿真起始时间步 | default = 0 | | | | | | | | | | **[RENDER]** | | | | gui | 是否可视化sumo | :bool |

MDP - Observations, Actions and Rewards

Observation

The default observation for each traffic signal agent is a vector:

obs = []

You can define your own observation by implementing a class that inherits from ObservationFunction and passing it to the environment constructor.

image-20231221202534826

Action

The action space is discrete.

Rewards

It is also possible to implement your own reward function:

env = SumoEnvironment(..., reward_fn=my_reward_fn)

port_simulation's People

Contributors

pwhjy avatar zhangyx1122 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.