ai4co / rl4co

A PyTorch library for all things Reinforcement Learning (RL) for Combinatorial Optimization (CO)
https://rl4.co
MIT License
451 stars 83 forks source link

About TSP data format #233

Open cclvr2 opened 22 hours ago

cclvr2 commented 22 hours ago

Thank you very much for developing this library.

My question is: if a TSP problem is defined not by 2D coordinates but by the distances between points, can the existing dataset API be used? Is there a way to handle this scenario?

Looking forward to your replay.

fedebotu commented 22 hours ago

Hi! Yes, but you need to change the model structure to handle edges. For example, MatNet can deal with edge features. For the environment, you may use the ATSP environment to handle them