Giter Site home page Giter Site logo

gaocrr / elg Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 5.0 111.01 MB

Official implementation of IJCAI'24 paper "Towards Generalizable Neural Solvers for Vehicle Routing Problems via Ensemble with Transferrable Local Policy"

License: MIT License

Python 100.00%
combinatorial-optimization neural-combinatorial-optimization reinforcement-learning

elg's Introduction

ELG (Ensemble of Local and Global policies)

This repository is the code of the https://arxiv.org/abs/2308.14104, which ensembles a transferrable local policy to boost generalization. We provide the trained models to reproduce the test results in the paper.

Test ELG-POMO on VRPLIB

Under the ELG/CVRP folder, use the default settings in config.yml, run

python test_vrplib.py

You can choose the vrplib_set config from {X, XXL} to test on two different VRPLIB sets.

Test ELG-POMO on TSPLIB

Under the ELG/TSP folder, use the default settings in config.yml, and run

python test_tsplib.py

Train ELG-POMO on CVRP or TSP

First, generate the validation sets by

python generate_data.py

Modify the load_checkpoint config in config.yml to Null (i.e., load_checkpoint: ), and run

python train.py

elg's People

Contributors

gaocrr avatar

Stargazers

Amutheezan Sivagnanam avatar PanYuxin avatar Ren-Jian Wang avatar  avatar Federico Berto avatar Haoran Ye avatar 龟龟辉 avatar  avatar  avatar  avatar xuankun.huang avatar Shawn avatar  avatar  avatar

Watchers

 avatar

elg's Issues

the solution of a280 is not valid.

Hello, when I try to run the TSPLib dataset with the code and model that you have provided, I find that the solution of a280 is not valid, I would like the author to check it, thanks!

Code for checking validity:
if done: assert (self.step_state.ninf_mask == float('-inf')).all(), 'ninf_mask is not all -inf, but done is True, so the solution is not valid.'

Best regards!

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.