Vehicle # position: float # curVelocity: float # maxVelocity: float # brakeProb: float # id: int # test: int # trackLength: float + timeElapse(): void - getPosition(): float - getCurVelocity(): float - getMaxVelocity(): float - updateVelocity(distanceForerunner: float): void - timeElapse(): void - Vehicle(id: id, position: int, maxVelocity: float, brakeProb: float, trackLength: float) Track # vehicles: List<Vehicle> # vtrList: List<List<VehicleTimeRecord>> # trackLength: float # sumAvgMemory: float # lastAvg: float + timeElapse(timestep: float): void # createVehiclesList(numberVehicles: int): List<Vehicle> - getVtrList(): List<List<VehicleTimeRecord>> - getTrackLength(): float - avg_step(step: int): float # update_avg(): void - Track(numberVehicles: int, trackLength: float) VehicleTimeRecord # id: int # position: float # velocity: float # maxVelocity: float - getMaxVelocity(): float - getPosition(): float - getVelocity(): float - VehicleTimeRecord(id: int, position: int, velocity: float, maxVelocity: float) TimeRecordView # onSizeChanged(w: int, h: int, oldw: int, oldh: int): void - TimeRecordView(context: context, track: Track) SurfaveView MainActivity -static defaultNoOfVehicles: int = 25 {readOnly} - static defaultTrackLength: int = 100 {readOnly} - static defaultBrakeProb: float = 0.3f {readOnly} - static defaultMaxVelocity: float = 5.0f {readOnly} - static defaultDelay: int = 0 {readOnly} - static defaultHistoryLength: int = 50 {readOnly} - static defaultFrameskip: int = 0 {readOnly} # Track track: Track # TimeRecordView trackView: TimeRecordView # Worker worker: Worker # Renderer renderer: Renderer # LinearLayout viewStack: LinearLayout # onCreate(savedInstanceState:Bundle): void - static round(float number, int digits): float # stopWorker(): void # updateTrack(): void - onProgressChanged(seekBar: SeekBar, progress: int, fromUser; boolean): void - onStartTrackingTouch(seekBar: SeekBar): void - onStopTrackingTouch(seekBar: SeekBar): void - onStepButtonClick(view: View): void - onPlayButtonClick(view: View): void - onStopButtonClick(view: View): void - onClearButtonClick(view: View): void Worker # frameskip: int # renderer: Renderer # track: Track # stop: boolean # gui: MainActivity # Renderer renderer # int frameskip; - run(): void - setStop(stop: boolean): void - setFrameskip(frames): int: void - Worker(track: track, gui: MainActivity, renderer: Renderer, frameskip: int) Thread # forerunner