PySCIPOpt
Python Interface to the SCIP Optimization Suite
weber_soco.py File Reference

model for solving the weber problem using soco. More...

Go to the source code of this file.

Functions

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

Variables

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

Detailed Description

model for solving the weber problem using soco.

Definition in file weber_soco.py.

Function Documentation

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

Definition at line 40 of file weber_soco.py.

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.

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.