Giter Club home page Giter Club logo

offline_meta_bbo's Introduction

An Offline Meta Black-box Optimization Framework for Adaptive Design of Urban Traffic Light Management Systems

Environment Setup

You should install SUMO, an urban traffic simulator. Please follow instructions in here

We strongly recommend to use conda environment. We can install required libraries using requirements.txt

conda create -n tsc python=3.8 -y
conda activate tsc
pip install -r requirements.txt

Main Experiments

Our method consists of three main steps: Offline Data Collection, Meta Training, and Online Adaptation.

  • Offline Data Collection

    To collect offline data, you should run the following command. You can set num_worker to accelerate the data collection process via parallelization.

    python collect_data.py --network 2by2 --scheme comb
    

    We provide script file for generating offline data across all networks and schemes in scripts/collect_data.sh

  • Meta Training

    After collecting dataset, you should run the following command to train our ANP model. Model will be saved in results/<network>/<scheme>/anp/<exp_id>/ckpt.tar.

    python meta_train.py --network 2by2 --scheme comb --model anp --exp_id trial1
    

    We provide script file for meta-training ANP across all networks and schemes in scripts/meta_train.sh

  • Online Adaptation

    Finally, we employ Bayesian optimization with the trained ANP as a surrogate model to find optimal scheme for traffic lights with unseen traffic patterns. You should run the following command to conduct online adaptation.

    python meta_test.py --network 2by2 --scheme comb --model anp --exp_id trial1 --scenario_id 0
    

    We provide script file for online adaptation across all networks and schemes in scripts/meta_test.sh

offline_meta_bbo's People

Contributors

dbsxodud-11 avatar

Stargazers

Kanghoon Lee avatar Yuchen Shi avatar Evolutionary-Intelligence avatar Federico Berto 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.