cost_utils#

A toolbox of useful transport cost related functionality.

Functions#

cost_distribution(matrix, cost_matrix[, ...])

Calculate the distribution of costs across a matrix.

create_log_bins(max_value[, n_bin_pow, ...])

Dynamically choose the bins based on the maximum possible value.

dataclass()

Usage docs: https://docs.pydantic.dev/2.5/concepts/dataclasses/

dynamic_cost_distribution(matrix, ...)

Calculate the distribution of costs across a matrix, using dynamic bins.

normalised_cost_distribution(matrix, cost_matrix)

Calculate the normalised distribution of costs across a matrix.

Classes#

CostDistribution(df[, min_col, max_col, ...])

Distribution of cost values between variable bounds.