PySCIPOpt  4.3.0
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 40 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 8 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 100 of file weber_soco.py.

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

Variable Documentation

◆ alpha

alpha

Definition at line 91 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 157 of file weber_soco.py.

◆ EPS

int EPS = 1.e-4

Definition at line 156 of file weber_soco.py.

◆ G

G = NX.Graph()

Definition at line 80 of file weber_soco.py.

◆ I

I

Definition at line 57 of file weber_soco.py.

◆ J

J

Definition at line 57 of file weber_soco.py.

◆ m

int m = 1

Definition at line 56 of file weber_soco.py.

◆ model

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

Definition at line 64 of file weber_soco.py.

◆ n

int n = 7

Definition at line 55 of file weber_soco.py.

◆ node_color

node_color

Definition at line 90 of file weber_soco.py.

◆ node_size

node_size

Definition at line 90 of file weber_soco.py.

◆ nodelist

nodelist

Definition at line 90 of file weber_soco.py.

◆ pos

pos

Definition at line 90 of file weber_soco.py.

◆ position

dictionary position = {}

Definition at line 85 of file weber_soco.py.

◆ w

w

Definition at line 57 of file weber_soco.py.

◆ x

x

Definition at line 57 of file weber_soco.py.

◆ X

X

Definition at line 66 of file weber_soco.py.

◆ y

y

Definition at line 57 of file weber_soco.py.

◆ Y

Y

Definition at line 66 of file weber_soco.py.

◆ z

z

Definition at line 66 of file weber_soco.py.