PySCIPOpt  4.3.0
Python Interface for the SCIP Optimization Suite
gcp Namespace Reference

Functions

def gcp (V, E, K)
 
def gcp_low (V, E, K)
 
def gcp_sos (V, E, K)
 
def make_data (n, prob)
 

Variables

dictionary color = {}
 
dictionary cpu = {}
 
 E
 
int K = 10
 
def model = gcp_low(V,E,K)
 
list models = [gcp,gcp_low,gcp_sos]
 
int N = 25
 
 name = m.__name__
 
 tend = time.clock()
 
 tinit = time.clock()
 
 V
 
def x = model.data
 

Function Documentation

◆ gcp()

def gcp.gcp (   V,
  E,
  K 
)
gcp -- model for minimizing the number of colors in a graph
Parameters:
    - V: set/list of nodes in the graph
    - E: set/list of edges in the graph
    - K: upper bound on the number of colors
Returns a model, ready to be solved.

Definition at line 9 of file gcp.py.

References pyscipopt.expr.quicksum().

◆ gcp_low()

def gcp.gcp_low (   V,
  E,
  K 
)
gcp_low -- model for minimizing the number of colors in a graph
(use colors with low indices)
Parameters:
    - V: set/list of nodes in the graph
    - E: set/list of edges in the graph
    - K: upper bound to the number of colors
Returns a model, ready to be solved.

Definition at line 37 of file gcp.py.

References pyscipopt.expr.quicksum().

◆ gcp_sos()

def gcp.gcp_sos (   V,
  E,
  K 
)
gcp_sos -- model for minimizing the number of colors in a graph
(use sos type 1 constraints)
Parameters:
    - V: set/list of nodes in the graph
    - E: set/list of edges in the graph
    - K: upper bound to the number of colors
Returns a model, ready to be solved.

Definition at line 70 of file gcp.py.

References pyscipopt.expr.quicksum().

◆ make_data()

def gcp.make_data (   n,
  prob 
)
make_data: prepare data for a random graph
Parameters:
   - n: number of vertices
   - prob: probability of existence of an edge, for each pair of vertices
Returns a tuple with a list of vertices and a list edges.

Definition at line 105 of file gcp.py.

Variable Documentation

◆ color

dictionary color = {}

Definition at line 128 of file gcp.py.

◆ cpu

dictionary cpu = {}

Definition at line 137 of file gcp.py.

◆ E

E

Definition at line 119 of file gcp.py.

◆ K

K = 10

Definition at line 120 of file gcp.py.

◆ model

model = gcp_low(V,E,K)

Definition at line 123 of file gcp.py.

◆ models

list models = [gcp,gcp_low,gcp_sos]

Definition at line 136 of file gcp.py.

◆ N

int N = 25

Definition at line 138 of file gcp.py.

◆ name

name = m.__name__

Definition at line 145 of file gcp.py.

◆ tend

tend = time.clock()

Definition at line 156 of file gcp.py.

◆ tinit

tinit = time.clock()

Definition at line 149 of file gcp.py.

◆ V

V

Definition at line 119 of file gcp.py.

◆ x

def x = model.data

Definition at line 126 of file gcp.py.