UFLP_test
Module summary
Tests the UFLP-related machinery (UFLP_2_cav
and UFL
).
Note
The module requires Gurobi solver.
(In the implementation details below, click on class/function names for additional documentation and links to the source code.)
❖❖❖
Implements functions (outside the classes above):
|
Generates a test facility location instance. |
|
Tests the DP-inspired diagrams. |
|
Tests that MIPs return the same objectives. |
|
Tests the jUFLP-instance-generation procedure (for the given number of inversions). |
❖❖❖
Implementation details
❖❖❖
Functions
- UFLP_test.gen_UFL_instance(n, m)[source]
Generates a test facility location instance.
- Parameters
n (int) – number of facilities
m (int) – number of customers
- Returns
A tuple with the following values.
S (list): neighborhood list
f (dict): costs of facility location (generated uniformly random int from f_min to f_max)
g (dict): overlap costs, keys: (customer, overlap)