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

Functions

def example ()
 
def mkp (I, J, v, a, b)
 

Variables

 a
 
 b
 
int EPS = 1.e-6
 
 I
 
 J
 
def model = mkp(I, J, v, a, b)
 
 v = x[i]
 
def x = model.data
 

Function Documentation

◆ example()

def mkp.example ( )
creates example data set

Definition at line 37 of file mkp.py.

References pyscipopt.Multidict.multidict().

◆ mkp()

def mkp.mkp (   I,
  J,
  v,
  a,
  b 
)
mkp -- model for solving the multi-constrained knapsack
Parameters:
    - I: set of dimensions
    - J: set of items
    - v[j]: value of item j
    - a[i,j]: weight of item j on dimension i
    - b[i]: capacity of knapsack on dimension i
Returns a model, ready to be solved.

Definition at line 9 of file mkp.py.

References pyscipopt.expr.quicksum().

Variable Documentation

◆ a

a

Definition at line 48 of file mkp.py.

◆ b

b

Definition at line 48 of file mkp.py.

◆ EPS

int EPS = 1.e-6

Definition at line 55 of file mkp.py.

◆ I

I

Definition at line 48 of file mkp.py.

◆ J

J

Definition at line 48 of file mkp.py.

◆ model

def model = mkp(I, J, v, a, b)

Definition at line 49 of file mkp.py.

◆ v

def v = x[i]

Definition at line 48 of file mkp.py.

◆ x

def x = model.data

Definition at line 50 of file mkp.py.