-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[How to change the CVRTW environment so that it can be trained and tested on the Solomon dataset] #148
Comments
Hi there, thanks for pointing this out, it is one of our priorities we would like to solve. In the current version: We are in the process of making a separate CC: @ngastzepedaPS: Note that the training is done via batches for the VRPs (e.g. [512, 100] where batch_size is 512 and num_loc is 100) so if you want different instance size in the same batch you would need to do some padding. |
In Kool et al. 2019 they did not do CVRP-TW, so we are using custom settings. |
Ok, thanks for the answer, I also downloaded some olomon dataset examples offline, but I don't know how. There are no good ideas on how to override the generate_data function in CVRTW, thank you again for your answer, and I'll take a look at the other papers. |
How to override: You can create your custom class CustomCVRPTWEnv(CVRPTWEnv):
name = "cvrptw"
[...]
def generate_data(...):
[your functions here!] And then call that environment instead! |
Okay, I'll give it a try |
We made quite a few API changes. Now, you may pass a For example: from rl4co.envs.routing import CVRPTWEnv, CVRPTWGenerator
generator = CVRPTWGenerator(num_loc=50)
env = CVRPTWEnv() You may create a new Feel free to re-open or file a new issue if something is still not working! |
Motivation
I used the python run.py experiment=routing/am-cvrptw env.num_loc=10 command to run the results under the default generated dataset, as follows:
I looked at you at rl4co/envs/routing
Regarding the specific implementation of the CVRTW environment in /cvrptw.py, I want to modify the code in it to train the cases in the Solomon dataset, so as to make a comparison with the experiments in other papers.
I tried to modify the solomon=true in the load_data, is the dataset generated at this time the solomon dataset or the dataset generated by default?
Because there is no intermediate process results and visualization means to generate the dataset, I don't know how to tell the difference.
The text was updated successfully, but these errors were encountered: