Git Product home page Git Product logo

ttc_simulation's Introduction

TTC_simulation

This is a simulation of the Bloor-Danforth TTC subway line in C. The subway line is simulated as a linear structure, giving rise to the linked list data structure used in the projet.

This project was implemented as a CSC190 course project at the University of Toronto in winter 2013. You can learn more about the project goals and requirements here and here.

Installation

Navigate to the directory you want to clone the project to. Clone the repo using the following git bash command

git clone https://github.com/tarhang/TTC_simulation.git

Usage

  • ttc.h - contains data structure definitions and function headers.
  • passengers.c - contains the implementation of methods related to the passenger data structure (passengers are implemented using linked lists).
  • trains.c - contains the implementation of methods related to train data structures (linked list).
  • stations.c - contains the implementation of methods related to station data structure (doubly linked list).
  • bloor_line.txt - input data containing the names of the stations along the subway line
  • test_passenger.c, test_train.c, and test_station.c - each contain a main function to test the methods in their corresponding algorithm files.
  • Makefile - contains the command-line compilation instructions to test the code. There are three compilations in the file:
    • type make passenger in the command-line to create an executable file to test the methods in the passengers C file. This creates an executable file name 'passenger'. Run the executable by ./passenger in the command-line.
    • type make train in the command-line to create an executable file to test the methods in trains C file. The executable is then run by the command-line instruction ./train.
    • type make station to create an executable to test the methods in the stations C file. Run the executable with ./station.

ttc_simulation's People

Contributors

tarhang avatar

Watchers

James Cloos avatar

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.