evevator-ttk4145

command module
v0.0.0-...-71b31c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: Unlicense Imports: 7 Imported by: 0

README

Multiple elevator project - TTK4145

Summary of project

The objective of this project was to create a system of multiple elevators that take orders and communicate over network in accordance to the requirements specification given here. The project is written in Go.

We've chosen to solve the project by creating a Finite State Machine (fsm-module) that handles the logic of executing orders for a single elevator. The FSM handles fault tolerance logic for a single elevator such as motorstop, obstruction and loading and saving cab-orders to file in case of system crash.

The OrderDistributer is the module that handles the interaction between the elevators. It communicates with the other elevators using the Network-module, and decides which elevator should take an order by using the costfunction-module. After it has been decided, if the order is its own, it then sends that to the FSM. Otherwise, it starts a timer on the order. In the case where it doesn't get a "Done" message from another elevator before the timer times out, it will send it to it's own FSM. This secures fault-tolerance for orders, as all orders are exexuted by some elevator no matter what.

Module overview

Here you will find some informal UML. The state diagram shows how our four states interact in the FSM, and the module-diagram shows which modules we have and what they consist of.

picture picture

Loaned code
  • elevator_io.go
  • bcast.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
network

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL