Functions | |
def | flp (I, J, d, M, f, c) |
def | make_data () |
Variables | |
c | |
list | customers = ["c%s" % i for i in d] |
d | |
list | edges = [(i, j) for (i, j) in x if model.getVal(x[i, j]) > EPS] |
int | EPS = 1.e-6 |
f | |
list | facilities = [j for j in y if model.getVal(y[j]) > EPS] |
G = NX.Graph() | |
I | |
J | |
M | |
def | model = flp(I, J, d, M, f, c) |
node_color | |
nodelist | |
list | other = [j for j in y if j not in facilities] |
position = NX.drawing.layout.spring_layout(G) | |
x | |
y | |
def flp.flp | ( | I, | |
J, | |||
d, | |||
M, | |||
f, | |||
c | |||
) |
flp -- model for the capacitated facility location problem Parameters: - I: set of customers - J: set of facilities - d[i]: demand for customer i - M[j]: capacity of facility j - f[j]: fixed cost for using a facility in point j - c[i,j]: unit cost of servicing demand point i from facility j Returns a model, ready to be solved.
Definition at line 12 of file flp.py.
References pyscipopt.expr.quicksum().
def flp.make_data | ( | ) |
creates example data set
Definition at line 50 of file flp.py.
References pyscipopt.Multidict.multidict().
list other = [j for j in y if j not in facilities] |