Coder Social home page Coder Social logo

the-elevator-problem's Introduction

The Elevator Problem

Getting Started

Mainly you must:

  1. Install the latest .NET Core 3.0 Preview SDK release.
  2. Install the latest Visual Studio preview with the ASP.NET and web development workload.

Or follow the getting started documentation to run this application

Overview

  • Main logic within TheElevatorProblem\Pages\ElevatorProblem\ElevatorProblem.razor
  • When entering the page with the list of elevators, it defaults to 10 floors and 3 elevators.
  • Floors are divided into two sections. The Left side contains elevators with passengers. The Right side contains waiting passengers.
  • Elevators start at the bottom level.
  • There are many options and statistics shown.
  • Time is measured in 'units'.
  • Power is measured in 'floor changes'.
  • New Passengers are placed on a random floor and requests a random floor.
  • If deleting entities with entities within them, god help us all on how it was handled.
  • Pretty pictures are available within this directory.

Elevator Simulation Picture 1 Elevator Simulation Picture 2

Technical Challenges

  • May take time to respond to a requesting passenger. Currently it looks to see if there is at least one passenger that exists and sends on elevator per direction. Does not send multiple. Does not take into account for cost over time for power.
  • Not efficient if running large datasets.
  • Having a Task wait is unavailable within Blazor since Blazor's implementation for WASM does not allow it. I could be wrong.
  • As more components are rendered on screen, the slower it gets. Good for shorter demonstrations or fewer passengers.

Missing

  • One requirement is to have the state of each button of the floor. A work around if needed is to check for passengers that are not in a current elevator and their current floor is not their requested floor. You can deduct the button they pressed buy the floor they are requesting relative to their current floor.
  • Another requirement missing is time elapsed since each floor-button pushed. This again would be easy to implement per max wait time of a requesting passenger per floor per direction.

the-elevator-problem's People

Contributors

ajgoldenwings avatar

Stargazers

 avatar  avatar  avatar Yangyang Pearson avatar

Watchers

James Cloos 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.