PySCIPOpt  5.1.1
Python Interface for the SCIP Optimization Suite
flp Namespace Reference

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
 

Function Documentation

◆ flp()

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().

◆ make_data()

def flp.make_data ( )
creates example data set

Definition at line 50 of file flp.py.

References pyscipopt.Multidict.multidict().

Variable Documentation

◆ c

c

Definition at line 64 of file flp.py.

◆ customers

list customers = ["c%s" % i for i in d]

Definition at line 85 of file flp.py.

◆ d

d

Definition at line 64 of file flp.py.

◆ edges

list edges = [(i, j) for (i, j) in x if model.getVal(x[i, j]) > EPS]

Definition at line 70 of file flp.py.

◆ EPS

int EPS = 1.e-6

Definition at line 68 of file flp.py.

◆ f

f

Definition at line 64 of file flp.py.

◆ facilities

list facilities = [j for j in y if model.getVal(y[j]) > EPS]

Definition at line 71 of file flp.py.

◆ G

G = NX.Graph()

Definition at line 82 of file flp.py.

◆ I

I

Definition at line 64 of file flp.py.

◆ J

J

Definition at line 64 of file flp.py.

◆ M

M

Definition at line 64 of file flp.py.

◆ model

def model = flp(I, J, d, M, f, c)

Definition at line 65 of file flp.py.

◆ node_color

node_color

Definition at line 93 of file flp.py.

◆ nodelist

nodelist

Definition at line 93 of file flp.py.

◆ other

list other = [j for j in y if j not in facilities]

Definition at line 84 of file flp.py.

◆ position

position = NX.drawing.layout.spring_layout(G)

Definition at line 92 of file flp.py.

◆ x

x

Definition at line 69 of file flp.py.

◆ y

y

Definition at line 69 of file flp.py.