wouterkool / attention-learn-to-route

Attention based model for learning to solve different routing problems
MIT License
1.08k stars 341 forks source link

Why arent lengths directly sent into the get_costs function? I am trying to modify the code and also implement a min-max version of it for my paper. #60

Open Casualite opened 10 months ago

Casualite commented 10 months ago

Firstly, I want to thank you for this paper and making the code public. It was a good place for me to start my implementation . I might have misunderstood the code, but isn't the get_costs function being used to generate rewards? If no, could you tell me why that is used? If yes, why not pass the lengths from the state directly?

wouterkool commented 10 months ago

Hi! Not sure if I fully understand your question but the code is set up to be general. For example for prize collecting TPS or orienteering, costs is not just the length, hence we use the cost function.