computer controlled railroad simulator
Download
Skip this Video
Download Presentation
Computer-Controlled Railroad Simulator

Loading in 2 Seconds...

play fullscreen
1 / 16

Computer-Controlled Railroad Simulator - PowerPoint PPT Presentation


  • 116 Views
  • Uploaded on

Computer-Controlled Railroad Simulator. Adrian Anderson http://compsci.snc.edu/cs460/andeaj/. Project Description. Create a model railroad simulator Show graphic representation of trains, turnouts, and sensors Allow for a custom track design

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Computer-Controlled Railroad Simulator' - rumor


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
computer controlled railroad simulator

Computer-Controlled Railroad Simulator

Adrian Anderson

http://compsci.snc.edu/cs460/andeaj/

project description
Project Description
  • Create a model railroad simulator
  • Show graphic representation of trains, turnouts, and sensors
  • Allow for a custom track design
  • Receive hardware commands from external programs, and send response commands back
  • Allow the user to recreate certain conditions
  • Simulate hardware failure
solution
Solution
  • Computer-Controlled Railroad Simulator
  • Written in Visual Basic 2005, using .NET
simulator
Simulator
  • Internally stores the state of trains, turnouts, and sensors
  • Moves trains around a virtual track
  • Interface for controlling the track and trains
  • Simulation of ideal, controlled railroad conditions
  • Check for train collisions
  • “Disasters” – see what happens when things go wrong
track editor
Track Editor
  • Track data stored in an XML file
  • Loaded and stored in an internal database
  • Fully customizable
  • Allows for many different track arrangements
communications
Communications
  • Receives NMRA standard digital railroad controller packets
  • External programs can interface with the simulator as if it were a real railroad
  • Change train speed and direction
  • Request state of all sensors
  • Good for testing programs like the Train Operating System
methodology
Methodology
  • Problem: Represent track as computer data
  • Solution:
    • Junctions
    • Segments, which go from junction to junction
    • Turnouts, which connect two segments at a junction
    • Sensors, which are connected to segments
methodology1
Methodology
  • Problem: Save and store track data
  • Solutions:
    • Internal Storage: DataSet Class
      • Visual Basic class, relational database
      • ReadXML command reads and interprets XML files
    • External Storage: XML
      • Easy to read, interpret, and edit
      • Standard format for miscellaneous data
      • Easy to validate
      • Easy to use in Visual Basic programs
methodology2
Methodology
  • Problem: Collision detection
  • Solution:
    • Collision table
    • Train’s movement leaves records in the collision table
    • Compare a train’s potential destination with collision table records on the same segment/junction
    • If two records overlap, then the trains crash
    • Sensor detection: Trains “collide” with sensors to activate them
methodology3
Methodology
  • Problem: Collision detection
  • Solution:
    • Collision table
    • Train’s movement leaves records in the collision table
    • Compare a train’s potential destination with collision table records on the same segment/junction
    • If two records overlap, then the trains crash
    • Sensor detection: Trains “collide” with sensors to activate them
exceptions
Exceptions
  • Saved state of trains and track
  • Save status log to a file
  • XML validation
  • Preset train types
  • More labels in simulator window
learning development
Learning & Development
  • References
    • MSDN Library
    • Win 32 System Services: The Heart of Windows 95 and Windows NT
  • CS Concepts
    • Database – track representation, track editor
    • Operating Systems – pipe communication, threading
extensions
Extensions
  • Read more types of hardware packets
  • Advanced collision detection
  • More detailed graphical layout
  • More detailed object information
advice
Advice
  • Start early
  • Set concrete goals with deadlines
  • Meet those deadlines
  • Update journal often with small updates
ad