jUFLP_utils
Module summary
Utility / helper functions for j-UFLP: used save / load / draw instances.
(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):
|
Saves an instance to a |
|
Loads a jUFLP instance from |
|
Saves the jUFLP instance to |
❖❖❖
Implementation details
❖❖❖
Functions
- jUFLP_utils.draw_jUFLP_inst(i1, i2, link, filename='tmp/jUFLP.dot')[source]
Saves an instance to a
.dot
file.
- jUFLP_utils.load_inst(filename)[source]
Loads a jUFLP instance from
.json
file.- Returns
[[S,f,c,caves], [S2,f2,c2,caves], jmap]
- jUFLP_utils.save_inst(i1, i2, join_map, filename)[source]
Saves the jUFLP instance to
.json
file.The file contains the following objects
inst1
andinst2
– description of the two sub-instances, with identical structure containing the following records:S: a list of neighborhood lists,
f: a list of lists of overlap costs,
c: a list of facility location costs.
caves: a parameter describing the points allocated to each “cave” (was used in legacy experiments)