Skip to content

Instantly share code, notes, and snippets.

@tbje
Created January 31, 2012 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbje/1709420 to your computer and use it in GitHub Desktop.
Save tbje/1709420 to your computer and use it in GitHub Desktop.
TestData
package org.scalatrain
object TestData {
val List(munich, nuremberg, essen, cologne) =
List("Munich", "Nuremberg", "Essen", "Cologne") map { Station(_) }
val (t722, t724) = ("722", "724")
val times: Map[String, Map[Station, Time]] = Map(
t722 -> Map(
munich -> Time(8, 30),
nuremberg -> Time(9),
essen -> Time(10, 45)),
t724 -> Map(
munich -> Time(6, 30),
nuremberg -> Time(7, 30),
cologne -> Time(10)))
val ice722 = Train("ICE", t722, times(t722) map { _.swap } toSeq sortBy { _._1.asMinutes })
val ice724 = Train("ICE", t724, times(t724) map { _.swap } toSeq sortBy { _._1.asMinutes })
val planner = new JourneyPlanner(Set(ice722, ice724))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment