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

Functions

def make_data (n, m)
 
def weber (I, x, y, w)
 
def weber_MS (I, J, x, y, w)
 

Variables

 alpha
 
list edges = [(i, j) for (i, j) in z if model.getVal(z[i, j]) > EPS]
 
int EPS = 1.e-4
 
 G = NX.Graph()
 
 I
 
 J
 
int m = 1
 
def model = weber(I, x, y, w)
 
int n = 7
 
 node_color
 
 node_size
 
 nodelist
 
 pos
 
dictionary position = {}
 
 w
 
 x
 
 X
 
 y
 
 Y
 
 z
 

Function Documentation

◆ make_data()

def weber_soco.make_data (   n,
  m 
)
creates example data set

Definition at line 43 of file weber_soco.py.

◆ weber()

def weber_soco.weber (   I,
  x,
  y,
  w 
)
weber: model for solving the single source weber problem using soco.
Parameters:
    - I: set of customers
    - x[i]: x position of customer i
    - y[i]: y position of customer i
    - w[i]: weight of customer i
Returns a model, ready to be solved.

Definition at line 9 of file weber_soco.py.

References pyscipopt.expr.quicksum().

◆ weber_MS()

def weber_soco.weber_MS (   I,
  J,
  x,
  y,
  w 
)
weber -- model for solving the weber problem using soco (multiple source version).
Parameters:
    - I: set of customers
    - J: set of potential facilities
    - x[i]: x position of customer i
    - y[i]: y position of customer i
    - w[i]: weight of customer i
Returns a model, ready to be solved.

Definition at line 103 of file weber_soco.py.

References make_data(), and pyscipopt.expr.quicksum().

Variable Documentation

◆ alpha

alpha

Definition at line 95 of file weber_soco.py.

◆ edges

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

Definition at line 158 of file weber_soco.py.

◆ EPS

int EPS = 1.e-4

Definition at line 157 of file weber_soco.py.

◆ G

G = NX.Graph()

Definition at line 84 of file weber_soco.py.

◆ I

I

Definition at line 60 of file weber_soco.py.

◆ J

J

Definition at line 60 of file weber_soco.py.

◆ m

int m = 1

Definition at line 59 of file weber_soco.py.

◆ model

def model = weber(I, x, y, w)

Definition at line 67 of file weber_soco.py.

◆ n

int n = 7

Definition at line 58 of file weber_soco.py.

◆ node_color

node_color

Definition at line 94 of file weber_soco.py.

◆ node_size

node_size

Definition at line 94 of file weber_soco.py.

◆ nodelist

nodelist

Definition at line 94 of file weber_soco.py.

◆ pos

pos

Definition at line 94 of file weber_soco.py.

◆ position

dictionary position = {}

Definition at line 89 of file weber_soco.py.

◆ w

w

Definition at line 60 of file weber_soco.py.

◆ x

x

Definition at line 60 of file weber_soco.py.

◆ X

X

Definition at line 69 of file weber_soco.py.

◆ y

y

Definition at line 60 of file weber_soco.py.

◆ Y

Y

Definition at line 69 of file weber_soco.py.

◆ z

z

Definition at line 69 of file weber_soco.py.