OrderAssigner.CostCalculation (ElevatorProject v0.1.0)

Calculates the cost for the elevator to take a given order, based on the current state of the elevator.

Uses the following modules:

Link to this section Summary

Functions

Calls ElevatorOperator.get_data/0 to retrieve the current state of the elevator, and calculates the cost of taking the order.

Link to this section Functions

Calls ElevatorOperator.get_data/0 to retrieve the current state of the elevator, and calculates the cost of taking the order.

Parameters

  • order: Order to be calculated cost for :: %Order{}

Return

  • Cost of the elevator :: integer()