Skip to content

Hub location mixin

HubLocationMixin

Provides hub and allocation intelligence for any HLP-based model.

Reads the [AllocationVariable][bilevelpy.models.vars.hlp_vars.AllocationVariable] from the solution to determine which nodes are selected as hubs and how non-hub nodes are assigned to them.

allocations_dict property

Maps nodes to their assigned hubs.

hubs property

Returns list of node indices where X[i,i] == 1.