Giter VIP home page Giter VIP logo

train-schedule-optimisation-challenge-starter-kit's Introduction

sbb-train-schedule-optimisation-challenge-starter-kit

CrowdAI-Logo

This is a starter-kit Repo for the SBB Train Schedule Optimisation Challenge on crowdAI.

In this repo you will find background material, sample files and support scripts that help you to get started with the challenge.

How to get started?

This challenge requires a bit of explanation before you can get started. While the general idea is quite simple, and there are only a grand total of twelve rules that need to be taken into account when producing a timetable, the data models used require an introduction.

We recommend that you proceed through the documentation in the following order:

  1. Quick Introduction to the Timetabling Problem First, read the Quick Introduction to the Timetabling Problem. After this, you should be able to relate to the problem and start to get a feeling for the algorithmic difficulties involved.

  2. Worked Example Second, it is probably a good idea to go through the Worked Example. In that document, we take a very simple sample problem, produce a solution from the ground up (in the required solution data format) and then verify that we indeed satisfy all twelve timetabling rules.

  3. General Outline After the first two, you may proceed with the further documentation (see below), and maybe start to solve the simple instances in parallel with learning the fine details of the data models and the timetabling rules.

  4. Instance Description Once you really want to start solving the instances, you should also check out the description of the instances which gives you an idea about the size (and difficulty) of the problem instances. You should start solving the simple instances first. More information on that in the description of the instances.

  5. How to Submit ? The what to submit guide walks you through a sample submission.

What do I have to do?

You must try to generate solutions to the nine problem instances in this folder.

Once you have solutions, you can submit them through the Challenge page on crowdAI.

In order to submit, it is not necessary to solve all nine problem instances. You can also submit an arbitrary subset of them. However, each missing solution will incur a penalty of 10'000 points. As soon as you manage to find a solution with an objective value better (i.e. lower) than 10'000, you should therefore include that solution in the submission.

By the way, we provide sample solutions to seven of the nine problem instances. These seven solutions are also available as a sample submission. You may use these solutions to test the submission workflow and verify the data models. You must not use them as a basis for your solver, however, see the according challenge rules.

The goal is to create a submission with as small a score as possible.

What can I find in this Repo?

  • In the Documentation folder you find all documentation texts, such as

  • The sample_files folder contains some simple sample instances and solution. We use these in the documentation to explain our data models and the grading function.

  • The problem_instances folder contains the actual timetabling problem instances that you need to solve for this challenge. Also, you find in a subfolder sample solutions (although not very good ones) to some of the instances and a sample submission.

  • The utils folder contains some utilities such as

    • a script to evaluate individual solutions to problem instances without a "formal" submission. This is very helpful when trying to tune your algorithms. There is also an accompanying notebook explaining its use.
    • a script that transforms the routes in a problem instance into directed graphs in the networkx package. You may find this useful when trying to work with the route graph algorithmically in your solver, or just for visualization purposes.

Author

train-schedule-optimisation-challenge-starter-kit's People

Contributors

dirkschumacher avatar dragoon avatar jordiju avatar rapsli avatar scarroll32 avatar spmohanty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

train-schedule-optimisation-challenge-starter-kit's Issues

Add an example submission file

Adding a sample submission file will act as a good reference for participants.
And they can also try submitting it right away and claim atleast a spot on the leaderboard.

yEd graphs don't work

Hello,

I was trying to visualise the routes in '01_dummy.json' using 'route_graph.py' but I got the following error on yEd:
'The attribute label is of type long which is currently not supported. lts data was converted to integers and some values might have been truncated. '

Afterwards yEd opens a sheet with only one box in it. Could you please check it?

Images not rendered / link wrong?

The images are not shown in most markdowns in the documentation folder

Example

In worked example they work.

--> Link must be realtive to location of the markdown, remove the 'documentation/' from the relative path (on gitlab, the path had to be relative to the repo root)

cplex

Can I use cplex for this problem

route_graph.py errors in save_graph

I get errors both with python2 and python3. Here's the output:

$ python3.6 route_graph.py 
Adding Edge from (1_beginning) to (M1) with sequence number 1
Adding Edge from (M1) to (4->5) with sequence number 4
Adding Edge from (4->5) to (M2) with sequence number 5
Adding Edge from (M2) to (M3) with sequence number 6
Adding Edge from (M3) to (10->13) with sequence number 10
Adding Edge from (10->13) to (M4) with sequence number 13
Adding Edge from (M4) to (14_end) with sequence number 14
Adding Edge from (2_beginning) to (M1) with sequence number 2
Adding Edge from (3_beginning) to (M1) with sequence number 3
Adding Edge from (M2) to (7->8) with sequence number 7
Adding Edge from (7->8) to (8->9) with sequence number 8
Adding Edge from (8->9) to (9_end) with sequence number 9
Adding Edge from (M3) to (11->12) with sequence number 11
Adding Edge from (11->12) to (M4) with sequence number 12
Adding Edge from (1_beginning) to (M1) with sequence number 1
Adding Edge from (M1) to (4->5) with sequence number 4
Adding Edge from (4->5) to (M2) with sequence number 5
Adding Edge from (M2) to (M3) with sequence number 6
Adding Edge from (M3) to (10->13) with sequence number 10
Adding Edge from (10->13) to (M4) with sequence number 13
Adding Edge from (M4) to (14_end) with sequence number 14
Adding Edge from (2_beginning) to (M1) with sequence number 2
Adding Edge from (3_beginning) to (M1) with sequence number 3
Adding Edge from (M2) to (7->8) with sequence number 7
Adding Edge from (7->8) to (8->9) with sequence number 8
Adding Edge from (8->9) to (9_end) with sequence number 9
Adding Edge from (M3) to (11->12) with sequence number 11
Adding Edge from (11->12) to (M4) with sequence number 12
Finished building fahrweg-graphen in 0.0005464553833007812 seconds
Traceback (most recent call last):
  File "route_graph.py", line 87, in <module>
    save_graph(route_graphs)
  File "route_graph.py", line 72, in save_graph
    route_graph.edges[edge]['label'] = edge_labels[edge]
TypeError: 'method' object is not subscriptable
$ python2.7 route_graph.py 
Adding Edge from (1_beginning) to (M1) with sequence number 1
Adding Edge from (M1) to (4->5) with sequence number 4
Adding Edge from (4->5) to (M2) with sequence number 5
Adding Edge from (M2) to (M3) with sequence number 6
Adding Edge from (M3) to (10->13) with sequence number 10
Adding Edge from (10->13) to (M4) with sequence number 13
Adding Edge from (M4) to (14_end) with sequence number 14
Adding Edge from (2_beginning) to (M1) with sequence number 2
Adding Edge from (3_beginning) to (M1) with sequence number 3
Adding Edge from (M2) to (7->8) with sequence number 7
Adding Edge from (7->8) to (8->9) with sequence number 8
Adding Edge from (8->9) to (9_end) with sequence number 9
Adding Edge from (M3) to (11->12) with sequence number 11
Adding Edge from (11->12) to (M4) with sequence number 12
Adding Edge from (1_beginning) to (M1) with sequence number 1
Adding Edge from (M1) to (4->5) with sequence number 4
Adding Edge from (4->5) to (M2) with sequence number 5
Adding Edge from (M2) to (M3) with sequence number 6
Adding Edge from (M3) to (10->13) with sequence number 10
Adding Edge from (10->13) to (M4) with sequence number 13
Adding Edge from (M4) to (14_end) with sequence number 14
Adding Edge from (2_beginning) to (M1) with sequence number 2
Adding Edge from (3_beginning) to (M1) with sequence number 3
Adding Edge from (M2) to (7->8) with sequence number 7
Adding Edge from (7->8) to (8->9) with sequence number 8
Adding Edge from (8->9) to (9_end) with sequence number 9
Adding Edge from (M3) to (11->12) with sequence number 11
Adding Edge from (11->12) to (M4) with sequence number 12
Finished building fahrweg-graphen in 0.000713109970093 seconds
Traceback (most recent call last):
  File "route_graph.py", line 87, in <module>
    save_graph(route_graphs)
  File "route_graph.py", line 72, in save_graph
    route_graph.edges[edge]['label'] = edge_labels[edge]
TypeError: 'instancemethod' object has no attribute '__getitem__'

Any ideas? I have no experience using python.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.