0

I'm on a project for a railway company, now I want to test my application with some data. Here's the problem, the data I need is like a time table like below:

departure_location  arrival_location   departure_time     arrival_time
a                   b                  2015-04-01 08:00   2015-04-01 08:30
b                   c                  2015-04-01 09:10   2015-04-01 09:44
c                   d                  2015-04-01 10:05   2015-04-01 12:00
...

The difficulty is that the generated timetable should be logical. That means the the arrival time of each stage should be later than the departure time but earlier than the departure time of next stage. And I want the ability that I can specify a time range, and the dynamic timetable will just be generated beautifully. I'll be the best If I can even configure how much time a train runs from source to destination and how long it stays on the arrival location until it departure again.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Aaron Shen
  • 8,124
  • 10
  • 44
  • 86
  • 3
    So you may have to write a new program to create data. – ch271828n Apr 17 '15 at 04:00
  • As soon as you want something to be "logical" you have to program that logic. So that you have to write data generator by yourself. One more idea: take existing records from your timetable DB and use them – Viktor Malyi Apr 17 '15 at 06:42

1 Answers1

0

The BullSheet Generator can work with "logical" events, it's a php tool. There is an example of code here:

https://github.com/lingtalfi/BullSheet#the-populator-script-a-full-database-example-demo (Look for the "the_events" expression).

The worflow is called timelines and is explained here: https://github.com/lingtalfi/BullSheet/blob/master/docs/timelines.md

ling
  • 9,545
  • 4
  • 52
  • 49