Coder Social home page Coder Social logo

elevators's Introduction

Elevators Demo

Elevator control system demonstrating Erlang/OTP upgrades.

History

Originally written by Håkan Huss in the late 90s at Erlang Systems.

It was part of the 5-day Erlang Literacy course aimed at test and support staff of the GPRS project. It was used as a lab exercise in several parts of the course to practise different topics such as behaviours, supervisors, release handling, etc. The first exercise using the elevator example was the mentioned "bug" that the elevator always stopped at every floor (it is actually not a bug, but an elevator scheduler which is trivially guaranteed to fulfill the requirements on elevator scheduling used in the example). Several refinements of the scheduling were made in the course lab exercises.

Since the purpose of the exercise was to use many different aspects of Erlang and OTP, the code has been written to use many behaviours rather than to be the "best" solution for the problem. The resulting architecture should still be pretty good, though.

It has also been used to demonstrate how Quick Check can test elevator systems, and featured in a few academic papers.

Thanks go to Francesco Cesarini and Håkan Huss for the historical informations.

Quick start

  • Make sure you have make and rebar installed and in your $PATH
  • Type make to build everything
  • Start the release with ./_rel/bin/elevators console
  • Make elevators move and notice they stop at each floor
  • (Exercise: Find bugs, fix them and build a release upgrade)
  • Place fixes in upgrade/scheduler.erl
  • Run ./v1to2.sh

Troubleshooting

The current compilation process prepares the demo entirely, but doesn't double check things. If something fails during the compilation or the release generation, you might want to reset the working directory.

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.