PySCIPOpt  5.1.1
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.time()
 
 tinit = time.time()
 
 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 10 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 38 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 107 of file gcp.py.

Variable Documentation

◆ color

dictionary color = {}

Definition at line 130 of file gcp.py.

◆ cpu

dictionary cpu = {}

Definition at line 140 of file gcp.py.

◆ E

E

Definition at line 121 of file gcp.py.

◆ K

K = 10

Definition at line 122 of file gcp.py.

◆ model

model = gcp_low(V, E, K)

Definition at line 125 of file gcp.py.

◆ models

list models = [gcp, gcp_low, gcp_sos]

Definition at line 139 of file gcp.py.

◆ N

int N = 25

Definition at line 141 of file gcp.py.

◆ name

name = m.__name__

Definition at line 148 of file gcp.py.

◆ tend

tend = time.time()

Definition at line 160 of file gcp.py.

◆ tinit

tinit = time.time()

Definition at line 153 of file gcp.py.

◆ V

V

Definition at line 121 of file gcp.py.

◆ x

def x = model.data

Definition at line 128 of file gcp.py.