starling_sim.basemodel.algorithms.dispatcher

Module Contents

Classes

Dispatcher

This class describes a dispatcher for a transport service.

class starling_sim.basemodel.algorithms.dispatcher.Dispatcher(simulation_model, operator, verb=False)

Bases: abc.ABC

This class describes a dispatcher for a transport service.

The dispatcher is called to affect requests online or punctually.

The Dispatcher class allows a complete specification (punctual and online) and separation (from the operator and the algorithms it uses) of the dispatching strategy.

The parameters needed to initialise and run the dispatcher should be provided in the operator operationParameters attribute.

property name
SCHEMA
init_algorithm()

Initialise the algorithm’s structure used by the dispatcher.

dispatch()

Realise the complete dispatch process.

setup_dispatch()

Setup the dispatch with current simulation data.

run_algorithm()

Run the algorithm on the current problem instance.

update_from_solution()

Update the operator plannings based on the dispatch solution.

dispatching_loop_()
online_dispatch(request)
log_message(message, lvl=15)

Log a message using the operator’s dedicated method.

Parameters:
  • message

  • lvl

compute_matrix_of(stop_points, dimension, mode)

Compute the distance matrix (in the given dimension) between the given stop points, on the given topology graph.

Parameters:
  • stop_points – list of stop point ids

  • dimension – dimension of the distance to compute

  • mode – travel mode between modes

Returns:

matrix[i, j] = distance from stop i to stop j.