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 subprob.getVal(x[i, j]) > EPS] |
| int | EPS = 1.e-6 |
| f | |
| list | facilities = [j for j in y if master.getVal(y[j]) > EPS] |
| G = NX.Graph() | |
| I | |
| J | |
| M | |
| master | |
| node_color | |
| nodelist | |
| list | other = [j for j in y if j not in facilities] |
| position = NX.drawing.layout.spring_layout(G) | |
| subprob | |
| suby | |
| x | |
| y = master.data | |
| def flp-benders.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-benders.py.
References pyscipopt.expr.quicksum().
| def flp-benders.make_data | ( | ) |
creates example data set
Definition at line 61 of file flp-benders.py.
References pyscipopt.Multidict.multidict().
| c |
Definition at line 75 of file flp-benders.py.
| list customers = ["c%s" % i for i in d] |
Definition at line 115 of file flp-benders.py.
| d |
Definition at line 75 of file flp-benders.py.
Definition at line 94 of file flp-benders.py.
| int EPS = 1.e-6 |
Definition at line 89 of file flp-benders.py.
| f |
Definition at line 75 of file flp-benders.py.
Definition at line 91 of file flp-benders.py.
| G = NX.Graph() |
Definition at line 112 of file flp-benders.py.
| I |
Definition at line 75 of file flp-benders.py.
| J |
Definition at line 75 of file flp-benders.py.
| M |
Definition at line 75 of file flp-benders.py.
| master |
Definition at line 76 of file flp-benders.py.
| node_color |
Definition at line 123 of file flp-benders.py.
| nodelist |
Definition at line 123 of file flp-benders.py.
| list other = [j for j in y if j not in facilities] |
Definition at line 114 of file flp-benders.py.
| position = NX.drawing.layout.spring_layout(G) |
Definition at line 122 of file flp-benders.py.
| subprob |
Definition at line 76 of file flp-benders.py.
| suby |
Definition at line 93 of file flp-benders.py.
| x |
Definition at line 93 of file flp-benders.py.
| y = master.data |
Definition at line 90 of file flp-benders.py.