OrderAssigner (ElevatorProject v0.1.0)

Assigns orders to the best suited elevator.

Uses the following modules:

Link to this section Summary

Functions

Assigns an order to the best suited elevator. Unless the elevator is running without being connected to the node cluster, the same elevator will not get the same order twice in a row. Calls OrderDistributor.distribute_new/1 after the order is assigned.

Returns a specification to start this module under a supervisor.

Link to this section Functions

Link to this function

assign_order(order)

Assigns an order to the best suited elevator. Unless the elevator is running without being connected to the node cluster, the same elevator will not get the same order twice in a row. Calls OrderDistributor.distribute_new/1 after the order is assigned.

Parameters

  • order: Order to be assgined :: %Order{}

Return

  • :ok :: atom()
Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.