PySCIPOpt
Python Interface to the SCIP Optimization Suite
flp-benders.py File Reference

model for solving the capacitated facility location problem using Benders' decomposition More...

Go to the source code of this file.

Functions

def flp (I, J, d, M, f, c)
 
def make_data ()
 

Variables

 I
 
 J
 
 d
 
 M
 
 f
 
 c
 
 master
 
 subprob
 
int EPS = 1
 
 y = master.data
 
list facilities = [j for j in y if master.getVal(y[j]) > EPS]
 
 x
 
 suby
 
list edges = [(i,j) for (i,j) in x if subprob.getVal(x[i,j]) > EPS]
 
 G = NX.Graph()
 
list other = [j for j in y if j not in facilities]
 
list customers = ["c%s"%i for i in d]
 
 position = NX.drawing.layout.spring_layout(G)
 
 node_color
 
 nodelist
 

Detailed Description

model for solving the capacitated facility location problem using Benders' decomposition

Definition in file flp-benders.py.

Function Documentation

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.

def flp-benders.make_data ( )
creates example data set

Definition at line 61 of file flp-benders.py.