satheler / smart-elevator

A proposal of algorithm of smart elevators in brute force and dynamic programming.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart Elevator

GitHub license

Description of College project: I work in a very tall building with a very slow elevator. It's frustrating when people push the buttons on many neighbors floors (let's say 13, 14 and 15) when I go downstairs to the penthouse. In this case, my trip to the penthouse is interrupted three times, once in each of these floors. It would be more polite if the three people agreed to push only the 14th - on floors 13 and 15, people would go up or down the stairs on one floor. Your task is to write an elevator optimization program. All people say beforehand as they enter the elevator (downstairs) the intention of the floors on which they wish to go. The elevator then decides which floors will stop. The elevator is limited to stopping at a maximum of K floors so as to minimize the number of people who need to go up / down stairs.

Getting Started

Note: Running this requires Git and npm.

In your terminal:

How to configure

# Clone the repository
$ git clone https://github.com/gustavosatheler/smart-elevator.gits
# Go into the repository
$ cd smart-elevator
# Install dependencies
$ npm install

How to run

# Run the app
$ npm run app

How to run the app showing all combinations

# Run the debug
$ npm run debug

How to build

Note: Running this requires .

# Build app
$ npm run build

About

A proposal of algorithm of smart elevators in brute force and dynamic programming.

License:MIT License


Languages

Language:JavaScript 100.0%