GithubHelp home page GithubHelp logo

anishlearnstocode / red-light-automata-simulator Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.63 MB

Theoy of Computation Project that simulates 2 red lights at a crossing using a finite state machine

JavaScript 6.84% TypeScript 59.81% CSS 12.95% HTML 20.40%

red-light-automata-simulator's Introduction

Red Lights Simulator

This is a traffic simulator based on a Finite State Machine (DFA) in Theory of Computation. It is assuming a crossing which consists of a main street (like a highway) and a side street.

These 2 streets are perpendicular to each other and the traffic running on teh main street is given priority.

There are several attributes to this system:

Main Street Minimum Run Time (Tm) This is the minimum time for which the traffic light will remain green in the main street.

Side Street Minimum Run Time (Ts) This is the minimum time for which the side street traffic light will remain green provided there ae cars in teh side street. If there are no cars in the side street the traffic light will not remain green.

This is different than the main street, as there the light will remain green even if there are no cars.

Crossing Time (Tc) This is the time taken by any car (either in the main street or the side street) to cross the crossing when the light is green for them.

Wait Time (Tw) This is the time taken by the traffic light to turn green from yellow.

Running on the Browser

The project is deployed here

Running the Project on you machine

git cone https://github.com/anishLearnsToCode/red-light-automata-simulator.git
cd red-light-automata-simulator
ng serve

This will it run it locally on your machine on port 4200

red-light-automata-simulator's People

Contributors

anishlearnstocode avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.