Loading
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more

crowdAI is shutting down - please read our blog post for more information

Train Schedule Optimisation Challenge

Optimizing train schedules


Completed
209
Submissions
444
Participants
29670
Views

Problem Instance 2: What's up with BIL and BILW?

Posted by LeoB over 1 year ago

In my observation I see that the Route/Line 18223 and 911 move on certain parts into the same direction. However if I use the same algorithm as route_graph.py to build the graph, in my understanding, the route from 911 (sequence number 380 and 385) moves from BIL to BILW and the route 18223 (sequence number 440 and 445) moves from BILW to BIL.

Could someone share this observation? Is the graph building algorithm in route_graph.py bugy?

Posted by Raphael  over 1 year ago |  Quote

@Leob. Thanks for the input. There way indeed a error in the problem_instance 02_a_little_less_dummy.json. BILW and BIL are swapped. Even though it doesn’t have any influence on the solution we have fixed it (https://github.com/crowdAI/train-schedule-optimisation-challenge-starter-kit/commit/b7258b29b825bf2542a98cca9ba0897fc2f240c4). Hopefully this will make things clearer to understand.

Posted by LeoB  about 1 year ago |  Quote

Hi @Raphael Thanks for fixing it. Off course it’s not relevant for the (optimal) solution, but for my algorithm to detect the direction of the train it is relevant. Off course I’m not yet sure if the detection of the direction is helpful at the end. But can I make the assumption that in correct example that the ending_point off one route section is the section_marker of the next route section in sequence?

Posted by jordiju  about 1 year ago |  Quote

@LeoB > can I make the assumption that in correct example that the ending_point off one route section is the section_marker of the next route section in sequence?

No, you should not make this assumption. In fact, it’s best if you ignore the fields starting_point and ending_point. We use these for visualising solutions, but not during the solution algorithm.

If what you want to do is find the “next” section(s) to a given section, then within a route_path you could simply take the next section according to the sequence_number. In general, once you have the graph as described in route_graph.py, probably the best way to find “next” (or “previous”) sections would be to ask the networkx library to do that for you.

You may also look at sorting the route graph topologically. In the networkx graph library, you could do that with this function.

Would this solve, what you are trying to do?

Posted by LeoB  about 1 year ago |  Quote

Hi @jordiju My solution bases on R and not on python. So the reference to a library will not help much. But for now I stopped working on this approach and started with a completely different approach (at least for now).

Posted by jordiju  about 1 year ago |  Quote

@LeoB In R you could use the igraph package (http://igraph.org/r/) to build the routing graph. But in any case, good luck with your new approach.