Skip to content
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

Some mistakes when loading my own flow txt data(ndexError: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)) #27

Open
wangzelong0663 opened this issue May 19, 2021 · 6 comments

Comments

@wangzelong0663
Copy link

When I set the flow_1x1.txt only with the four lines data like what the image shows below:
image
Then the except from the CBEngine.py happend:
/CBEngine/envs/CBEngine.py", line 168, in step self.eng.next_step() IndexError: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

The image road of the map is below:
image
The 1 2 1just means the routes of the vehicle is from road 1 -->road 2 --> road 1

And when I set the flow_1x1.tx only with the text image below:
image

It can run without all mistake, just add the 2 to 1 2 1 2 that means the routes of the vehicle is from road 1 -->road 2 --> road 1-->road2
What causes this except above?

And there is any suggestions or rules that I should obey when I want to generate my own flow data?
Bacause the mistake
/CBEngine/envs/CBEngine.py", line 168, in step self.eng.next_step() IndexError: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
also happen when I load my own generating flow_round2.txt data.

@zhyliu00
Copy link
Contributor

Thanks for your comment.
The problem in readme.md may be helpful.

@wangzelong0663
Copy link
Author

Thanks for your comment.
The problem in readme.md may be helpful.

Thanks for your reply.
I think the problem may be caused by my own flow.txt data, there must be some rule that I miss to produce my own data.Could you provide some python scripts or give me some suggestions to product the flow data?

And I still cann't understand why the flow_1x1.txt with the content below cause the except

CBEngine/envs/CBEngine.py", line 168, in step
self.eng.next_step()
IndexError: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

image

while just change the content of the flow_1x1.txt to the image below, justing adding 2 to the fourth line and change the 3 to 4 on the third line,it can run without any mistake. So maybe there is some rule to product the routes that I miss
image

@gjzheng93
Copy link
Contributor

can you please send the road file to us?

@Kanstarry9T
Copy link
Contributor

About create your own flow.txt data, we will release a python script sooner for your convenience. Thanks for your comments.

@wangzelong0663
Copy link
Author

can you please send the road file to us?

The road file is the roadnet_1x1.txt.

@Kanstarry9T
Copy link
Contributor

Please use the roadnet_round2.txt for the second round (qualification phase), the roadnet_1x1.txt is a different road network that is used for previous stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants